aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2006-01-14 16:33:24 +0000
committerEugene Sandulenko2006-01-14 16:33:24 +0000
commita5378976d021bdf8bd63fd7bd7b1723c8709c64d (patch)
tree1eefd38a5cef6eab61224d43de521d19e6b25ddc
parent323a25bd04a256cf80041c74ea19a849614510c7 (diff)
downloadscummvm-rg350-a5378976d021bdf8bd63fd7bd7b1723c8709c64d.tar.gz
scummvm-rg350-a5378976d021bdf8bd63fd7bd7b1723c8709c64d.tar.bz2
scummvm-rg350-a5378976d021bdf8bd63fd7bd7b1723c8709c64d.zip
Print out save version and stored MD5 on debug level 2.
svn-id: r20028
-rw-r--r--scumm/saveload.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp
index 637d99cddb..782997e682 100644
--- a/scumm/saveload.cpp
+++ b/scumm/saveload.cpp
@@ -924,17 +924,22 @@ void ScummEngine::saveOrLoad(Serializer *s) {
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