aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2004-02-21 08:21:11 +0000
committerTravis Howell2004-02-21 08:21:11 +0000
commitfe667a67be6e1b89f6f95b3be4dd41b3e9c7ad21 (patch)
tree71578e3abfae082516b569dde71eb4707f68a403
parenta4a4c21956f5f2fd08194d0e824bbf2c62d072f3 (diff)
downloadscummvm-rg350-fe667a67be6e1b89f6f95b3be4dd41b3e9c7ad21.tar.gz
scummvm-rg350-fe667a67be6e1b89f6f95b3be4dd41b3e9c7ad21.tar.bz2
scummvm-rg350-fe667a67be6e1b89f6f95b3be4dd41b3e9c7ad21.zip
Correct VAR_CHARINC in old saves.
svn-id: r12955
-rw-r--r--scumm/saveload.cpp4
-rw-r--r--scumm/saveload.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp
index 57cf5730cc..c7316fae56 100644
--- a/scumm/saveload.cpp
+++ b/scumm/saveload.cpp
@@ -179,6 +179,10 @@ bool ScummEngine::loadState(int slot, bool compat, SaveFileManager *mgr) {
if (_screenTop < 0)
_screenTop = 0;
+ // For a long time, we used incorrect location, causing it to default to zero.
+ if (hdr.ver < VER(30) && _version == 8)
+ _scummVars[VAR_CHARINC] = (_features & GF_DEMO) ? 3 : 1;
+
// For a long time, we used incorrect locations for some camera related
// scumm vars. We now know the proper locations. To be able to properly use
// old save games, we update the old (bad) variables to the new (correct)
diff --git a/scumm/saveload.h b/scumm/saveload.h
index f071174619..456f6e9634 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 29
+#define CURRENT_VER 30
// 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