aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/saveload.cpp11
-rw-r--r--engines/scumm/saveload.h2
2 files changed, 12 insertions, 1 deletions
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index 577e338384..577c465bdd 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -362,6 +362,17 @@ bool ScummEngine::loadState(int slot, bool compat) {
_scummVars[VAR_CAMERA_ACCEL_Y] = _scummVars[110];
}
+ // For a long time, we used incorrect values for some camera related
+ // scumm vars. We now know the proper values. To be able to properly use
+ // old save games, we update the old (bad) values to the new (correct)
+ // ones.
+ if (hdr.ver < VER(77) && _game.version >= 7) {
+ _scummVars[VAR_CAMERA_THRESHOLD_X] = 100;
+ _scummVars[VAR_CAMERA_THRESHOLD_Y] = 70;
+ _scummVars[VAR_CAMERA_ACCEL_X] = 100;
+ _scummVars[VAR_CAMERA_ACCEL_Y] = 100;
+ }
+
// With version 22, we replaced the scale items with scale slots. So when
// loading such an old save game, try to upgrade the old to new format.
if (hdr.ver < VER(22)) {
diff --git a/engines/scumm/saveload.h b/engines/scumm/saveload.h
index 8ed1ba1307..29184ad023 100644
--- a/engines/scumm/saveload.h
+++ b/engines/scumm/saveload.h
@@ -50,7 +50,7 @@ namespace Scumm {
* only saves/loads those which are valid for the version of the savegame
* which is being loaded/saved currently.
*/
-#define CURRENT_VER 76
+#define CURRENT_VER 77
/**
* An auxillary macro, used to specify savegame versions. We use this instead