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:
athrxx 2011-06-18 16:32:59 +02:00
parent 03ba1871f7
commit 81e0dd1444

View File

@ -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