summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-04-18 10:40:00 +0200
committerAki <please@ignore.pl>2022-04-18 10:40:00 +0200
commit04a09e6a59200092e7e4ccde94535a921c01c4c4 (patch)
treec95023b872023d9745cf12d9b92bb82a5a7047ff
parent7e1081ff8f1297486e177bd716fecebb42c0182a (diff)
downloadbullethell2022-04a09e6a59200092e7e4ccde94535a921c01c4c4.zip
bullethell2022-04a09e6a59200092e7e4ccde94535a921c01c4c4.tar.gz
bullethell2022-04a09e6a59200092e7e4ccde94535a921c01c4c4.tar.bz2
Moved global game instance to a header
-rw-r--r--Globals.h6
-rw-r--r--TitleScreen.cpp3
-rw-r--r--main.cpp1
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"};
diff --git a/main.cpp b/main.cpp
index e76f30a..207e861 100644
--- a/main.cpp
+++ b/main.cpp
@@ -7,6 +7,7 @@
#endif
#include "Game.h"
+#include "Globals.h"
#include "TitleScreen.h"