[Scummvm-cvs-logs] SF.net SVN: scummvm: [30853] scummvm/branches/branch-0-11-0/engines/agi/ detection.cpp

buddha_ at users.sourceforge.net buddha_ at users.sourceforge.net
Tue Feb 12 16:24:30 CET 2008


Revision: 30853
          http://scummvm.svn.sourceforge.net/scummvm/?rev=30853&view=rev
Author:   buddha_
Date:     2008-02-12 07:24:30 -0800 (Tue, 12 Feb 2008)

Log Message:
-----------
Backport of r30852: Added better AGIPAL autodetect to the AGI's fallback detector (Now checks files 'pal.100' - 'pal.109' rather than just the file 'pal.101').

Modified Paths:
--------------
    scummvm/branches/branch-0-11-0/engines/agi/detection.cpp

Modified: scummvm/branches/branch-0-11-0/engines/agi/detection.cpp
===================================================================
--- scummvm/branches/branch-0-11-0/engines/agi/detection.cpp	2008-02-12 15:20:47 UTC (rev 30852)
+++ scummvm/branches/branch-0-11-0/engines/agi/detection.cpp	2008-02-12 15:24:30 UTC (rev 30853)
@@ -2125,7 +2125,18 @@
 		// so we don't have to change it here.
 		matchedUsingFilenames = true;
 
-		if (allFiles.contains("pal.101")) { // Check if it is AGIPAL
+		// Check for AGIPAL by checking for existence of any of the files "pal.100" - "pal.109"
+		bool agipal = false;
+		char agipalFile[] = "pal.xxx";
+		for (uint i = 100; i <= 109; i++) {
+			sprintf(agipalFile, "pal.%d", i);
+			if (allFiles.contains(agipalFile)) {
+				agipal = true; // We found a file "pal.x" where 100 <= x <= 109 so it's AGIPAL
+				break;
+			}
+		}
+
+		if (agipal) { // Check if it is AGIPAL
 			description = "Unknown v2 AGIPAL Game";
 			g_fallbackDesc.features |= GF_AGIPAL; // Add AGIPAL feature flag
 		} else { // Not AGIPAL so just plain v2


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