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/gob | |
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/gob')
-rw-r--r-- | engines/gob/gob.cpp | 17 | ||||
-rw-r--r-- | engines/gob/gob.h | 4 |
2 files changed, 8 insertions, 13 deletions
diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index 3538e01b65..4a968bb4b3 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -21,7 +21,6 @@ */ #include "common/stdafx.h" -#include "base/gameDetector.h" #include "base/plugins.h" #include "backends/fs/fs.h" #include "common/config-manager.h" @@ -127,7 +126,7 @@ static const PlainGameDescriptor gob_list[] = { #define MAX_TIME_DELTA 100 -GobEngine::GobEngine(GameDetector *detector, OSystem * syst, uint32 features) +GobEngine::GobEngine(OSystem * syst, uint32 features) : Engine(syst) { // Setup mixer if (!_mixer->isReady()) { @@ -189,7 +188,7 @@ void GobEngine::shutdown() { _system->quit(); } -int GobEngine::init(GameDetector &detector) { +int GobEngine::init() { _game = new Game(this); _snd = new Snd(this); _video = new Video(this); @@ -223,7 +222,7 @@ int GobEngine::init(GameDetector &detector) { _music = new Music(this); _system->beginGFXTransaction(); - initCommonGFX(detector, false); + initCommonGFX(false); _system->initSize(320, 200); _system->endGFXTransaction(); @@ -339,7 +338,7 @@ DetectedGameList Engine_GOB_detectGames(const FSList &fslist) { return detectedGames; } -Engine *Engine_GOB_create(GameDetector * detector, OSystem *syst) { +Engine *Engine_GOB_create(OSystem *syst) { // Detect game features based on MD5 uint8 md5sum[16]; char md5str[32 + 1]; @@ -358,12 +357,8 @@ Engine *Engine_GOB_create(GameDetector * detector, OSystem *syst) { // TODO // Fallback. Maybe we will be able to determine game type from game // data contents - Common::String realGame; + Common::String realGame(ConfMan.get("gameid")); uint32 features; - if (ConfMan.hasKey("gameid")) - realGame = ConfMan.get("gameid"); - else - realGame = detector->_targetName; if (!scumm_stricmp(realGame.c_str(), "gob2")) features = GF_GOB2; else @@ -385,7 +380,7 @@ Engine *Engine_GOB_create(GameDetector * detector, OSystem *syst) { printf("Unknown MD5 (%s)! Please report the details (language, platform, etc.) of this game to the ScummVM team\n", md5str); } - return new GobEngine(detector, syst, features); + return new GobEngine(syst, features); } REGISTER_PLUGIN(GOB, "Gob Engine"); diff --git a/engines/gob/gob.h b/engines/gob/gob.h index a3e53787d4..8d2bb1271a 100644 --- a/engines/gob/gob.h +++ b/engines/gob/gob.h @@ -85,10 +85,10 @@ class GobEngine : public Engine { protected: int go(); - int init(GameDetector &detector); + int init(); public: - GobEngine(GameDetector * detector, OSystem * syst, uint32 features); + GobEngine(OSystem *syst, uint32 features); virtual ~GobEngine(); void shutdown(); |