summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordarkvater <darkvater@openttd.org>2004-08-16 15:13:46 +0000
committerdarkvater <darkvater@openttd.org>2004-08-16 15:13:46 +0000
commit4587ede35d8ada9f15c1a8ba5e2362cc870c0073 (patch)
tree2984faebdc648484861defba165f192da502f71a
parent68c9b7c3ad902784c07b0d76c81c87e073c826b3 (diff)
downloadopenttd-4587ede35d8ada9f15c1a8ba5e2362cc870c0073.tar.xz
(svn r67) -Forget to change debug message for grfspecial.c
-Added compile flag NO_DEBUG_MESSAGES which will strip executeable of all DEBUG(..,..)'s
-rw-r--r--grfspecial.c3
-rw-r--r--misc_gui.c2
-rw-r--r--variables.h6
3 files changed, 6 insertions, 5 deletions
diff --git a/grfspecial.c b/grfspecial.c
index 47f7bc31c..d91711b04 100644
--- a/grfspecial.c
+++ b/grfspecial.c
@@ -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);
}
}
diff --git a/misc_gui.c b/misc_gui.c
index 755ca0c79..2d54d1e99 100644
--- a/misc_gui.c
+++ b/misc_gui.c
@@ -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
}
diff --git a/variables.h b/variables.h
index a992b1e12..d7ee68713 100644
--- a/variables.h
+++ b/variables.h
@@ -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 */