[Scummvm-cvs-logs] CVS: scummvm/common engine.cpp,1.8,1.9 engine.h,1.6,1.7
Max Horn
fingolfin at users.sourceforge.net
Sun Nov 10 09:20:02 CET 2002
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.27,1.28 actor.h,1.4,1.5 costume.h,1.3,1.4 saveload.cpp,1.20,1.21
- Next message: [Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.67,1.68
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/common
In directory usw-pr-cvs1:/tmp/cvs-serv24626/common
Modified Files:
engine.cpp engine.h
Log Message:
completly decoupled engine.h/.cpp from simon.h and scumm.h; removed some static variables from drawFlashlight() and made them members of class Scumm instead
Index: engine.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/engine.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- engine.cpp 6 Nov 2002 16:47:46 -0000 1.8
+++ engine.cpp 10 Nov 2002 17:19:42 -0000 1.9
@@ -20,10 +20,9 @@
#include "stdafx.h"
#include "engine.h"
-#include "gameDetector.h"
#include "config-file.h"
-#include "scumm/scumm.h"
-#include "simon/simon.h"
+#include "gameDetector.h"
+#include "timer.h"
#include "sound/mixer.h"
/* FIXME - BIG HACK for MidiEmu */
@@ -85,21 +84,10 @@
if (detector->_gameId >= GID_SIMON_FIRST && detector->_gameId <= GID_SIMON_LAST) {
// Simon the Sorcerer
detector->_gameId -= GID_SIMON_FIRST;
- engine = new SimonState(detector, syst);
+ engine = Engine_SIMON_create(detector, syst);
} else {
// Some kind of Scumm game
- if (detector->_features & GF_OLD_BUNDLE)
- engine = new Scumm_v2(detector, syst);
- else if (detector->_features & GF_OLD256)
- engine = new Scumm_v3(detector, syst);
- else if (detector->_features & GF_SMALL_HEADER) // this force loomCD as v4
- engine = new Scumm_v4(detector, syst);
- else if (detector->_features & GF_AFTER_V7)
- engine = new Scumm_v7(detector, syst);
- else if (detector->_features & GF_AFTER_V6) // this force SamnmaxCD as v6
- engine = new Scumm_v6(detector, syst);
- else
- engine = new Scumm_v5(detector, syst);
+ engine = Engine_SCUMM_create(detector, syst);
}
return engine;
Index: engine.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/engine.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- engine.h 10 Nov 2002 16:00:09 -0000 1.6
+++ engine.h 10 Nov 2002 17:19:42 -0000 1.7
@@ -71,6 +71,10 @@
void CDECL debug(int level, const char *s, ...);
void checkHeap();
+/* Factory functions => no need to include the specific classes
+ * in this header => faster compile */
+extern Engine *Engine_SIMON_create(GameDetector *detector, OSystem *syst);
+extern Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst);
#endif
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.27,1.28 actor.h,1.4,1.5 costume.h,1.3,1.4 saveload.cpp,1.20,1.21
- Next message: [Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.67,1.68
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list