diff options
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; } |