mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 06:08:35 +00:00
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)
This commit is contained in:
parent
03ba1871f7
commit
81e0dd1444
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user