[Scummvm-cvs-logs] CVS: scummvm/base engine.cpp,1.2,1.3 engine.h,1.2,1.3 main.cpp,1.8,1.9

Max Horn fingolfin at users.sourceforge.net
Sun Sep 28 14:10:02 CEST 2003


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

Modified Files:
	engine.cpp engine.h main.cpp 
Log Message:
removed duplicate g_timer object (one was global, one was static to timer.cpp); set g_system earlier (might prevent a few race conditions)

Index: engine.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/engine.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- engine.cpp	27 Sep 2003 23:59:00 -0000	1.2
+++ engine.cpp	28 Sep 2003 21:08:48 -0000	1.3
@@ -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 @@
 
 	_gameDataPath = detector->_gameDataPath;
 
-	g_system = _system; // FIXME - BIG HACK for MidiEmu
-
-	extern Timer *g_timer;
 	_timer = g_timer;
 }
 

Index: engine.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/engine.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- engine.h	28 Sep 2003 15:50:47 -0000	1.2
+++ engine.h	28 Sep 2003 21:08:48 -0000	1.3
@@ -49,7 +49,7 @@
 	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
 };
@@ -59,9 +59,6 @@
 class GameDetector;
 class Timer;
 struct TargetSettings;
-
-/* FIXME - BIG HACK for MidiEmu */
-extern OSystem *g_system;
 
 class Engine {
 public:

Index: main.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/main.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- main.cpp	27 Sep 2003 23:59:00 -0000	1.8
+++ main.cpp	28 Sep 2003 21:08:48 -0000	1.9
@@ -85,7 +85,7 @@
 
 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 @@
 
 	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 @@
 
 	// Create the system object
 	OSystem *system = detector.createSystem();
+	g_system = system;
 
 	// Set initial window caption
 	prop.caption = "ScummVM";
@@ -309,7 +306,7 @@
 		}
 		
 		// Create the timer services
-		g_timer = new Timer (system);
+		g_timer = new Timer(system);
 
 		// Create the game engine
 		Engine *engine = detector.createEngine(system);





More information about the Scummvm-git-logs mailing list