From 7572d2b4f2ac98cf31602d6c5e4ed7399de54a30 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 13 Feb 2007 23:37:44 +0000 Subject: Changed detectBestMatchingGame to return a pointer to a ADGameDescription (or a subclass of it); added a (currently fake) fallback callback entry in ADParams svn-id: r25574 --- engines/agi/detection.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'engines/agi') diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp index 96e74d2da7..920ef287ce 100644 --- a/engines/agi/detection.cpp +++ b/engines/agi/detection.cpp @@ -1741,6 +1741,8 @@ static const Common::ADParams detectionParams = { "agi", // List of files for file-based fallback detection (optional) 0, + // Fallback callback + 0, // Flags Common::kADFlagAugmentPreferredTarget }; @@ -1752,12 +1754,8 @@ REGISTER_PLUGIN(AGI, "AGI v2 + v3 Engine", "Sierra AGI Engine (C) Sierra On-Line namespace Agi { bool AgiEngine::initGame() { - int i = Common::AdvancedDetector::detectBestMatchingGame(detectionParams); - if (i < 0) - return false; - - _gameDescription = &gameDescriptions[i]; - return true; + _gameDescription = (const AGIGameDescription *)Common::AdvancedDetector::detectBestMatchingGame(detectionParams); + return (_gameDescription != 0); } } // End of namespace Agi -- cgit v1.2.3