F
Finn
Guest
I defined a macro to switch on/off debug mode like this:
Now I want to use GML's pre-processing to handle debug mode so that when the macro is set to false it wont affect performance any longer and remove all the sanity checks and messages that debug mode features.
For instance, I want to surpres text output if the macro is set to false with the following script:
which basically just wraps the built-in function show_debug_message().
-> What I could not find out is this: Does the pre-processor deal with these kind of scripts properly?
If the macro is false, will it only set the script to being empty or actually remove the script from the compiled code entirely?
Code:
#macro DEBUG_MODE_ENABLED true
For instance, I want to surpres text output if the macro is set to false with the following script:
Code:
/// @description sc_show_debug_message
// Will show debug messages only if debug mode (macro) is set to true
/// @argument string
if (DEBUG_MODE_ENABLED) { show_debug_message(argument[0]); }
-> What I could not find out is this: Does the pre-processor deal with these kind of scripts properly?
If the macro is false, will it only set the script to being empty or actually remove the script from the compiled code entirely?