diff options
author | Johannes Schickel | 2011-02-19 21:42:34 +0100 |
---|---|---|
committer | Johannes Schickel | 2011-02-19 21:46:45 +0100 |
commit | e21d6e0d1120e917a4a019a4070ec4db5e988b9b (patch) | |
tree | 1142828b72ccf17d513c621e108d749f148fd32b /engines/sci/graphics/transitions.cpp | |
parent | 32d0e4c15fb33f80db194087850466664a43516a (diff) | |
parent | b26f30b98793c522265a3eeb48fb3b41034663c6 (diff) | |
download | scummvm-rg350-e21d6e0d1120e917a4a019a4070ec4db5e988b9b.tar.gz scummvm-rg350-e21d6e0d1120e917a4a019a4070ec4db5e988b9b.tar.bz2 scummvm-rg350-e21d6e0d1120e917a4a019a4070ec4db5e988b9b.zip |
Merge branch 'osystem-palette' of https://github.com/lordhoto/scummvm into master
Conflicts:
backends/platform/android/android.cpp
engines/sci/graphics/screen.cpp
engines/sci/graphics/transitions.cpp
Diffstat (limited to 'engines/sci/graphics/transitions.cpp')
-rw-r--r-- | engines/sci/graphics/transitions.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/engines/sci/graphics/transitions.cpp b/engines/sci/graphics/transitions.cpp index e741f66fde..e025a2f9ab 100644 --- a/engines/sci/graphics/transitions.cpp +++ b/engines/sci/graphics/transitions.cpp @@ -302,7 +302,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,17 +313,16 @@ void GfxTransitions::fadeOut() { for (stepNr = 100; stepNr >= 0; stepNr -= 10) { 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]; + workPalette[colorNr * 3 + 0] = oldPalette[colorNr * 3]; + workPalette[colorNr * 3 + 1] = oldPalette[colorNr * 3 + 1]; + workPalette[colorNr * 3 + 2] = oldPalette[colorNr * 3 + 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; + 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); } } |