summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/externs.h
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/externs.h')
-rw-r--r--crawl-ref/source/externs.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index 78bc398bd4..6447ad5fec 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -680,6 +680,21 @@ struct crawl_environment
extern struct crawl_environment env;
+// Track stuff for SIGHUP handling.
+struct game_state
+{
+ bool need_save; // Set to true when game has started.
+ bool saving_game; // Set to true while in save_game.
+ bool updating_scores; // Set to true while updating hiscores.
+
+ int seen_hups; // Set to true if SIGHUP received.
+
+ game_state() : need_save(false), saving_game(false),
+ updating_scores(false), seen_hups(0)
+ {
+ }
+};
+extern game_state crawl_state;
struct ghost_struct
{