diff options
author | Max Horn | 2006-04-15 20:36:41 +0000 |
---|---|---|
committer | Max Horn | 2006-04-15 20:36:41 +0000 |
commit | 68cb7f52c8dd64ccfe8f28e847b530c8835175c3 (patch) | |
tree | 635011611fbc8592289b85c0b704d5a0cec057ea /engines/cine | |
parent | ad45318328e23b76e346414c62ef4c22d8ebe059 (diff) | |
download | scummvm-rg350-68cb7f52c8dd64ccfe8f28e847b530c8835175c3.tar.gz scummvm-rg350-68cb7f52c8dd64ccfe8f28e847b530c8835175c3.tar.bz2 scummvm-rg350-68cb7f52c8dd64ccfe8f28e847b530c8835175c3.zip |
- Renamed ConfigManager::getActiveDomain to getActiveDomainName, and added a new getActiveDomain method that returns a pointer to the actual active *domain*
- Added Engine::_targetName whose value is computed from the name of the active domain
- Removed GameDetector::_targetName, instead code now uses either Engine::_targetName or the name of the active domain
- This in turn allowed for removing usage of GameDetector in many places
svn-id: r21916
Diffstat (limited to 'engines/cine')
-rw-r--r-- | engines/cine/cine.cpp | 16 | ||||
-rw-r--r-- | engines/cine/cine.h | 4 |
2 files changed, 11 insertions, 9 deletions
diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp index 2e3d042aab..9f504b76f0 100644 --- a/engines/cine/cine.cpp +++ b/engines/cine/cine.cpp @@ -28,7 +28,6 @@ #include "common/config-manager.h" #include "common/system.h" -#include "base/gameDetector.h" #include "base/plugins.h" #include "backends/fs/fs.h" @@ -111,15 +110,15 @@ DetectedGameList Engine_CINE_detectGames(const FSList &fslist) { return detectedGames; } -Engine *Engine_CINE_create(GameDetector *detector, OSystem *syst) { - return new Cine::CineEngine(detector, syst); +Engine *Engine_CINE_create(OSystem *syst) { + return new Cine::CineEngine(syst); } REGISTER_PLUGIN(CINE, "CINE Engine"); namespace Cine { -CineEngine::CineEngine(GameDetector *detector, OSystem *syst) : Engine(syst) { +CineEngine::CineEngine(OSystem *syst) : Engine(syst) { Common::addSpecialDebugLevel(kCineDebugScript, "Script", "Script debug level"); // Setup mixer @@ -132,9 +131,12 @@ CineEngine::CineEngine(GameDetector *detector, OSystem *syst) : Engine(syst) { const Cine::GameSettings *g; + const char *gameid = ConfMan.get("gameid").c_str(); for (g = Cine::cine_settings; g->gameid; ++g) - if (!scumm_stricmp(g->gameid, detector->_targetName.c_str())) + if (!scumm_stricmp(g->gameid, gameid)) { _gameId = g->id; + break; + } gameType = _gameId; } @@ -146,10 +148,10 @@ void CineEngine::errorString(const char *buf1, char *buf2) { strcpy(buf2, buf1); } -int CineEngine::init(GameDetector &detector) { +int CineEngine::init() { // Initialize backend _system->beginGFXTransaction(); - initCommonGFX(detector, false); + initCommonGFX(false); _system->initSize(320, 200); _system->endGFXTransaction(); diff --git a/engines/cine/cine.h b/engines/cine/cine.h index dac07c63b0..40e730fd70 100644 --- a/engines/cine/cine.h +++ b/engines/cine/cine.h @@ -58,12 +58,12 @@ class CineEngine : public Engine { void errorString(const char *buf_input, char *buf_output); protected: - int init(GameDetector & detector); + int init(); int go(); void shutdown(); public: - CineEngine(GameDetector *detector, OSystem *syst); + CineEngine(OSystem *syst); virtual ~CineEngine(); int getGameId() { return _gameId; |