diff options
author | Martin Kiewitz | 2010-08-21 14:54:57 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-08-21 14:54:57 +0000 |
commit | 4742b4d728ba772d47cc497681c9bfb0144475bc (patch) | |
tree | 2843da6c3b081e61ac324612dba124f7e7df3edc /engines/sci/graphics | |
parent | ff24ae66fb5ab92d76c3c954653c56281a556cf7 (diff) | |
download | scummvm-rg350-4742b4d728ba772d47cc497681c9bfb0144475bc.tar.gz scummvm-rg350-4742b4d728ba772d47cc497681c9bfb0144475bc.tar.bz2 scummvm-rg350-4742b4d728ba772d47cc497681c9bfb0144475bc.zip |
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
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r-- | engines/sci/graphics/transitions.cpp | 10 |
1 files 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); } } |