aboutsummaryrefslogtreecommitdiff
path: root/scumm/saveload.cpp
diff options
context:
space:
mode:
authorJames Brown2002-09-24 15:46:09 +0000
committerJames Brown2002-09-24 15:46:09 +0000
commite946431af32cdbe343ca67d7298a501206bad119 (patch)
tree498cd745b207fc0420610dca4c23a36ed68f1eac /scumm/saveload.cpp
parent7c6864efe89791ce29e20c6a30dd9bf9ebc4e9bc (diff)
downloadscummvm-rg350-e946431af32cdbe343ca67d7298a501206bad119.tar.gz
scummvm-rg350-e946431af32cdbe343ca67d7298a501206bad119.tar.bz2
scummvm-rg350-e946431af32cdbe343ca67d7298a501206bad119.zip
Patch 609334: PalManip save/load/init fixes.
Save/Load lines are commented out until the new save/load system is in place. svn-id: r5014
Diffstat (limited to 'scumm/saveload.cpp')
-rw-r--r--scumm/saveload.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/scumm/saveload.cpp b/scumm/saveload.cpp
index 84af9cc3ce..fadcc28645 100644
--- a/scumm/saveload.cpp
+++ b/scumm/saveload.cpp
@@ -397,6 +397,12 @@ void Scumm::saveOrLoad(Serializer *s)
MKLINE(Scumm, _switchRoomEffect2, sleByte),
MKLINE(Scumm, _BgNeedsRedraw, sleByte),
+ // Jamieson630: variables for palManipulate
+ // TODO: Add these next time save game format changes.
+ // MKLINE(Scumm, _palManipStart, sleByte),
+ // MKLINE(Scumm, _palManipEnd, sleByte),
+ // MKLINE(Scumm, _palManipCounter, sleUint16),
+
MKARRAY(Scumm, gfxUsageBits[0], sleUint32, 200),
MKLINE(Scumm, gdi._transparency, sleByte),
MKARRAY(Scumm, _currentPalette[0], sleByte, 768),
@@ -502,6 +508,12 @@ void Scumm::saveOrLoad(Serializer *s)
MKLINE(Scumm, _switchRoomEffect2, sleByte),
MKLINE(Scumm, _BgNeedsRedraw, sleByte),
+ // Jamieson630: variables for palManipulate
+ // TODO: Add these next time save game format changes.
+ // MKLINE(Scumm, _palManipStart, sleByte),
+ // MKLINE(Scumm, _palManipEnd, sleByte),
+ // MKLINE(Scumm, _palManipCounter, sleUint16),
+
MKARRAY(Scumm, gfxUsageBits[0], sleUint32, 200),
MKLINE(Scumm, gdi._transparency, sleByte),
MKARRAY(Scumm, _currentPalette[0], sleByte, 768),
@@ -633,6 +645,16 @@ void Scumm::saveOrLoad(Serializer *s)
if (_shadowPaletteSize)
s->saveLoadArrayOf(_shadowPalette, _shadowPaletteSize, 1, sleByte);
+ _palManipCounter = 0; // TODO: Remove this once it's being loaded from disk
+ if (_palManipCounter) {
+ if (!_palManipPalette)
+ _palManipPalette = (byte *)calloc(0x300, 1);
+ if (!_palManipIntermediatePal)
+ _palManipPalette = (byte *)calloc(0x300, 1);
+ s->saveLoadArrayOf(_palManipPalette, 0x300, 1, sleByte);
+ s->saveLoadArrayOf(_palManipIntermediatePal, 0x600, 1, sleByte);
+ }
+
s->saveLoadArrayOf(_classData, _numGlobalObjects, sizeof(_classData[0]), sleUint32);
var120Backup = _vars[120];