diff options
author | Eugene Sandulenko | 2007-11-03 21:06:58 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2007-11-03 21:06:58 +0000 |
commit | c640d1c604f219a5be5412d6c5ea8a85f44ec4b4 (patch) | |
tree | 5d6efb4954efb93e4d6e2f71a37486a666ee20ce /engines/agi/detection.cpp | |
parent | c06905149286c3fbd803d3ca7522bbe66a6ad129 (diff) | |
download | scummvm-rg350-c640d1c604f219a5be5412d6c5ea8a85f44ec4b4.tar.gz scummvm-rg350-c640d1c604f219a5be5412d6c5ea8a85f44ec4b4.tar.bz2 scummvm-rg350-c640d1c604f219a5be5412d6c5ea8a85f44ec4b4.zip |
Patch #1825276: "DETECTION: advanced detector engine simplification"
svn-id: r29386
Diffstat (limited to 'engines/agi/detection.cpp')
-rw-r--r-- | engines/agi/detection.cpp | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp index 9bb767f7d8..2b64913992 100644 --- a/engines/agi/detection.cpp +++ b/engines/agi/detection.cpp @@ -2253,13 +2253,13 @@ bool engineCreateAgi(OSystem *syst, Engine **engine, Common::EncapsulatedADGameD switch (gd->gameType) { case Agi::GType_PreAGI: - *engine = new Agi::PreAgiEngine(syst); + *engine = new Agi::PreAgiEngine(syst, gd); break; case Agi::GType_V2: - *engine = new Agi::AgiEngine(syst); + *engine = new Agi::AgiEngine(syst, gd); break; case Agi::GType_V3: - *engine = new Agi::AgiEngine(syst); + *engine = new Agi::AgiEngine(syst, gd); break; default: res = false; @@ -2269,25 +2269,7 @@ bool engineCreateAgi(OSystem *syst, Engine **engine, Common::EncapsulatedADGameD return res; } -ADVANCED_DETECTOR_DEFINE_PLUGIN_WITH_COMPLEX_CREATION(AGI, engineCreateAgi, detectionParams); +ADVANCED_DETECTOR_DEFINE_PLUGIN(AGI, engineCreateAgi, detectionParams); REGISTER_PLUGIN(AGI, "AGI preAGI + v2 + v3 Engine", "Sierra AGI Engine (C) Sierra On-Line Software"); -namespace Agi { - -bool AgiEngine::initGame() { - Common::EncapsulatedADGameDesc encapsulatedDesc = Common::AdvancedDetector::detectBestMatchingGame(detectionParams); - _gameDescription = (const AGIGameDescription *)(encapsulatedDesc.realDesc); - - return (_gameDescription != 0); -} - -bool PreAgiEngine::initGame() { - Common::EncapsulatedADGameDesc encapsulatedDesc = Common::AdvancedDetector::detectBestMatchingGame(detectionParams); - _gameDescription = (const AGIGameDescription *)(encapsulatedDesc.realDesc); - - return (_gameDescription != 0); -} - -} // End of namespace Agi - |