(svn r67) -Forget to change debug message for grfspecial.c

-Added compile flag NO_DEBUG_MESSAGES which will strip executeable of all DEBUG(..,..)'s
pull/155/head
darkvater 20 years ago
parent 68c9b7c3ad
commit 4587ede35d

@ -928,8 +928,7 @@ static void GRFInfo(byte *buf, int len)
uint8 version = buf[1];
// this is de facto big endian - grf_load_dword() unsuitable
uint32 grfid = buf[2] << 24 | buf[3] << 16 | buf[4] << 8 | buf[5];
if(_debug_misc_level!=0)
printf("[%s] Loaded GRFv%d set %08lx - %s:\n%s\n", _cur_grffile, version, grfid, buf+6, buf+6+strlen(buf+6)+1);
DEBUG(grf, 1) ("[%s] Loaded GRFv%d set %08lx - %s:\n%s\n", _cur_grffile, version, grfid, buf+6, buf+6+strlen(buf+6)+1);
}
}

@ -150,7 +150,6 @@ static void Place_LandInfo(uint tile)
GetTileDesc(tile, &lid.td);
#if defined(_DEBUG)
{
DEBUG(misc, 0) ("TILE: %#x (%i,%i)", tile, GET_TILE_X(tile), GET_TILE_Y(tile));
DEBUG(misc, 0) ("_map_type_and_height=%#x", _map_type_and_height[tile]);
DEBUG(misc, 0) ("_map2=%#x", _map2[tile]);
@ -158,7 +157,6 @@ static void Place_LandInfo(uint tile)
DEBUG(misc, 0) ("_map3_hi=%#x", _map3_hi[tile]);
DEBUG(misc, 0) ("_map5=%#x", _map5[tile]);
DEBUG(misc, 0) ("_map_owner=%#x", _map_owner[tile]);
}
#endif
}

@ -429,6 +429,10 @@ VARDEF int _debug_misc_level;
VARDEF int _debug_grf_level;
void CDECL debug(const char *s, ...);
#define DEBUG(name, level) if (level == 0 || _debug_ ## name ## _level >= level) debug
#ifdef NO_DEBUG_MESSAGES
#define DEBUG(name, level)
#else
#define DEBUG(name, level) if (level == 0 || _debug_ ## name ## _level >= level) debug
#endif
#endif /* VARIABLES_H */

Loading…
Cancel
Save