[Scummvm-cvs-logs] CVS: scummvm/base engine.cpp,1.1,1.2 main.cpp,1.7,1.8

Jamieson Christian jamieson630 at users.sourceforge.net
Sat Sep 27 17:00:02 CEST 2003


Update of /cvsroot/scummvm/scummvm/base
In directory sc8-pr-cvs1:/tmp/cvs-serv21261/scummvm/base

Modified Files:
	engine.cpp main.cpp 
Log Message:
Timer services are now available through g_timer, so
you don't have to go through the Engine to get to them.

Index: engine.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/engine.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- engine.cpp	18 Sep 2003 02:07:16 -0000	1.1
+++ engine.cpp	27 Sep 2003 23:59:00 -0000	1.2
@@ -41,7 +41,8 @@
 
 	g_system = _system; // FIXME - BIG HACK for MidiEmu
 
-	_timer = new Timer(_system);
+	extern Timer *g_timer;
+	_timer = g_timer;
 }
 
 Engine::~Engine() {

Index: main.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/main.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- main.cpp	26 Sep 2003 00:09:09 -0000	1.7
+++ main.cpp	27 Sep 2003 23:59:00 -0000	1.8
@@ -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 @@
 
 Config	*g_config = 0;
 NewGui	*g_gui = 0;
+Timer   *g_timer = 0;
 
 #if defined(WIN32) && defined(NO_CONSOLE)
 #include <cstdio>
@@ -305,6 +307,9 @@
 			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);





More information about the Scummvm-git-logs mailing list