void setupDebug() { int level = 0; #ifdef DEBUG_INFO level |= D_INFO; #endif #ifdef DEBUG_WARNING level |= D_WARNING; #endif #ifdef DEBUG_ERROR level |= D_ERROR; #endif #ifdef DEBUG_PEDANTIC_INFO level |= D_PEDANTIC_INFO; #endif if( level != 0 ) { limitDebugLevel( level ); } int cl = 0; #ifdef DEBUG_ENABLE_MAIN cl |= D_MAIN; #endif #ifdef DEBUG_ENABLE_MAP cl |= D_MAP; #endif #ifdef DEBUG_ENABLE_MAP_GEN cl |= D_MAP_GEN; #endif #ifdef DEBUG_ENABLE_GAME cl |= D_GAME; #endif if( cl != 0 ) { limitDebugClass( cl ); } debugFile.init( FILENAMES["debug"] ); }