diff options
| -rw-r--r-- | engines/scumm/saveload.cpp | 10 | 
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  | 
