aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/scumm/detection.cpp67
-rw-r--r--engines/scumm/detection_tables.h17
2 files changed, 38 insertions, 46 deletions
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp
index 0592d80120..0aa993a53a 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 5162da82ee..65891e0b0d 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)},