summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/state.h
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/state.h')
-rw-r--r--crawl-ref/source/state.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/crawl-ref/source/state.h b/crawl-ref/source/state.h
index ddfc73b969..397bd510ef 100644
--- a/crawl-ref/source/state.h
+++ b/crawl-ref/source/state.h
@@ -15,6 +15,14 @@
class monsters;
class mon_acting;
+class crawl_exit_hook
+{
+public:
+ crawl_exit_hook();
+ virtual ~crawl_exit_hook();
+ virtual void restore_state() = 0;
+};
+
struct god_act_state
{
public:
@@ -76,6 +84,9 @@ struct game_state
std::vector<std::string> input_line_strs;
unsigned int input_line_curr;
+ // Hooks to call if get shut down unexpectedly.
+ std::vector<crawl_exit_hook*> exit_hooks;
+
bool level_annotation_shown;
protected: