summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-11-16 08:35:26 +0000
committertron <tron@openttd.org>2005-11-16 08:35:26 +0000
commit1d109214bc9af5673083be6703049923b29b34b9 (patch)
tree36dbde3689e61e89ebf603f5f851028019d303b1
parent3bf8d2ccbbf75533c3578bfebde1238b7293b3ad (diff)
downloadopenttd-1d109214bc9af5673083be6703049923b29b34b9.tar.xz
(svn r3191) Move declaration and definition of _dbg_screen_rect to a place where it somewhat makes sense and wrap them in #ifdef _DEBUG
-rw-r--r--gfx.c4
-rw-r--r--gfx.h4
-rw-r--r--hal.h1
-rw-r--r--openttd.c2
4 files changed, 8 insertions, 3 deletions
diff --git a/gfx.c b/gfx.c
index 32ecca3ae..bf8e528ae 100644
--- a/gfx.c
+++ b/gfx.c
@@ -13,6 +13,10 @@
#include "hal.h"
#include "variables.h"
+#ifdef _DEBUG
+bool _dbg_screen_rect;
+#endif
+
Colour _cur_palette[256];
static void GfxMainBlitter(const Sprite *sprite, int x, int y, int mode);
diff --git a/gfx.h b/gfx.h
index e8bf5a704..66eb5eee1 100644
--- a/gfx.h
+++ b/gfx.h
@@ -124,4 +124,8 @@ typedef enum StringColorFlags {
IS_PALETTE_COLOR = 0x100, // color value is already a real palette color index, not an index of a StringColor
} StringColorFlags;
+#ifdef _DEBUG
+extern bool _dbg_screen_rect;
+#endif
+
#endif /* GFX_H */
diff --git a/hal.h b/hal.h
index 6511ba118..7c4625c44 100644
--- a/hal.h
+++ b/hal.h
@@ -43,7 +43,6 @@ enum DriverType {
};
extern void GameLoop(void);
-extern bool _dbg_screen_rect;
// Deals with finding savegames
diff --git a/openttd.c b/openttd.c
index a8855c981..97a918a3c 100644
--- a/openttd.c
+++ b/openttd.c
@@ -61,8 +61,6 @@ extern void SetDifficultyLevel(int mode, GameOptions *gm_opt);
extern void DoStartupNewPlayer(bool is_ai);
extern void ShowOSErrorBox(const char *buf);
-bool _dbg_screen_rect;
-
/* TODO: usrerror() for errors which are not of an internal nature but
* caused by the user, i.e. missing files or fatal configuration errors.
* Post-0.4.0 since Celestar doesn't want this in SVN before. --pasky */