commit 7d604e02
Moved the extern out of the cpp-files
Changed files
| M | source/code/MenuSystem.cpp before |
| M | source/code/global.hpp before |
| M | source/code/menudef.cpp before |
| M | source/code/ttfont.cpp before |
diff --git a/source/code/MenuSystem.cpp b/source/code/MenuSystem.cpp
index 202c636..e9ce9b5 100644
--- a/source/code/MenuSystem.cpp
+++ b/source/code/MenuSystem.cpp
@@ -26,11 +26,8 @@ http://blockattack.sf.net
#include "MenuSystem.h"
#include "common.h"
#include "CppSdlImageHolder.hpp"
+#include "global.hpp"
-extern std::shared_ptr<CppSdl::CppSdlImageHolder> mouse;
-extern SDL_Surface* backgroundImage;
-extern bool highPriority;
-extern int verboseLevel;
int mousex;
int mousey;
diff --git a/source/code/global.hpp b/source/code/global.hpp
index d3bf790..ab5bcff 100644
--- a/source/code/global.hpp
+++ b/source/code/global.hpp
@@ -40,6 +40,10 @@ extern bool bFullscreen; //true if game is running fullscreen
extern char player1name[30];
extern char player2name[30];
extern SDL_Surface *screen; //The whole screen;
+extern std::shared_ptr<CppSdl::CppSdlImageHolder> mouse;
+extern SDL_Surface* backgroundImage;
+extern bool highPriority;
+extern int verboseLevel;
#endif /* _GLOBAL_HPP */
diff --git a/source/code/menudef.cpp b/source/code/menudef.cpp
index 454ee88..710c995 100644
--- a/source/code/menudef.cpp
+++ b/source/code/menudef.cpp
@@ -29,8 +29,6 @@ http://blockattack.sf.net
using namespace std;
-extern int verboseLevel;
-
//Menu
static void PrintHi(Button* b) {
cout << "Hi" <<endl;
diff --git a/source/code/ttfont.cpp b/source/code/ttfont.cpp
index 08b0b4c..c676abf 100644
--- a/source/code/ttfont.cpp
+++ b/source/code/ttfont.cpp
@@ -23,10 +23,6 @@ http://blockattack.sf.net
#include "ttfont.h"
-//extern SDL_Surface *tmp;
-
-//#define CONVERTA(n) tmp = SDL_DisplayFormatAlpha(n); SDL_FreeSurface(n); n = tmp
-
TTFont::TTFont() {
font = nullptr;
actualInstance = false;