aboutsummaryrefslogtreecommitdiff
path: root/engines/gargoyle
diff options
context:
space:
mode:
authorPaul Gilbert2018-11-03 21:05:59 -0700
committerPaul Gilbert2018-12-08 19:05:59 -0800
commitce582aab000187a646dab6cc978b821da4660940 (patch)
tree0cdb063eefbbe54066d893727f45e30efe043eb4 /engines/gargoyle
parent8333aed5c2952ff7aa46870cac93acb595a67f14 (diff)
downloadscummvm-rg350-ce582aab000187a646dab6cc978b821da4660940.tar.gz
scummvm-rg350-ce582aab000187a646dab6cc978b821da4660940.tar.bz2
scummvm-rg350-ce582aab000187a646dab6cc978b821da4660940.zip
GLK: Further work on game detection
Diffstat (limited to 'engines/gargoyle')
-rw-r--r--engines/gargoyle/detection.cpp21
1 files 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)