git repos / blockattack-game

commit 9c062c1d

Poul Sander · 2022-01-15 14:48
9c062c1d02217e23b24943be7f55a77905d9fe50 patch · browse files
parent cb995956e747805765937e1e059f1af491b98897

Move defines into global.hpp

Changed files

M source/code/global.hpp before
M source/code/main.cpp before
M source/code/mainVars.inc before
diff --git a/source/code/global.hpp b/source/code/global.hpp index 9a583ae..4dbbbdd 100644 --- a/source/code/global.hpp +++ b/source/code/global.hpp
@@ -33,6 +33,21 @@ http://www.blockattack.net
#include "sago/SagoTextField.hpp"
#include "ModInfo.hpp"
+//if SHAREDIR is not used we look in current directory
+#ifndef SHAREDIR
+#define SHAREDIR "."
+#endif
+
+#ifndef LOCALEDIR
+#define LOCALEDIR SHAREDIR"/locale"
+#endif
+
+#ifndef PACKAGE
+#define PACKAGE "blockattack_roftb"
+#endif
+
+#define MODLIST_TXT "mod_list.txt"
+
void MainMenu();
void SafeModeMenu();
void ResetFullscreen();
diff --git a/source/code/main.cpp b/source/code/main.cpp index 422ac69..f588f8c 100644 --- a/source/code/main.cpp +++ b/source/code/main.cpp
@@ -52,21 +52,6 @@ https://blockattack.net
#include <memory>
#include "ScoresDisplay.hpp"
-//if SHAREDIR is not used we look in current directory
-#ifndef SHAREDIR
-#define SHAREDIR "."
-#endif
-
-#ifndef LOCALEDIR
-#define LOCALEDIR SHAREDIR"/locale"
-#endif
-
-#ifndef PACKAGE
-#define PACKAGE "blockattack_roftb"
-#endif
-
-#define MODLIST_TXT "mod_list.txt"
-
#include "highscore.h" //Stores highscores
#include "ReadKeyboard.h" //Reads text from keyboard
#include "stats.h" //Saves general stats
diff --git a/source/code/mainVars.inc b/source/code/mainVars.inc index 5e10d2a..e97a4d0 100644 --- a/source/code/mainVars.inc +++ b/source/code/mainVars.inc
@@ -39,10 +39,6 @@ http://blockattack.net
#define BOMBTIME 200
#define CURSORTIME 200
-#ifndef SHAREDIR
-#define SHAREDIR "."
-#endif
-
const char sharedir[] = SHAREDIR;
//All graphic in the game: