[Scummvm-git-logs] scummvm master -> c8975f9ba74002f0524d2dbb216a85dc97f5ce05

sev- sev at scummvm.org
Thu Feb 1 08:05:10 CET 2018


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
c8975f9ba7 Revert "SCUMM: Check for and flag demos correctly"


Commit: c8975f9ba74002f0524d2dbb216a85dc97f5ce05
    https://github.com/scummvm/scummvm/commit/c8975f9ba74002f0524d2dbb216a85dc97f5ce05
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2018-02-01T08:03:39+01:00

Commit Message:
Revert "SCUMM: Check for and flag demos correctly"

There are too many regressions.

Changed paths:
    engines/scumm/detection.cpp
    engines/scumm/detection_tables.h


diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp
index 0592d80..0aa993a 100644
--- a/engines/scumm/detection.cpp
+++ b/engines/scumm/detection.cpp
@@ -489,45 +489,42 @@ static void computeGameSettingsFromMD5(const Common::FSList &fslist, const GameF
 
 	// Compute the precise game settings using gameVariantsTable.
 	for (const GameSettings *g = gameVariantsTable; g->gameid; ++g) {
-		if (g->gameid[0] != 0 && scumm_stricmp(md5Entry->gameid, g->gameid)) continue;
-		// The gameid either matches, or is empty. The latter indicates
-		// a generic entry, currently used for some generic HE settings.
-
-		if (g->variant != 0 && scumm_stricmp(md5Entry->variant, g->variant)) continue;
-		// Variant matches too
-
-		if (g->preferredTag != 0 && scumm_stricmp(md5Entry->extra, g->preferredTag)) continue;
-		// OH, and do check the extra field in the entry too, otherwise we miss demos
-
-		dr.game = *g;
-		dr.game.gameid = md5Entry->gameid;
-
-		// Set the platform value. The value from the MD5 record has
-		// highest priority; if missing (i.e. set to unknown) we try
-		// to use that from the filename pattern record instead.
-		if (md5Entry->platform != Common::kPlatformUnknown) {
-			dr.game.platform = md5Entry->platform;
-		} else if (gfp->platform != Common::kPlatformUnknown) {
-			dr.game.platform = gfp->platform;
-		}
+		if (g->gameid[0] == 0 || !scumm_stricmp(md5Entry->gameid, g->gameid)) {
+			// The gameid either matches, or is empty. The latter indicates
+			// a generic entry, currently used for some generic HE settings.
+			if (g->variant == 0 || !scumm_stricmp(md5Entry->variant, g->variant)) {
+				// Perfect match found, use it and stop the loop
+				dr.game = *g;
+				dr.game.gameid = md5Entry->gameid;
+
+				// Set the platform value. The value from the MD5 record has
+				// highest priority; if missing (i.e. set to unknown) we try
+				// to use that from the filename pattern record instead.
+				if (md5Entry->platform != Common::kPlatformUnknown) {
+					dr.game.platform = md5Entry->platform;
+				} else if (gfp->platform != Common::kPlatformUnknown) {
+					dr.game.platform = gfp->platform;
+				}
 
-		// HACK: Special case to distinguish the V1 demo from the full version
-		// (since they have identical MD5):
-		if (dr.game.id == GID_MANIAC && !strcmp(gfp->pattern, "%02d.MAN")) {
-			dr.extra = "V1 Demo";
-			dr.game.features = GF_DEMO;
-		}
+				// HACK: Special case to distinguish the V1 demo from the full version
+				// (since they have identical MD5):
+				if (dr.game.id == GID_MANIAC && !strcmp(gfp->pattern, "%02d.MAN")) {
+					dr.extra = "V1 Demo";
+					dr.game.features = GF_DEMO;
+				}
 
-		// HACK: Try to detect languages for translated games
-		if (dr.language == UNK_LANG) {
-			dr.language = detectLanguage(fslist, dr.game.id);
-		}
+				// HACK: Try to detect languages for translated games
+				if (dr.language == UNK_LANG) {
+					dr.language = detectLanguage(fslist, dr.game.id);
+				}
 
-		// HACK: Detect between 68k and PPC versions
-		if (dr.game.platform == Common::kPlatformMacintosh && dr.game.version >= 5 && dr.game.heversion == 0 && strstr(gfp->pattern, "Data"))
-			dr.game.features |= GF_MAC_CONTAINER;
+				// HACK: Detect between 68k and PPC versions
+				if (dr.game.platform == Common::kPlatformMacintosh && dr.game.version >= 5 && dr.game.heversion == 0 && strstr(gfp->pattern, "Data"))
+					dr.game.features |= GF_MAC_CONTAINER;
 
-		break;
+				break;
+			}
+		}
 	}
 }
 
diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h
index 5162da8..65891e0 100644
--- a/engines/scumm/detection_tables.h
+++ b/engines/scumm/detection_tables.h
@@ -236,12 +236,12 @@ static const GameSettings gameVariantsTable[] = {
 	{"loom", "VGA",      "vga", GID_LOOM, 4, 0, MDT_NONE,                         GF_AUDIOTRACKS,             Common::kPlatformDOS, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
 	{"loom", "Steam",  "steam", GID_LOOM, 4, 0, MDT_NONE,                         GF_AUDIOTRACKS,  UNK, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
 
-	{"pass", 0, 0, GID_PASS, 4, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB, GF_DEMO | GF_16COLOR, Common::kPlatformDOS, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
+	{"pass", 0, 0, GID_PASS, 4, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB, GF_16COLOR, Common::kPlatformDOS, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
 
 	{"monkey", "VGA",      "vga", GID_MONKEY_VGA, 4, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO1(GUIO_NOSPEECH)},
 	{"monkey", "EGA",      "ega", GID_MONKEY_EGA, 4, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, GF_16COLOR,     Common::kPlatformDOS, GUIO1(GUIO_NOSPEECH)},
 	{"monkey", "No AdLib", "ega", GID_MONKEY_EGA, 4, 0, MDT_PCSPK | MDT_PCJR,                        GF_16COLOR,     Common::kPlatformAtariST, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
-	{"monkey", "Demo",     "ega", GID_MONKEY_EGA, 4, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB, GF_DEMO | GF_16COLOR,     Common::kPlatformDOS, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
+	{"monkey", "Demo",     "ega", GID_MONKEY_EGA, 4, 0, MDT_PCSPK | MDT_PCJR | MDT_CMS | MDT_ADLIB,            GF_16COLOR,     Common::kPlatformDOS, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
 	{"monkey", "CD",           0, GID_MONKEY,     5, 0, MDT_ADLIB,                        GF_AUDIOTRACKS, UNK, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
 	{"monkey", "FM-TOWNS",     0, GID_MONKEY,     5, 0, MDT_TOWNS,                        GF_AUDIOTRACKS, Common::kPlatformFMTowns, GUIO4(GUIO_NOSPEECH, GUIO_NOMIDI, GUIO_MIDITOWNS, GUIO_NOASPECT)},
 	{"monkey", "SEGA",         0, GID_MONKEY,     5, 0, MDT_NONE,                         GF_AUDIOTRACKS, Common::kPlatformSegaCD, GUIO2(GUIO_NOSPEECH, GUIO_NOMIDI)},
@@ -251,21 +251,16 @@ static const GameSettings gameVariantsTable[] = {
 	{"monkey2", "FM-TOWNS", 0, GID_MONKEY2,  5, 0, MDT_PCSPK | MDT_TOWNS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, Common::kPlatformFMTowns, GUIO5(GUIO_NOSPEECH, GUIO_MIDITOWNS, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_NOASPECT)},
 	{"monkey2", "SE Talkie",0, GID_MONKEY2,  5, 0, MDT_PCSPK | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO0()},
 
-	{"atlantis", "Demo", 0, GID_INDY4,    5, 0, MDT_PCSPK | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, GF_DEMO, UNK, GUIO0()},
-	{"atlantis", "", 0, GID_INDY4,    5, 0, MDT_PCSPK | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO0() },
+	{"atlantis", "", 0, GID_INDY4,    5, 0, MDT_PCSPK | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO0()},
 	{"atlantis", "Steam", "steam", GID_INDY4,    5, 0, MDT_PCSPK | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO0()},
 	{"atlantis", "Floppy", 0, GID_INDY4,    5, 0, MDT_PCSPK | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, UNK, GUIO1(GUIO_NOSPEECH)},
 	{"atlantis", "FM-TOWNS", 0, GID_INDY4,    5, 0, MDT_TOWNS | MDT_ADLIB | MDT_MIDI | MDT_PREFER_MT32, 0, Common::kPlatformFMTowns, GUIO4(GUIO_MIDITOWNS, GUIO_MIDIADLIB, GUIO_MIDIMT32, GUIO_NOASPECT)},
 
-	{"tentacle", "Demo", 0, GID_TENTACLE, 6, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_GM, GF_USE_KEY | GF_DEMO, UNK, GUIO0()},
-	{"tentacle", "", 0, GID_TENTACLE, 6, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_GM, GF_USE_KEY, UNK, GUIO0() },
+	{"tentacle", "", 0, GID_TENTACLE, 6, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_GM, GF_USE_KEY, UNK, GUIO0()},
 	{"tentacle", "Floppy", 0, GID_TENTACLE, 6, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_GM, GF_USE_KEY, UNK, GUIO1(GUIO_NOSPEECH)},
 
-	{"samnmax",  "", "", GID_SAMNMAX,  6, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_GM, GF_USE_KEY, UNK, GUIO0()},
-	{"samnmax",  "Demo", "", GID_SAMNMAX,  6, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_GM, GF_DEMO | GF_USE_KEY, UNK, GUIO0()},
-	{"samnmax",  "Floppy", "", GID_SAMNMAX,  6, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_GM, GF_USE_KEY, UNK, GUIO1(GUIO_NOSPEECH)},
-	{"samnmax",  "Demo", "", GID_SAMNMAX,  6, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_GM, GF_DEMO | GF_USE_KEY, UNK, GUIO1(GUIO_NOSPEECH)},
-	{"samnmax",  "WIP Demo", "", GID_SAMNMAX,  6, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_GM, GF_DEMO | GF_USE_KEY, UNK, GUIO1(GUIO_NOSPEECH)},
+	{"samnmax",  "", 0, GID_SAMNMAX,  6, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_GM, GF_USE_KEY, UNK, GUIO0()},
+	{"samnmax",  "Floppy", 0, GID_SAMNMAX,  6, 0, MDT_ADLIB | MDT_MIDI | MDT_PREFER_GM, GF_USE_KEY, UNK, GUIO1(GUIO_NOSPEECH)},
 
 #ifdef ENABLE_SCUMM_7_8
 	{"ft",   "", 0, GID_FT,  7, 0, MDT_NONE, 0, UNK, GUIO1(GUIO_NOMIDI)},





More information about the Scummvm-git-logs mailing list