0 Replies - 689 Views - Last Post: 21 May 2019 - 10:26 AM

#1 jfb   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 21-May 19

C Preprocessor and Macro

Posted 21 May 2019 - 10:26 AM

Hello,
I have a question about the C Preprocessor #define

I've merged a mod called Feezetag in my Quake3 servers mod. In my code I have to deactivate and activate some parts of code for the use of the new server mod or for the purpose of the others mods available, so I have used #ifndef and #ifdef all around the code .. All works fine if I do manually #define FREEZE or if I do // #define FREEZE to deactivates that new server mod and recompile the code .

I try to find a way to activate/deactivates the #define FREEZE witch a integer.

eg: g_freezetag.integer == 1 we activate the #define FREEZE if the integer are 0 we deactivate the #define FREEZE ..

There is a way to achieve that ? or I have to find other way to do it ?

Thank you.

ps: I'm not a dev, I do it like hobby :)

Is This A Good Question/Topic? 0
  • +

Page 1 of 1