[Scummvm-cvs-logs] CVS: scummvm/scumm saveload.cpp,1.212,1.213 saveload.h,1.56,1.57
Max Horn
fingolfin at users.sourceforge.net
Tue Apr 26 07:25:14 CEST 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.462,2.463 saveload.cpp,1.211,1.212 saveload.h,1.55,1.56
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm palette.cpp,2.39,2.40 room.cpp,1.9,1.10
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21604
Modified Files:
saveload.cpp saveload.h
Log Message:
Make use of the new loadRoomSubBlocks (which only loads static room data now) in the save/load code; this also means we have to save a bit less data, and reduce code duplication
Index: saveload.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.cpp,v
retrieving revision 1.212
retrieving revision 1.213
diff -u -d -r1.212 -r1.213
--- saveload.cpp 26 Apr 2005 14:01:34 -0000 1.212
+++ saveload.cpp 26 Apr 2005 14:18:32 -0000 1.213
@@ -97,7 +97,6 @@
int i, j;
SaveGameHeader hdr;
int sb, sh;
- byte *roomptr;
makeSavegameName(filename, slot, compat);
if (!(in = _saveFileMan->openForLoading(filename)))
@@ -212,18 +211,6 @@
VAR(VAR_NUM_GLOBAL_OBJS) = _numGlobalObjects - 1;
}
- if (_heversion == 70) {
- roomptr = getResourceAddress(rtRoom, _roomResource);
- const byte *ptr = findResourceData(MKID('REMP'), roomptr);
- if (ptr) {
- for (i = 0; i < 256; i++)
- _HEV7ActorPalette[i] = *ptr++;
- } else {
- for (i = 0; i < 256; i++)
- _HEV7ActorPalette[i] = i;
- }
- }
-
if (hdr.ver < VER(30)) {
// For a long time, we used incorrect location, causing it to default to zero.
if (_version == 8)
@@ -303,9 +290,8 @@
if (hdr.ver < VER(35) && _gameId == GID_MANIAC && _version == 1)
setupV1ActorTalkColor();
- // Regenerate strip table (for V1/V2 games)
- roomptr = getResourceAddress(rtRoom, _roomResource);
- gdi.roomChanged(roomptr, _IM00_offs);
+ // Load the static room data
+ loadRoomSubBlocks();
if (!(_features & GF_NEW_CAMERA)) {
camera._last.x = camera._cur.x;
@@ -454,20 +440,20 @@
const SaveLoadEntry mainEntries[] = {
MKARRAY(ScummEngine, _gameMD5[0], sleUint8, 16, VER(39)),
- MKLINE(ScummEngine, _roomWidth, sleUint16, VER(8)),
- MKLINE(ScummEngine, _roomHeight, sleUint16, VER(8)),
- MKLINE(ScummEngine, _ENCD_offs, sleUint32, VER(8)),
- MKLINE(ScummEngine, _EXCD_offs, sleUint32, VER(8)),
- MKLINE(ScummEngine, _IM00_offs, sleUint32, VER(8)),
- MKLINE(ScummEngine, _CLUT_offs, sleUint32, VER(8)),
+ MK_OBSOLETE(ScummEngine, _roomWidth, sleUint16, VER(8), VER(50)),
+ MK_OBSOLETE(ScummEngine, _roomHeight, sleUint16, VER(8), VER(50)),
+ MK_OBSOLETE(ScummEngine, _ENCD_offs, sleUint32, VER(8), VER(50)),
+ MK_OBSOLETE(ScummEngine, _EXCD_offs, sleUint32, VER(8), VER(50)),
+ MK_OBSOLETE(ScummEngine, _IM00_offs, sleUint32, VER(8), VER(50)),
+ MK_OBSOLETE(ScummEngine, _CLUT_offs, sleUint32, VER(8), VER(50)),
MK_OBSOLETE(ScummEngine, _EPAL_offs, sleUint32, VER(8), VER(9)),
- MKLINE(ScummEngine, _PALS_offs, sleUint32, VER(8)),
+ MK_OBSOLETE(ScummEngine, _PALS_offs, sleUint32, VER(8), VER(50)),
MKLINE(ScummEngine, _curPalIndex, sleByte, VER(8)),
MKLINE(ScummEngine, _currentRoom, sleByte, VER(8)),
MKLINE(ScummEngine, _roomResource, sleByte, VER(8)),
MKLINE(ScummEngine, _numObjectsInRoom, sleByte, VER(8)),
MKLINE(ScummEngine, _currentScript, sleByte, VER(8)),
- MKARRAY(ScummEngine, _localScriptOffsets[0], sleUint32, _numLocalScripts, VER(8)),
+ MK_OBSOLETE_ARRAY(ScummEngine, _localScriptOffsets[0], sleUint32, _numLocalScripts, VER(8), VER(50)),
// vm.localvar grew from 25 to 40 script entries and then from
@@ -568,7 +554,7 @@
MKARRAY_OLD(ScummEngine, gfxUsageBits[0], sleUint32, 410, VER(10), VER(13)),
MKARRAY(ScummEngine, gfxUsageBits[0], sleUint32, 3 * 410, VER(14)),
- MKLINE(ScummEngine, gdi._transparentColor, sleByte, VER(8)),
+ MK_OBSOLETE(ScummEngine, gdi._transparentColor, sleByte, VER(8), VER(50)),
MKARRAY(ScummEngine, _currentPalette[0], sleByte, 768, VER(8)),
// Sam & Max specific palette replaced by _shadowPalette now.
Index: saveload.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/saveload.h,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- saveload.h 26 Apr 2005 14:01:38 -0000 1.56
+++ saveload.h 26 Apr 2005 14:18:34 -0000 1.57
@@ -43,7 +43,7 @@
* only saves/loads those which are valid for the version of the savegame
* which is being loaded/saved currently.
*/
-#define CURRENT_VER 50
+#define CURRENT_VER 51
/**
* An auxillary macro, used to specify savegame versions. We use this instead
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.462,2.463 saveload.cpp,1.211,1.212 saveload.h,1.55,1.56
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm palette.cpp,2.39,2.40 room.cpp,1.9,1.10
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list