aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorMax Horn2003-09-28 21:08:48 +0000
committerMax Horn2003-09-28 21:08:48 +0000
commit17bf7b95aa8fb28dcacbe01a5ff547032ffbea1d (patch)
treed45dcf601b6e3ef0983210144d869821a435c9c3 /base
parent84ed3e272d7a470fac35e446ad9adbbd2c374f82 (diff)
downloadscummvm-rg350-17bf7b95aa8fb28dcacbe01a5ff547032ffbea1d.tar.gz
scummvm-rg350-17bf7b95aa8fb28dcacbe01a5ff547032ffbea1d.tar.bz2
scummvm-rg350-17bf7b95aa8fb28dcacbe01a5ff547032ffbea1d.zip
removed duplicate g_timer object (one was global, one was static to timer.cpp); set g_system earlier (might prevent a few race conditions)
svn-id: r10471
Diffstat (limited to 'base')
-rw-r--r--base/engine.cpp4
-rw-r--r--base/engine.h5
-rw-r--r--base/main.cpp9
3 files changed, 4 insertions, 14 deletions
diff --git a/base/engine.cpp b/base/engine.cpp
index 8335b28e94..9eb5ab8e42 100644
--- a/base/engine.cpp
+++ b/base/engine.cpp
@@ -29,7 +29,6 @@
#include "sound/mixer.h"
/* FIXME - BIG HACK for MidiEmu */
-OSystem *g_system = 0;
Engine *g_engine = 0;
Engine::Engine(GameDetector *detector, OSystem *syst)
@@ -39,9 +38,6 @@ Engine::Engine(GameDetector *detector, OSystem *syst)
_gameDataPath = detector->_gameDataPath;
- g_system = _system; // FIXME - BIG HACK for MidiEmu
-
- extern Timer *g_timer;
_timer = g_timer;
}
diff --git a/base/engine.h b/base/engine.h
index 8e9db2751b..049b0b9bdc 100644
--- a/base/engine.h
+++ b/base/engine.h
@@ -49,7 +49,7 @@ enum GameId {
GID_SWORD2_FIRST,
GID_SWORD2_LAST = GID_SWORD2_FIRST + 9,
- //Flight of the Amazon Queen
+ // Flight of the Amazon Queen
GID_QUEEN_FIRST,
GID_QUEEN_LAST = GID_QUEEN_FIRST + 9
};
@@ -60,9 +60,6 @@ class GameDetector;
class Timer;
struct TargetSettings;
-/* FIXME - BIG HACK for MidiEmu */
-extern OSystem *g_system;
-
class Engine {
public:
OSystem *_system;
diff --git a/base/main.cpp b/base/main.cpp
index 643e47dcdb..b47b9e4b17 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -85,7 +85,7 @@ const char *gScummVMFullVersion = "ScummVM 0.5.3cvs (" __DATE__ " " __TIME__ ")"
Config *g_config = 0;
NewGui *g_gui = 0;
-Timer *g_timer = 0;
+OSystem *g_system = 0;
#if defined(WIN32) && defined(NO_CONSOLE)
#include <cstdio>
@@ -197,10 +197,6 @@ static void launcherDialog(GameDetector &detector, OSystem *system) {
system->set_palette(dummy_palette, 0, 16);
- // FIXME - hack we use because LauncherDialog accesses g_system
- extern OSystem *g_system;
- g_system = system;
-
LauncherDialog dlg(g_gui, detector);
dlg.runModal();
}
@@ -281,6 +277,7 @@ int main(int argc, char *argv[]) {
// Create the system object
OSystem *system = detector.createSystem();
+ g_system = system;
// Set initial window caption
prop.caption = "ScummVM";
@@ -309,7 +306,7 @@ int main(int argc, char *argv[]) {
}
// Create the timer services
- g_timer = new Timer (system);
+ g_timer = new Timer(system);
// Create the game engine
Engine *engine = detector.createEngine(system);