summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorCraig Robbins <kde.psych@gmail.com>2015-04-01 23:01:28 +1000
committerCraig Robbins <kde.psych@gmail.com>2015-04-01 23:04:25 +1000
commit9527984dbcfc0a6cc7aa0470430cb6c3aa4103ba (patch)
treea06f321422fb501ea6c28571a9ac31bf7d09c43a /src/client
parent113bdd3ec0608655d1ab36886b4708bb8ccb7870 (diff)
downloadminetest-9527984dbcfc0a6cc7aa0470430cb6c3aa4103ba.tar.gz
minetest-9527984dbcfc0a6cc7aa0470430cb6c3aa4103ba.tar.bz2
minetest-9527984dbcfc0a6cc7aa0470430cb6c3aa4103ba.zip
Move globals from main.cpp to more sane locations
Move debug streams to log.cpp|h Move GUI-related globals to clientlauncher Move g_settings and g_settings_path to settings.cpp|h Move g_menuclouds to clouds.cpp|h Move g_profiler to profiler.cpp|h
Diffstat (limited to 'src/client')
-rw-r--r--src/client/clientlauncher.cpp21
-rw-r--r--src/client/tile.cpp1
2 files changed, 17 insertions, 5 deletions
diff --git a/src/client/clientlauncher.cpp b/src/client/clientlauncher.cpp
index 6815082a6..fe4dec40f 100644
--- a/src/client/clientlauncher.cpp
+++ b/src/client/clientlauncher.cpp
@@ -17,7 +17,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include "main.h"
#include "mainmenumanager.h"
#include "debug.h"
#include "clouds.h"
@@ -35,9 +34,23 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "fontengine.h"
#include "clientlauncher.h"
-// A pointer to a global instance of the time getter
-// TODO: why?
-TimeGetter *g_timegetter = NULL;
+/* mainmenumanager.h
+ */
+gui::IGUIEnvironment *guienv = NULL;
+gui::IGUIStaticText *guiroot = NULL;
+MainMenuManager g_menumgr;
+
+bool noMenuActive()
+{
+ return g_menumgr.menuCount() == 0;
+}
+
+// Passed to menus to allow disconnecting and exiting
+MainGameCallback *g_gamecallback = NULL;
+
+
+// Instance of the time getter
+static TimeGetter *g_timegetter = NULL;
u32 getTimeMs()
{
diff --git a/src/client/tile.cpp b/src/client/tile.cpp
index 283b262a6..315c2fa29 100644
--- a/src/client/tile.cpp
+++ b/src/client/tile.cpp
@@ -26,7 +26,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "util/numeric.h"
#include "irrlichttypes_extrabloated.h"
#include "debug.h"
-#include "main.h" // for g_settings
#include "filesys.h"
#include "settings.h"
#include "mesh.h"