diff options
author | Aki <please@ignore.pl> | 2022-04-18 10:40:00 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-04-18 10:40:00 +0200 |
commit | 04a09e6a59200092e7e4ccde94535a921c01c4c4 (patch) | |
tree | c95023b872023d9745cf12d9b92bb82a5a7047ff | |
parent | 7e1081ff8f1297486e177bd716fecebb42c0182a (diff) | |
download | bullethell2022-04a09e6a59200092e7e4ccde94535a921c01c4c4.zip bullethell2022-04a09e6a59200092e7e4ccde94535a921c01c4c4.tar.gz bullethell2022-04a09e6a59200092e7e4ccde94535a921c01c4c4.tar.bz2 |
Moved global game instance to a header
-rw-r--r-- | Globals.h | 6 | ||||
-rw-r--r-- | TitleScreen.cpp | 3 | ||||
-rw-r--r-- | main.cpp | 1 |
3 files changed, 8 insertions, 2 deletions
diff --git a/Globals.h b/Globals.h new file mode 100644 index 0000000..8a3b467 --- /dev/null +++ b/Globals.h @@ -0,0 +1,6 @@ +#pragma once + +#include "Game.h" + + +extern Game g_game; diff --git a/TitleScreen.cpp b/TitleScreen.cpp index 9bdd47c..3994fe9 100644 --- a/TitleScreen.cpp +++ b/TitleScreen.cpp @@ -6,10 +6,9 @@ #include "Game.h" #include "GameScreen.h" +#include "Globals.h" -extern Game g_game; - static constexpr const char* TITLE {"Generic Bullet HELL"}; static constexpr const char* PRESS {"Press SPACE to start"}; @@ -7,6 +7,7 @@ #endif #include "Game.h" +#include "Globals.h" #include "TitleScreen.h" |