summaryrefslogtreecommitdiff
path: root/src/game.hpp
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2016-09-17 09:58:15 +0200
committerBardur Arantsson <bardur@scientician.net>2016-09-17 09:58:15 +0200
commit5eec61dd05577623c1d5b9eed3a22d1352dcd990 (patch)
treef929b41a5222c9be7fc8dd49f9ed51d4ee838772 /src/game.hpp
parentdc261d2c9732554d9f510e11711ac84d028e5ac1 (diff)
Introduce Game struct
Motivation: SIOF is such a huge chore to work around at this point that it's probably best to just start the looong task of getting rid of the globals. Currently we allocate a single global Game instance which we leak. The idea here is to start moving global game state into the single global Game singleton and eventually allocating the Game variable on the stack such that everything works out nicely wrt. freeing allocated memory and such. Once all the game state has been moved into Game we can start plumbing all the functions, classes, &c such that we don't have to reference game state via the "game" global.
Diffstat (limited to 'src/game.hpp')
-rw-r--r--src/game.hpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/game.hpp b/src/game.hpp
new file mode 100644
index 00000000..e0ebb9ea
--- /dev/null
+++ b/src/game.hpp
@@ -0,0 +1,15 @@
+#pragma once
+
+#include "game_fwd.hpp"
+
+/**
+ * All structures for the game itself.
+ */
+struct Game {
+
+};
+
+/**
+ * Game instance
+ */
+extern Game *game;