I have a debug drawing flag in my game project. This flag determines whether Box2d's DebugDraw is drawing before the end of each frame. Is it possible to use something like:
#ifdef 'debug drawing flag'
//do debug drawing
#else
//skip
Or would it make more sense to have an if statement to check if that value was assigned?
//With a single command line arg
int main(int argc, char* argv []){
//game initialization
.
.
.
//Check if its there and set flag
uint8_t debugDrawFlag = (argc > 0 && strcmp("debugDraw", argv[0]) == 0) ? 1 : 0
.
.
.
if(debugDrawFlag)
physicsWorld->DebugDraw();
}