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/agos | |
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/agos')
-rw-r--r-- | engines/agos/agos.cpp | 6 | ||||
-rw-r--r-- | engines/agos/agos.h | 1 | ||||
-rw-r--r-- | engines/agos/detection.cpp | 13 |
3 files changed, 4 insertions, 16 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp index 09249a2535..ccb53bec77 100644 --- a/engines/agos/agos.cpp +++ b/engines/agos/agos.cpp @@ -525,12 +525,6 @@ AGOSEngine::AGOSEngine(OSystem *syst) } int AGOSEngine::init() { - // Detect game - if (!initGame()) { - GUIErrorMessage("No valid games were found in the specified directory."); - return -1; - } - if (getGameId() == GID_DIMP) { _screenWidth = 496; _screenHeight = 400; diff --git a/engines/agos/agos.h b/engines/agos/agos.h index bf64a3bf84..2d7f871ed7 100644 --- a/engines/agos/agos.h +++ b/engines/agos/agos.h @@ -179,7 +179,6 @@ public: const AGOSGameDescription *_gameDescription; - bool initGame(void); virtual void setupGame(); int getGameId() const; diff --git a/engines/agos/detection.cpp b/engines/agos/detection.cpp index 268b62cab2..c309ccfecd 100644 --- a/engines/agos/detection.cpp +++ b/engines/agos/detection.cpp @@ -129,24 +129,19 @@ bool engineCreateAgos(OSystem *syst, Engine **engine, Common::EncapsulatedADGame res = false; error("AGOS engine: unknown gameType"); } + if (res) { + ((AGOS::AGOSEngine *)*engine)->_gameDescription = gd; + } return res; } -ADVANCED_DETECTOR_DEFINE_PLUGIN_WITH_COMPLEX_CREATION(AGOS, engineCreateAgos, detectionParams); +ADVANCED_DETECTOR_DEFINE_PLUGIN(AGOS, engineCreateAgos, detectionParams); REGISTER_PLUGIN(AGOS, "AGOS", "AGOS (C) Adventure Soft"); namespace AGOS { -bool AGOSEngine::initGame() { - Common::EncapsulatedADGameDesc encapsulatedDesc = Common::AdvancedDetector::detectBestMatchingGame(detectionParams); - _gameDescription = (const AGOSGameDescription *)(encapsulatedDesc.realDesc); - - return (_gameDescription != 0); -} - - int AGOSEngine::getGameId() const { return _gameDescription->gameId; } |