[Scummvm-cvs-logs] CVS: scummvm/scumm scumm.cpp,1.594,1.595

Eugene Sandulenko sev at users.sourceforge.net
Mon Oct 10 16:16:03 CEST 2005


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26156

Modified Files:
	scumm.cpp 
Log Message:
Fix regression with samnmax floppy. Game just crashed on resources opening.


Index: scumm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.cpp,v
retrieving revision 1.594
retrieving revision 1.595
diff -u -d -r1.594 -r1.595
--- scumm.cpp	8 Oct 2005 21:34:59 -0000	1.594
+++ scumm.cpp	10 Oct 2005 23:15:09 -0000	1.595
@@ -783,7 +783,6 @@
 	{ "puttzoo", "Zoo Demo", kGenMac },
 	{ "samnmax.000", "Sam & Max Data", kGenAsIs },
 	{ "samnmax.000", "Sam & Max Demo Data", kGenAsIs },
-	{ "samnmax.000", "samnmax.sm0", kGenAsIs }, // Fixes MD5 detection
 	{ "samnmax", "ramnmax", kGenPC }, // Used in some releases of Russian Sam'n'Max
 	{ "samnmax", "samdemo", kGenPC },
 	{ "samnmax", "snmdemo", kGenPC },
@@ -2727,7 +2726,7 @@
 		detectName[0] = '\0';
 
 		// TODO: we need to add cache here
-		for (int method = 0; method < 6; method++) {
+		for (int method = 0; method < 7; method++) {
 			switch (method) {
 			case 0:
 				strcpy(detectName, "00.LFL");
@@ -2750,6 +2749,10 @@
 				strcpy(detectName, base);
 				strcat(detectName, ".000");
 				break;
+			case 6:
+				strcpy(detectName, base);
+				strcat(detectName, ".sm0");
+				break;
 			}
 			strcpy(tempName, detectName);
 
@@ -3061,7 +3064,7 @@
 	int substLastIndex = 0;
 	bool found = false;
 
-	for (int method = 0; method < 5 && !found; method++) {
+	for (int method = 0; method < 6 && !found; method++) {
 		switch (method) {
 		case 0:
 			strcpy(detectName, name);
@@ -3081,6 +3084,10 @@
 			strcpy(detectName, name);
 			strcat(detectName, ".he0");
 			break;
+		case 5:
+			strcpy(detectName, name);
+			strcat(detectName, ".sm0");
+			break;
 		}
 		strcpy(tempName, detectName);
 





More information about the Scummvm-git-logs mailing list