From ce582aab000187a646dab6cc978b821da4660940 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 3 Nov 2018 21:05:59 -0700 Subject: GLK: Further work on game detection --- engines/gargoyle/detection.cpp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/engines/gargoyle/detection.cpp b/engines/gargoyle/detection.cpp index ffd7fa9cd5..5167440e39 100644 --- a/engines/gargoyle/detection.cpp +++ b/engines/gargoyle/detection.cpp @@ -162,25 +162,32 @@ DetectedGames GargoyleMetaEngine::detectGames(const Common::FSList &fslist) cons static Gargoyle::GargoyleGameDescription gameDescription; ADDetectedGames GargoyleMetaEngine::detectGame(const Common::FSNode &parent, const FileMap &allFiles, Common::Language language, Common::Platform platform, const Common::String &extra) const { - ADDetectedGames detectedGames; static char gameId[100]; strcpy(gameId, ConfMan.get("gameid").c_str()); Common::String filename = ConfMan.get("filename"); + + Common::FSList fslist; + DetectedGames detectedGames; + fslist.push_back(parent.getChild(filename)); + ADDetectedGames results; Common::File f; - if (f.open(parent.getChild(filename))) { + Gargoyle::Scott::ScottMetaEngine::detectGames(fslist, detectedGames); + if (detectedGames.size() > 0 && f.open(parent.getChild(filename))) { + DetectedGame gd = detectedGames.front(); + + gameDescription._interpType = Gargoyle::INTERPRETER_SCOTT; gameDescription._desc.gameId = gameId; - gameDescription._desc.language = language; - gameDescription._desc.platform = platform; - gameDescription._desc.extra = extra.c_str(); + gameDescription._desc.language = gd.language; + gameDescription._desc.platform = gd.platform; gameDescription._filename = filename; gameDescription._md5 = Common::computeStreamMD5AsString(f, 5000); ADDetectedGame dg((ADGameDescription *)&gameDescription); - detectedGames.push_back(dg); + results.push_back(dg); } - return detectedGames; + return results; } #if PLUGIN_ENABLED_DYNAMIC(GARGOYLE) -- cgit v1.2.3