in v7/v8, remapPaletteColor() ignores color 255

in v7, remapPaletteColor() ignores colors setup by initCycle()

svn-id: r19380
This commit is contained in:
Gregory Montoir 2005-11-01 02:43:54 +00:00
parent b7d57c9284
commit 8eaa89863a
4 changed files with 16 additions and 2 deletions

View file

@ -759,6 +759,7 @@ void ScummEngine::saveOrLoad(Serializer *s) {
MKLINE(ScummEngine, _mouse.x, sleInt16, VER(20)),
MKLINE(ScummEngine, _mouse.y, sleInt16, VER(20)),
MKARRAY(ScummEngine, _colorUsedByCycle[0], sleByte, 256, VER(60)),
MKLINE(ScummEngine, _doEffect, sleByte, VER(8)),
MKLINE(ScummEngine, _switchRoomEffect, sleByte, VER(8)),
MKLINE(ScummEngine, _newEffect, sleByte, VER(8)),
@ -1094,6 +1095,10 @@ void ScummEngine::saveOrLoad(Serializer *s) {
memcpy(_darkenPalette, _currentPalette, 768);
}
// _colorUsedByCycle was not saved before V60
if (s->isLoading() && s->getVersion() < VER(60)) {
memset(_colorUsedByCycle, 0, sizeof(_colorUsedByCycle));
}
//
// Save/load more global object state