aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorMax Horn2009-07-30 21:56:04 +0000
committerMax Horn2009-07-30 21:56:04 +0000
commit91434bd9c522f7d2c998d9f503916dc77015f26c (patch)
tree3797521b06598db73343bf12ff68239d28fb047c /engines/scumm
parent3f673b899df123feb4a659e44a49116fc2d8c1da (diff)
downloadscummvm-rg350-91434bd9c522f7d2c998d9f503916dc77015f26c.tar.gz
scummvm-rg350-91434bd9c522f7d2c998d9f503916dc77015f26c.tar.bz2
scummvm-rg350-91434bd9c522f7d2c998d9f503916dc77015f26c.zip
SCUMM: Properly detect & distinguish the three FM-TOWNS double-demos
svn-id: r42951
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/detection.cpp72
-rw-r--r--engines/scumm/scumm-md5.h4
2 files changed, 51 insertions, 25 deletions
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp
index 5fa74d22c3..8beb2ef720 100644
--- a/engines/scumm/detection.cpp
+++ b/engines/scumm/detection.cpp
@@ -723,6 +723,32 @@ GameDescriptor ScummMetaEngine::findGame(const char *gameid) const {
return AdvancedDetector::findGameID(gameid, gameDescriptions, obsoleteGameIDsTable);
}
+static Common::String generatePreferredTarget(const DetectorResult &x) {
+ Common::String res(x.game.gameid);
+
+ if (x.game.preferredTag) {
+ res = res + "-" + x.game.preferredTag;
+ }
+
+ if (x.game.features & GF_DEMO) {
+ res = res + "-demo";
+ }
+
+ // Append the platform, if a non-standard one has been specified.
+ if (x.game.platform != Common::kPlatformPC && x.game.platform != Common::kPlatformUnknown) {
+ // HACK: For CoMI, it's pointless to encode the fact that it's for Windows
+ if (x.game.id != GID_CMI)
+ res = res + "-" + Common::getPlatformAbbrev(x.game.platform);
+ }
+
+ // Append the language, if a non-standard one has been specified
+ if (x.language != Common::EN_ANY && x.language != Common::UNK_LANG) {
+ res = res + "-" + Common::getLanguageCode(x.language);
+ }
+
+ return res;
+}
+
GameList ScummMetaEngine::detectGames(const Common::FSList &fslist) const {
GameList detectedGames;
Common::List<DetectorResult> results;
@@ -737,34 +763,34 @@ GameList ScummMetaEngine::detectGames(const Common::FSList &fslist) const {
const PlainGameDescriptor *g = findPlainGameDescriptor(x->game.gameid, gameDescriptions);
assert(g);
GameDescriptor dg(x->game.gameid, g->description, x->language, x->game.platform);
- dg.updateDesc(x->extra); // Append additional information, if set, to the description.
+
+ // Append additional information, if set, to the description.
+ dg.updateDesc(x->extra);
// Compute and set the preferred target name for this game.
// Based on generateComplexID() in advancedDetector.cpp.
- Common::String res(x->game.gameid);
-
- if (x->game.preferredTag) {
- res = res + "-" + x->game.preferredTag;
- }
-
- if (x->game.features & GF_DEMO) {
- res = res + "-demo";
- }
-
- // Append the platform, if a non-standard one has been specified.
- if (x->game.platform != Common::kPlatformPC && x->game.platform != Common::kPlatformUnknown) {
- // HACK: For CoMI, it's pointless to encode the fact that it's for Windows
- if (x->game.id != GID_CMI)
- res = res + "-" + Common::getPlatformAbbrev(x->game.platform);
- }
-
- // Append the language, if a non-standard one has been specified
- if (x->language != Common::EN_ANY && x->language != Common::UNK_LANG) {
- res = res + "-" + Common::getLanguageCode(x->language);
+ dg["preferredtarget"] = generatePreferredTarget(*x);
+
+ // HACK: Detect and distinguish the FM-TOWNS demos
+ if (x->game.platform == Common::kPlatformFMTowns && (x->game.features & GF_DEMO)) {
+ if (x->md5 == "2d388339d6050d8ccaa757b64633954e") {
+ // Indy + Loom demo
+ dg.description() = "Indiana Jones and the Last Crusade & Loom";
+ dg.updateDesc(x->extra);
+ dg["preferredtarget"] = "indyloom";
+ } else if (x->md5 == "77f5c9cc0986eb729c1a6b4c8823bbae") {
+ // Zak + Loom demo
+ dg.description() = "Zak McKracken & Loom";
+ dg.updateDesc(x->extra);
+ dg["preferredtarget"] = "zakloom";
+ } else if (x->md5 == "3938ee1aa4433fca9d9308c9891172b1") {
+ // Indy + Zak demo
+ dg.description() = "Indiana Jones and the Last Crusade & Zak McKracken";
+ dg.updateDesc(x->extra);
+ dg["preferredtarget"] = "indyzak";
+ }
}
- dg["preferredtarget"] = res;
-
dg.setGUIOptions(x->game.guioptions);
detectedGames.push_back(dg);
diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h
index d9c205fc72..cb7f906f13 100644
--- a/engines/scumm/scumm-md5.h
+++ b/engines/scumm/scumm-md5.h
@@ -1,5 +1,5 @@
/*
- This file was generated by the md5table tool on Fri Jul 24 04:57:45 2009
+ This file was generated by the md5table tool on Thu Jul 30 10:23:41 2009
DO NOT EDIT MANUALLY!
*/
@@ -157,7 +157,7 @@ static const MD5Table md5table[] = {
{ "3824e60cdf639d22f6df92a03dc4b131", "fbear", "HE 61", "", 7732, Common::EN_ANY, Common::kPlatformPC },
{ "387a544b8b10b26912d8413bab63a853", "monkey2", "", "Demo", -1, Common::EN_ANY, Common::kPlatformPC },
{ "3905799e081b80a61d4460b7b733c206", "maniac", "NES", "", 262144, Common::EN_USA, Common::kPlatformNES },
- { "3938ee1aa4433fca9d9308c9891172b1", "zak", "FM-TOWNS", "Demo", -1, Common::EN_ANY, Common::kPlatformFMTowns },
+ { "3938ee1aa4433fca9d9308c9891172b1", "zak", "FM-TOWNS", "Demo", 7520, Common::EN_ANY, Common::kPlatformFMTowns },
{ "399b217b0c8d65d0398076da486363a9", "indy3", "VGA", "VGA", 6295, Common::DE_DEU, Common::kPlatformPC },
{ "39cb9dec16fa16f38d79acd80effb059", "loom", "EGA", "EGA", -1, Common::FR_FRA, Common::kPlatformAmiga },
{ "39cb9dec16fa16f38d79acd80effb059", "loom", "EGA", "EGA", -1, Common::IT_ITA, Common::kPlatformAmiga },