[Scummvm-cvs-logs] CVS: scummvm/scumm saveload.cpp,1.136,1.137 saveload.h,1.31,1.32
Max Horn
fingolfin at users.sourceforge.net
Sun Jan 11 11:59:03 CET 2004
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/queen display.cpp,1.53,1.54 display.h,1.39,1.40 graphics.cpp,1.81,1.82 logic.cpp,1.169,1.170
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm debugger.cpp,1.113,1.114 object.cpp,1.158,1.159 script_v2.cpp,2.227,2.228 script_v5.cpp,1.221,1.222 script_v6.cpp,1.250,1.251 scumm.h,1.357,1.358
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv21393
Modified Files:
saveload.cpp saveload.h
Log Message:
fix loading of old COMI savegames (which are based on the bad old camera var locations; note that COMI savegames made between this change and my previous change to vars.cpp may be 'lost' due to this, however that should be minor compared to loosing all previous COMI savegames ;-)
Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v
retrieving revision 1.136
retrieving revision 1.137
diff -u -d -r1.136 -r1.137
--- saveload.cpp 8 Jan 2004 21:21:40 -0000 1.136
+++ saveload.cpp 11 Jan 2004 19:58:28 -0000 1.137
@@ -164,6 +164,23 @@
// it is not, hence we check & correct it here.
if (_screenTop < 0)
_screenTop = 0;
+
+ // 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)
+ // ones.
+ if (hdr.ver <= 27 && _version == 8) {
+ _scummVars[VAR_CAMERA_MIN_X] = _scummVars[101];
+ _scummVars[VAR_CAMERA_MAX_X] = _scummVars[102];
+ _scummVars[VAR_CAMERA_MIN_Y] = _scummVars[103];
+ _scummVars[VAR_CAMERA_MAX_Y] = _scummVars[104];
+ _scummVars[VAR_CAMERA_THRESHOLD_X] = _scummVars[105];
+ _scummVars[VAR_CAMERA_THRESHOLD_Y] = _scummVars[106];
+ _scummVars[VAR_CAMERA_SPEED_X] = _scummVars[107];
+ _scummVars[VAR_CAMERA_SPEED_Y] = _scummVars[108];
+ _scummVars[VAR_CAMERA_ACCEL_X] = _scummVars[109];
+ _scummVars[VAR_CAMERA_ACCEL_Y] = _scummVars[110];
+ }
// We could simply dirty colours 0-15 for 16-colour games -- nowadays
// they handle their palette pretty much like the more recent games
Index: saveload.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- saveload.h 6 Jan 2004 12:45:30 -0000 1.31
+++ saveload.h 11 Jan 2004 19:58:29 -0000 1.32
@@ -32,7 +32,7 @@
// Can be useful for other ports too :)
#define VER(x) x
-#define CURRENT_VER 27
+#define CURRENT_VER 28
// 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
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/queen display.cpp,1.53,1.54 display.h,1.39,1.40 graphics.cpp,1.81,1.82 logic.cpp,1.169,1.170
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm debugger.cpp,1.113,1.114 object.cpp,1.158,1.159 script_v2.cpp,2.227,2.228 script_v5.cpp,1.221,1.222 script_v6.cpp,1.250,1.251 scumm.h,1.357,1.358
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list