diff options
Diffstat (limited to 'engines/sci/graphics/transitions.cpp')
-rw-r--r-- | engines/sci/graphics/transitions.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/engines/sci/graphics/transitions.cpp b/engines/sci/graphics/transitions.cpp index b7b2bfb38e..e741f66fde 100644 --- a/engines/sci/graphics/transitions.cpp +++ b/engines/sci/graphics/transitions.cpp @@ -271,9 +271,8 @@ void GfxTransitions::doTransition(int16 number, bool blackoutFlag) { } void GfxTransitions::setNewPalette(bool blackoutFlag) { - if (!blackoutFlag) - if (_isVGA) - _palette->setOnScreen(); + if (!blackoutFlag && _isVGA) + _palette->setOnScreen(); } void GfxTransitions::setNewScreen(bool blackoutFlag) { @@ -312,11 +311,18 @@ void GfxTransitions::fadeOut() { g_system->getPaletteManager()->grabPalette(oldPalette, 0, 256); for (stepNr = 100; stepNr >= 0; stepNr -= 10) { - for (colorNr = 1; colorNr < tillColorNr; colorNr++){ - workPalette[colorNr * 4 + 0] = oldPalette[colorNr * 4] * stepNr / 100; - workPalette[colorNr * 4 + 1] = oldPalette[colorNr * 4 + 1] * stepNr / 100; - workPalette[colorNr * 4 + 2] = oldPalette[colorNr * 4 + 2] * stepNr / 100; + for (colorNr = 1; colorNr < tillColorNr; colorNr++) { + if (_palette->colorIsFromMacClut(colorNr)) { + workPalette[colorNr * 4 + 0] = oldPalette[colorNr * 4]; + workPalette[colorNr * 4 + 1] = oldPalette[colorNr * 4 + 1]; + workPalette[colorNr * 4 + 2] = oldPalette[colorNr * 4 + 2]; + } else { + workPalette[colorNr * 4 + 0] = oldPalette[colorNr * 4] * stepNr / 100; + workPalette[colorNr * 4 + 1] = oldPalette[colorNr * 4 + 1] * stepNr / 100; + workPalette[colorNr * 4 + 2] = oldPalette[colorNr * 4 + 2] * stepNr / 100; + } } + g_system->getPaletteManager()->setPalette(workPalette + 4, 1, 254); g_sci->getEngineState()->wait(2); } |