diff options
-rw-r--r-- | scumm/saveload.cpp | 7 | ||||
-rw-r--r-- | scumm/saveload.h | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp index b2e806732b..56d40c15bf 100644 --- a/scumm/saveload.cpp +++ b/scumm/saveload.cpp @@ -183,6 +183,13 @@ bool ScummEngine::loadState(int slot, bool compat) { if (_screenTop < 0) _screenTop = 0; + if (hdr.ver < VER(33) && _version >= 7) { + // For a long time, we didn't set these vars to default values. + VAR(VAR_DEFAULT_TALK_DELAY) = 60; + if (_version == 7) + VAR(VAR_NUM_GLOBAL_OBJS) = _numGlobalObjects - 1; + } + if (hdr.ver < VER(32) && _heversion == 70) { roomptr = getResourceAddress(rtRoom, _roomResource); const byte *ptr = findResourceData(MKID('REMP'), roomptr); diff --git a/scumm/saveload.h b/scumm/saveload.h index 389a215a9e..f5298251ae 100644 --- a/scumm/saveload.h +++ b/scumm/saveload.h @@ -32,7 +32,7 @@ namespace Scumm { // Can be useful for other ports too :) #define VER(x) x -#define CURRENT_VER 32 +#define CURRENT_VER 33 // To work around a warning in GCC 3.2 (and 3.1 ?) regarding non-POD types, // we use a small trick: instead of 0 we use 42. Why? Well, it seems newer GCC |