diff options
| author | Max Horn | 2002-11-10 17:19:43 +0000 |
|---|---|---|
| committer | Max Horn | 2002-11-10 17:19:43 +0000 |
| commit | da5a347d3e6220f6dcd141706e9fb6243bb6d319 (patch) | |
| tree | 19d11d67abe1dd6b3b32faa7a33a578a38e6100e /common | |
| parent | 2965bd27086e443018cc9d63ac59befc884eed5b (diff) | |
| download | scummvm-rg350-da5a347d3e6220f6dcd141706e9fb6243bb6d319.tar.gz scummvm-rg350-da5a347d3e6220f6dcd141706e9fb6243bb6d319.tar.bz2 scummvm-rg350-da5a347d3e6220f6dcd141706e9fb6243bb6d319.zip | |
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
svn-id: r5506
Diffstat (limited to 'common')
| -rw-r--r-- | common/engine.cpp | 20 | ||||
| -rw-r--r-- | common/engine.h | 4 |
2 files changed, 8 insertions, 16 deletions
diff --git a/common/engine.cpp b/common/engine.cpp index 5067ac7378..4540a99fcb 100644 --- a/common/engine.cpp +++ b/common/engine.cpp @@ -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 @@ Engine *Engine::createFromDetector(GameDetector *detector, OSystem *syst) 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; diff --git a/common/engine.h b/common/engine.h index 49ce90fd9d..ec2c400912 100644 --- a/common/engine.h +++ b/common/engine.h @@ -71,6 +71,10 @@ void CDECL warning(const char *s, ...); 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 |
