From 248d9db3b18623c8e31b18cab1feb8967d882f93 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Wed, 11 Feb 2009 23:22:52 +0000 Subject: Restore correct camera values for old saves games of FT, Dig, and COMI. svn-id: r36274 --- engines/scumm/saveload.cpp | 11 +++++++++++ engines/scumm/saveload.h | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'engines/scumm') 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 -- cgit v1.2.3