From bba430eebc2a0701b9cea5fd5cc57ec1da87a5c9 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 13 Feb 2011 19:54:15 +0100 Subject: SCI: Adapt to setPalette/grabPalette RGBA->RGB change. --- engines/sci/graphics/transitions.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'engines/sci/graphics/transitions.cpp') diff --git a/engines/sci/graphics/transitions.cpp b/engines/sci/graphics/transitions.cpp index b7b2bfb38e..5e14778c0c 100644 --- a/engines/sci/graphics/transitions.cpp +++ b/engines/sci/graphics/transitions.cpp @@ -303,7 +303,7 @@ void GfxTransitions::copyRectToScreen(const Common::Rect rect, bool blackoutFlag // Note: don't do too many steps in here, otherwise cpu will crap out because of // the load void GfxTransitions::fadeOut() { - byte oldPalette[4 * 256], workPalette[4 * 256]; + byte oldPalette[3 * 256], workPalette[3 * 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 @@ -313,11 +313,11 @@ void GfxTransitions::fadeOut() { 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; + workPalette[colorNr * 3 + 0] = oldPalette[colorNr * 3] * stepNr / 100; + workPalette[colorNr * 3 + 1] = oldPalette[colorNr * 3 + 1] * stepNr / 100; + workPalette[colorNr * 3 + 2] = oldPalette[colorNr * 3 + 2] * stepNr / 100; } - g_system->getPaletteManager()->setPalette(workPalette + 4, 1, 254); + g_system->getPaletteManager()->setPalette(workPalette + 3, 1, 254); g_sci->getEngineState()->wait(2); } } -- cgit v1.2.3