[Scummvm-cvs-logs] SF.net SVN: scummvm:[42951] scummvm/trunk

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Thu Jul 30 23:56:04 CEST 2009


Revision: 42951
          http://scummvm.svn.sourceforge.net/scummvm/?rev=42951&view=rev
Author:   fingolfin
Date:     2009-07-30 21:56:04 +0000 (Thu, 30 Jul 2009)

Log Message:
-----------
SCUMM: Properly detect & distinguish the three FM-TOWNS double-demos

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/detection.cpp
    scummvm/trunk/engines/scumm/scumm-md5.h
    scummvm/trunk/tools/scumm-md5.txt

Modified: scummvm/trunk/engines/scumm/detection.cpp
===================================================================
--- scummvm/trunk/engines/scumm/detection.cpp	2009-07-30 21:45:09 UTC (rev 42950)
+++ scummvm/trunk/engines/scumm/detection.cpp	2009-07-30 21:56:04 UTC (rev 42951)
@@ -723,6 +723,32 @@
 	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 @@
 		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);
+		dg["preferredtarget"] = generatePreferredTarget(*x);
 
-		if (x->game.preferredTag) {
-			res = res + "-" + x->game.preferredTag;
+		// 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";
+			}
 		}
 
-		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"] = res;
-
 		dg.setGUIOptions(x->game.guioptions);
 
 		detectedGames.push_back(dg);

Modified: scummvm/trunk/engines/scumm/scumm-md5.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm-md5.h	2009-07-30 21:45:09 UTC (rev 42950)
+++ scummvm/trunk/engines/scumm/scumm-md5.h	2009-07-30 21:56:04 UTC (rev 42951)
@@ -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 @@
 	{ "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 },

Modified: scummvm/trunk/tools/scumm-md5.txt
===================================================================
--- scummvm/trunk/tools/scumm-md5.txt	2009-07-30 21:45:09 UTC (rev 42950)
+++ scummvm/trunk/tools/scumm-md5.txt	2009-07-30 21:56:04 UTC (rev 42951)
@@ -239,7 +239,7 @@
 zak	Misc FM-TOWNS demos
 	2d388339d6050d8ccaa757b64633954e	7520	en	FM-TOWNS	FM-TOWNS	Demo	indy/loom (non-interactive)	khalek
 	77f5c9cc0986eb729c1a6b4c8823bbae	7520	en	FM-TOWNS	FM-TOWNS	Demo	zak/loom (non-interactive)	khalek, Fingolfin
-	3938ee1aa4433fca9d9308c9891172b1	-1	en	FM-TOWNS	FM-TOWNS	Demo	indy/zak (non-interactive)	khalek
+	3938ee1aa4433fca9d9308c9891172b1	7520	en	FM-TOWNS	FM-TOWNS	Demo	indy/zak (non-interactive)	khalek
 
 monkey2	Monkey Island 2: LeChuck's Revenge
 	132bff65e6367c09cc69318ce1b59333	11155	en	Amiga	-	-	v1.0 4/8/92	Fingolfin


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list