From 4742b4d728ba772d47cc497681c9bfb0144475bc Mon Sep 17 00:00:00 2001 From: Martin Kiewitz Date: Sat, 21 Aug 2010 14:54:57 +0000 Subject: SCI: now fading color 255 as well in sci1.1 looks better, although sierra didn't do that (examples: qfg3 demo/intro) svn-id: r52264 --- engines/sci/graphics/transitions.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/engines/sci/graphics/transitions.cpp b/engines/sci/graphics/transitions.cpp index abb5e74cbd..ee8e9f70e9 100644 --- a/engines/sci/graphics/transitions.cpp +++ b/engines/sci/graphics/transitions.cpp @@ -285,11 +285,14 @@ void GfxTransitions::copyRectToScreen(const Common::Rect rect, bool blackoutFlag void GfxTransitions::fadeOut() { byte oldPalette[4 * 256], workPalette[4 * 256]; int16 stepNr, colorNr; + // Sierra did not fade in/out color 255 for sci1.1, but they used it in + // several pictures (e.g. qfg3 demo/intro), so the fading looked weird + int16 tillColorNr = getSciVersion() >= SCI_VERSION_1_1 ? 256 : 255; g_system->grabPalette(oldPalette, 0, 256); for (stepNr = 100; stepNr >= 0; stepNr -= 10) { - for (colorNr = 1; colorNr < 255; colorNr++){ + 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; @@ -303,9 +306,12 @@ void GfxTransitions::fadeOut() { // the load void GfxTransitions::fadeIn() { int16 stepNr; + // Sierra did not fade in/out color 255 for sci1.1, but they used it in + // several pictures (e.g. qfg3 demo/intro), so the fading looked weird + int16 tillColorNr = getSciVersion() >= SCI_VERSION_1_1 ? 256 : 255; for (stepNr = 0; stepNr <= 100; stepNr += 10) { - _palette->kernelSetIntensity(1, 255, stepNr, true); + _palette->kernelSetIntensity(1, tillColorNr, stepNr, true); g_sci->getEngineState()->wait(2); } } -- cgit v1.2.3