[Scummvm-cvs-logs] CVS: scummvm/scumm saveload.cpp,1.259,1.260

Eugene Sandulenko sev at users.sourceforge.net
Sat Jan 14 08:34:02 CET 2006


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

Modified Files:
	saveload.cpp 
Log Message:
Print out save version and stored MD5 on debug level 2.


Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v
retrieving revision 1.259
retrieving revision 1.260
diff -u -d -r1.259 -r1.260
--- saveload.cpp	10 Jan 2006 21:39:13 -0000	1.259
+++ saveload.cpp	14 Jan 2006 16:33:24 -0000	1.260
@@ -924,17 +924,22 @@
 	s->saveLoadEntries(this, mainEntries);
 
 	// MD5 Operations: Backup on load, compare, and reset.
-	if (s->isLoading())
+	if (s->isLoading()) {
+		char md5str1[32+1], md5str2[32+1];
+		for (j = 0; j < 16; j++) {
+			sprintf(md5str1 + j*2, "%02x", (int)_gameMD5[j]);
+			sprintf(md5str2 + j*2, "%02x", (int)md5Backup[j]);
+		}
+
+		debug(2, "Save version: %d", s->getVersion());
+		debug(2, "Saved game MD5: %s", (s->getVersion() >= 39) ? md5str1 : "unknown");
+
 		if (memcmp(md5Backup, _gameMD5, 16) != 0) {
-			char md5str1[32+1], md5str2[32+1];
-			for (j = 0; j < 16; j++) {
-				sprintf(md5str1 + j*2, "%02x", (int)_gameMD5[j]);
-				sprintf(md5str2 + j*2, "%02x", (int)md5Backup[j]);
-			}
 			warning("Game was saved with different gamedata - you may encounter problems.");
 			debug(1, "You have %s and save is %s.", md5str2, md5str1);
  			memcpy(_gameMD5, md5Backup, 16);
 		}
+	}
 
 
 	// Starting V14, we extended the usage bits, to be able to cope with games





More information about the Scummvm-git-logs mailing list