aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorathrxx2011-06-18 16:32:59 +0200
committerathrxx2011-06-18 19:45:39 +0200
commit81e0dd1444ea2550800d344a03cccbc8135054c1 (patch)
tree2ea2e01b4d580baa82a8ea5d1a7d29aee40190dd /engines/scumm
parent03ba1871f7392db32db09228878a2e148042f8c1 (diff)
downloadscummvm-rg350-81e0dd1444ea2550800d344a03cccbc8135054c1.tar.gz
scummvm-rg350-81e0dd1444ea2550800d344a03cccbc8135054c1.tar.bz2
scummvm-rg350-81e0dd1444ea2550800d344a03cccbc8135054c1.zip
SCUMM: regenerate 16bit palette after loading a savegame in LOOM PCE
(this avoids isssues when using savegames from different ports with different 16bit color modes)
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/saveload.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index 2be032d496..f9a6b211c3 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -1497,6 +1497,16 @@ void ScummEngine_v5::saveOrLoad(Serializer *s) {
resetCursors();
}
}
+
+ // Regenerate 16bit palette after loading.
+ // This avoids color issues when loading savegames that have been saved with a different ScummVM port
+ // that uses a different 16bit color mode than the ScummVM port which is currently used.
+#ifdef USE_RGB_COLOR
+ if (_game.platform == Common::kPlatformPCEngine && s->isLoading()) {
+ for (int i = 0; i < 256; ++i)
+ _16BitPalette[i] = get16BitColor(_currentPalette[i * 3 + 0], _currentPalette[i * 3 + 1], _currentPalette[i * 3 + 2]);
+ }
+#endif
}
#ifdef ENABLE_SCUMM_7_8