diff options
author | Max Horn | 2007-02-24 19:15:10 +0000 |
---|---|---|
committer | Max Horn | 2007-02-24 19:15:10 +0000 |
commit | dcc6e2c0bbda92403aef5849d41d4fe7d521fed7 (patch) | |
tree | 81a98d2cf5d930bb43902b0dc05890164ce8d0f7 /engines | |
parent | 11e679845d49f5a13e7311b6e5bebc7827a26878 (diff) | |
download | scummvm-rg350-dcc6e2c0bbda92403aef5849d41d4fe7d521fed7.tar.gz scummvm-rg350-dcc6e2c0bbda92403aef5849d41d4fe7d521fed7.tar.bz2 scummvm-rg350-dcc6e2c0bbda92403aef5849d41d4fe7d521fed7.zip |
SCUMM: Try to distinguish between indy3, indy3Towns, zakTowns, loomTowns in the fallback (non-MD5) detection code
svn-id: r25826
Diffstat (limited to 'engines')
-rw-r--r-- | engines/scumm/plugin.cpp | 40 |
1 files changed, 34 insertions, 6 deletions
diff --git a/engines/scumm/plugin.cpp b/engines/scumm/plugin.cpp index 1b9af7669f..69b4aefdbb 100644 --- a/engines/scumm/plugin.cpp +++ b/engines/scumm/plugin.cpp @@ -1313,12 +1313,11 @@ static bool testGame(const GameSettings *g, const DescMap &fileMD5Map, const Com return false; /* - Considering that we know about *all* TOWNS versions, - and know their MD5s, we could simply rely on this and - if we find something which has an unknown MD5, assume - that it is an (so far unknown) version of Indy3. - However, there are also fan translations of the TOWNS versions, - so we can't really do that. + Considering that we know about *all* TOWNS versions, and + know their MD5s, we could simply rely on this and if we find + something which has an unknown MD5, assume that it is an (so + far unknown) version of Indy3. However, there are also fan + translations of the TOWNS versions, so we can't do that. But we could at least look at the resource headers to distinguish TOWNS versions from regular games: @@ -1346,6 +1345,35 @@ static bool testGame(const GameSettings *g, const DescMap &fileMD5Map, const Com else unknown, do not accept it */ + + // We now try to exclude various possibilities by the presence of certain + // LFL files. Note that we only exclude something based on the *presence* + // of a LFL file here; compared to checking for the absence of files, this + // has the advantage that we are less likely to accidentally exclude demos + // (which, after all, are usually missing many LFL files present in the + // full version of the game). + + // No version of Indy3 has 05.LFL but MM, Loom and Zak all have it + if (g->id == GID_INDY3 && fileMD5Map.contains("05.LFL")) + return false; + + // All versions of Indy3 have 93.LFL, but no other game + if (g->id != GID_INDY3 && fileMD5Map.contains("93.LFL")) + return false; + + // No version of Loom has 48.LFL + if (g->id == GID_LOOM && fileMD5Map.contains("48.LFL")) + return false; + + // No version of Zak has 60.LFL, but most (non-demo) versions of Indy3 have it + if (g->id == GID_ZAK && fileMD5Map.contains("60.LFL")) + return false; + + // All versions of Indy3 and ZakTOWNS have 98.LFL, but no other game + if (g->id == GID_LOOM && fileMD5Map.contains("98.LFL")) + return false; + + } else { // TODO: Unknown file header, deal with it. Maybe an unencrypted // variant... |