diff options
author | Max Horn | 2007-02-13 23:37:44 +0000 |
---|---|---|
committer | Max Horn | 2007-02-13 23:37:44 +0000 |
commit | 7572d2b4f2ac98cf31602d6c5e4ed7399de54a30 (patch) | |
tree | d96c82e9cae2736feef9b6d5ac7801273c5107a7 /engines/gob | |
parent | de02e840a6dd619e221a750b0b2a63d157f05114 (diff) | |
download | scummvm-rg350-7572d2b4f2ac98cf31602d6c5e4ed7399de54a30.tar.gz scummvm-rg350-7572d2b4f2ac98cf31602d6c5e4ed7399de54a30.tar.bz2 scummvm-rg350-7572d2b4f2ac98cf31602d6c5e4ed7399de54a30.zip |
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
Diffstat (limited to 'engines/gob')
-rw-r--r-- | engines/gob/detection.cpp | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/engines/gob/detection.cpp b/engines/gob/detection.cpp index 7140892787..8dca4c4eb7 100644 --- a/engines/gob/detection.cpp +++ b/engines/gob/detection.cpp @@ -913,6 +913,8 @@ static const ADParams detectionParams = { "gob", // List of files for file-based fallback detection (optional) Gob::fileBased, + // Fallback callback + 0, // Flags kADFlagAugmentPreferredTarget }; @@ -925,25 +927,27 @@ REGISTER_PLUGIN(GOB, "Gob Engine", "Goblins Games (C) Coktel Vision"); namespace Gob { bool GobEngine::detectGame() { - int i = AdvancedDetector::detectBestMatchingGame(detectionParams); + const GOBGameDescription *gd = (const GOBGameDescription *)Common::AdvancedDetector::detectBestMatchingGame(detectionParams); + if (gd == 0) + return false; - if (gameDescriptions[i].startTotBase == 0) { + if (gd->startTotBase == 0) { _startTot = new char[10]; _startTot0 = new char[11]; strcpy(_startTot, "intro.tot"); strcpy(_startTot0, "intro0.tot"); } else { - _startTot = new char[strlen(gameDescriptions[i].startTotBase) + 5]; - _startTot0 = new char[strlen(gameDescriptions[i].startTotBase) + 6]; - strcpy(_startTot, gameDescriptions[i].startTotBase); - strcpy(_startTot0, gameDescriptions[i].startTotBase); + _startTot = new char[strlen(gd->startTotBase) + 5]; + _startTot0 = new char[strlen(gd->startTotBase) + 6]; + strcpy(_startTot, gd->startTotBase); + strcpy(_startTot0, gd->startTotBase); strcat(_startTot, ".tot"); strcat(_startTot0, "0.tot"); } - _features = gameDescriptions[i].features; - _language = gameDescriptions[i].desc.language; - _platform = gameDescriptions[i].desc.platform; + _features = gd->features; + _language = gd->desc.language; + _platform = gd->desc.platform; return true; } |