diff options
author | Jamieson Christian | 2003-09-27 23:59:00 +0000 |
---|---|---|
committer | Jamieson Christian | 2003-09-27 23:59:00 +0000 |
commit | 4dcb829e78f969a4e492e9e777b51715c1309e9e (patch) | |
tree | 7ebaef54d2b07297d00f019e0370876ae8c645d7 /base | |
parent | 072bf0f47626bfb4122b95605426eff3c8d23eb0 (diff) | |
download | scummvm-rg350-4dcb829e78f969a4e492e9e777b51715c1309e9e.tar.gz scummvm-rg350-4dcb829e78f969a4e492e9e777b51715c1309e9e.tar.bz2 scummvm-rg350-4dcb829e78f969a4e492e9e777b51715c1309e9e.zip |
Timer services are now available through g_timer, so
you don't have to go through the Engine to get to them.
svn-id: r10450
Diffstat (limited to 'base')
-rw-r--r-- | base/engine.cpp | 3 | ||||
-rw-r--r-- | base/main.cpp | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/base/engine.cpp b/base/engine.cpp index f7536dc769..8335b28e94 100644 --- a/base/engine.cpp +++ b/base/engine.cpp @@ -41,7 +41,8 @@ Engine::Engine(GameDetector *detector, OSystem *syst) g_system = _system; // FIXME - BIG HACK for MidiEmu - _timer = new Timer(_system); + extern Timer *g_timer; + _timer = g_timer; } Engine::~Engine() { diff --git a/base/main.cpp b/base/main.cpp index ac49cd3ab2..643e47dcdb 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -34,6 +34,7 @@ #include "base/plugins.h" #include "common/config-file.h" #include "common/scaler.h" // For GFX_NORMAL +#include "common/timer.h" #include "gui/newgui.h" #include "gui/launcher.h" #include "gui/message.h" @@ -84,6 +85,7 @@ const char *gScummVMFullVersion = "ScummVM 0.5.3cvs (" __DATE__ " " __TIME__ ")" Config *g_config = 0; NewGui *g_gui = 0; +Timer *g_timer = 0; #if defined(WIN32) && defined(NO_CONSOLE) #include <cstdio> @@ -305,6 +307,9 @@ int main(int argc, char *argv[]) { prop.gfx_mode = GFX_NORMAL; system->property(OSystem::PROP_SET_GFX_MODE, &prop); } + + // Create the timer services + g_timer = new Timer (system); // Create the game engine Engine *engine = detector.createEngine(system); |