[Scummvm-cvs-logs] CVS: scummvm/common module.mk,1.4,1.5 gameDetector.h,1.61,1.62 gameDetector.cpp,1.154,1.155 engine.cpp,1.35,1.36

Max Horn fingolfin at users.sourceforge.net
Mon Sep 8 22:02:07 CEST 2003


Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1:/tmp/cvs-serv23372/common

Modified Files:
	module.mk gameDetector.h gameDetector.cpp engine.cpp 
Log Message:
changes to get a better link order, and to allow building a 'bare bone' scummvm executable

Index: module.mk
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/module.mk,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- module.mk	8 Sep 2003 15:38:30 -0000	1.4
+++ module.mk	8 Sep 2003 17:42:52 -0000	1.5
@@ -2,9 +2,8 @@
 
 MODULE_OBJS = \
 	common/config-file.o \
+	common/engine.o \
 	common/file.o \
-	common/gameDetector.o \
-	common/main.o \
 	common/plugins.o \
 	common/scaler.o \
 	common/str.o \

Index: gameDetector.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/gameDetector.h,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- gameDetector.h	8 Sep 2003 17:25:44 -0000	1.61
+++ gameDetector.h	8 Sep 2003 17:42:53 -0000	1.62
@@ -27,8 +27,9 @@
 
 class Engine;
 class GameDetector;
-class OSystem;
 class MidiDriver;
+class OSystem;
+class SoundMixer;
 
 /** Default sound/music volumes.
  * @todo move this to a better place.
@@ -183,6 +184,7 @@
 	OSystem *createSystem();
 	Engine *createEngine(OSystem *system);
 
+	SoundMixer *createMixer();
 	MidiDriver *createMidi();
 	int getMidiDriverType();
 

Index: gameDetector.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/gameDetector.cpp,v
retrieving revision 1.154
retrieving revision 1.155
diff -u -d -r1.154 -r1.155
--- gameDetector.cpp	8 Sep 2003 17:25:44 -0000	1.154
+++ gameDetector.cpp	8 Sep 2003 17:42:53 -0000	1.155
@@ -28,6 +28,7 @@
 #include "common/plugins.h"
 #include "common/scaler.h"	// Only for gfx_modes
 #include "sound/mididrv.h"
+#include "sound/mixer.h"
 
 #if defined(HAVE_CONFIG_H)
 #include "config.h"
@@ -799,6 +800,10 @@
 	return MD_ADLIB;
 #endif
     return MD_NULL;
+}
+
+SoundMixer *GameDetector::createMixer() {
+	return new SoundMixer();
 }
 
 MidiDriver *GameDetector::createMidi() {

Index: engine.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/engine.cpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- engine.cpp	8 Sep 2003 17:30:24 -0000	1.35
+++ engine.cpp	8 Sep 2003 17:42:53 -0000	1.36
@@ -78,7 +78,7 @@
 Engine::Engine(GameDetector *detector, OSystem *syst)
 	: _system(syst) {
 	g_engine = this;
-	_mixer = new SoundMixer();
+	_mixer = detector->createMixer();
 
 	_gameDataPath = detector->_gameDataPath;
 
@@ -240,25 +240,3 @@
 	}
 #endif
 }
-
-//
-// HACK: The following is done to pull in symbols from all the engine modules here.
-// If we don't do this, all sorts of linker problems may occur.
-//
-EngineFactory _factories[] =
-	{
-#ifndef DISABLE_SCUMM
-		Engine_SCUMM_create,
-#endif
-#ifndef DISABLE_SCUMM
-		Engine_SIMON_create,
-#endif
-#ifndef DISABLE_SCUMM
-		Engine_SKY_create,
-#endif
-#ifndef DISABLE_SCUMM
-		Engine_SWORD2_create,
-#endif
-		0
-	};
-





More information about the Scummvm-git-logs mailing list