aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/savegame.cpp
diff options
context:
space:
mode:
authorColin Snover2017-02-24 12:15:57 -0600
committerColin Snover2017-04-22 13:01:37 -0500
commite504efe4da62b3d2e32ffb895b935080be02aed4 (patch)
treeeb8b452309c90ad667039599d743a80bd50cd2fd /engines/sci/engine/savegame.cpp
parent399551af09420e0b97ce4ee82d0bf368964e1333 (diff)
downloadscummvm-rg350-e504efe4da62b3d2e32ffb895b935080be02aed4.tar.gz
scummvm-rg350-e504efe4da62b3d2e32ffb895b935080be02aed4.tar.bz2
scummvm-rg350-e504efe4da62b3d2e32ffb895b935080be02aed4.zip
SCI32: Add palette code for late SCI2.1mid+ games
Sometime during SCI2.1mid, the palette manager was changed to save and restore the source palette, and to add in-game gamma correction. Previously, only the vary start and target palettes were saved, and gamma correction was only configurable in SSCI by editing RESOURCE.CFG.
Diffstat (limited to 'engines/sci/engine/savegame.cpp')
-rw-r--r--engines/sci/engine/savegame.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index e6a6af7d17..04715d6034 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -865,10 +865,18 @@ void GfxPalette32::saveLoadWithSerializer(Common::Serializer &s) {
s.syncAsByte(_cycleMap[i]);
}
+ if (g_sci->_features->hasLatePaletteCode() && s.getVersion() >= 41) {
+ s.syncAsSint16LE(_gammaLevel);
+ saveLoadPalette32(s, &_sourcePalette);
+ ++_version;
+ _needsUpdate = true;
+ _gammaChanged = true;
+ }
+
saveLoadOptionalPalette32(s, &_varyTargetPalette);
saveLoadOptionalPalette32(s, &_varyStartPalette);
- // NOTE: _sourcePalette and _nextPalette are not saved
- // by SCI engine
+
+ // _nextPalette is not saved by SSCI
for (int i = 0; i < ARRAYSIZE(_cyclers); ++i) {
PalCycler *cycler = nullptr;