diff options
-rw-r--r-- | src/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/game.cc | 3 | ||||
-rw-r--r-- | src/game.hpp | 15 | ||||
-rw-r--r-- | src/game_fwd.hpp | 4 | ||||
-rw-r--r-- | src/init2.cc | 2 |
5 files changed, 25 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bf970c59..5f06bcec 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -28,6 +28,7 @@ SET(SRCS_COMMON dice.cc dungeon.cc files.cc + game.cc gen_evol.cc gen_maze.cc generate.cc diff --git a/src/game.cc b/src/game.cc new file mode 100644 index 00000000..284c9ccc --- /dev/null +++ b/src/game.cc @@ -0,0 +1,3 @@ +#include "game.hpp" + +Game *game; 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; 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; diff --git a/src/init2.cc b/src/init2.cc index fa07bb02..7cb3a5cd 100644 --- a/src/init2.cc +++ b/src/init2.cc @@ -1256,6 +1256,8 @@ void init_angband(void) /* Close it */ (void)fd_close(fd); + // Initialize game structure + game = new Game(); /* Allocate the wilderness */ wilderness_ptr = new grid<wilderness_map>(); |