[Scummvm-cvs-logs] SF.net SVN: scummvm: [25826] scummvm/trunk/engines/scumm/plugin.cpp

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sat Feb 24 20:15:10 CET 2007


Revision: 25826
          http://scummvm.svn.sourceforge.net/scummvm/?rev=25826&view=rev
Author:   fingolfin
Date:     2007-02-24 11:15:10 -0800 (Sat, 24 Feb 2007)

Log Message:
-----------
SCUMM: Try to distinguish between indy3, indy3Towns, zakTowns, loomTowns in the fallback (non-MD5) detection code

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/plugin.cpp

Modified: scummvm/trunk/engines/scumm/plugin.cpp
===================================================================
--- scummvm/trunk/engines/scumm/plugin.cpp	2007-02-24 18:39:08 UTC (rev 25825)
+++ scummvm/trunk/engines/scumm/plugin.cpp	2007-02-24 19:15:10 UTC (rev 25826)
@@ -1313,12 +1313,11 @@
 				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 @@
 			  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...


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