summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/state.h
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2010-07-19 10:27:48 +0200
committerAdam Borowski <kilobyte@angband.pl>2010-07-19 16:14:57 +0200
commit42ccd053e2be73e5e2a7fbf3be8643141251bb94 (patch)
tree884e9ba6f5495a9aad9f094667492ae9852917a4 /crawl-ref/source/state.h
parentdbc72c204e2b75e40397e089e08289012a8c2087 (diff)
downloadcrawl-ref-42ccd053e2be73e5e2a7fbf3be8643141251bb94.tar.gz
crawl-ref-42ccd053e2be73e5e2a7fbf3be8643141251bb94.zip
A compile option (-DDEBUG_GLOBALS) to let valgrind act on global classes.
It's not the default, even for debug builds, since it makes debugging with gdb nasty -- you have to refer to real_you->field when gdb mentions you.field. Even naming real_you just you would still force you to use "->" instead of ".".
Diffstat (limited to 'crawl-ref/source/state.h')
-rw-r--r--crawl-ref/source/state.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/state.h b/crawl-ref/source/state.h
index cae30293fe..8ae02d68e9 100644
--- a/crawl-ref/source/state.h
+++ b/crawl-ref/source/state.h
@@ -173,6 +173,9 @@ public:
friend class mon_acting;
};
+#ifdef DEBUG_GLOBALS
+#define crawl_state (*real_crawl_state)
+#endif
extern game_state crawl_state;
class god_acting