Add possibility to see exact md5s of your game and save when they don't

match. It's on debuglevel 1.

svn-id: r19069
This commit is contained in:
Eugene Sandulenko 2005-10-13 23:20:41 +00:00
parent 7664cbcc74
commit bd4340f21a

View File

@ -926,7 +926,13 @@ void ScummEngine::saveOrLoad(Serializer *s, uint32 savegameVersion) {
// MD5 Operations: Backup on load, compare, and reset.
if (s->isLoading())
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);
}