From 5eec61dd05577623c1d5b9eed3a22d1352dcd990 Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Sat, 17 Sep 2016 09:58:15 +0200 Subject: 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. --- src/game_fwd.hpp | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 src/game_fwd.hpp (limited to 'src/game_fwd.hpp') diff --git a/src/game_fwd.hpp b/src/game_fwd.hpp new file mode 100644 index 00000000..840e5f3b --- /dev/null +++ b/src/game_fwd.hpp @@ -0,0 +1,4 @@ +#pragma once + +struct Game; +extern Game *game; -- cgit v1.2.3