diff options
author | Matthew Hoops | 2011-02-17 13:13:30 -0500 |
---|---|---|
committer | Matthew Hoops | 2011-02-17 13:38:23 -0500 |
commit | 266806d8925330ec0d9e020fafffd74a2cb272e6 (patch) | |
tree | d53d8b4365d819573093fb89262947e62f98d8d7 /engines/sci/graphics/screen.cpp | |
parent | b5d1c669158951d4ea1633d3c10c58729d28fda5 (diff) | |
download | scummvm-rg350-266806d8925330ec0d9e020fafffd74a2cb272e6.tar.gz scummvm-rg350-266806d8925330ec0d9e020fafffd74a2cb272e6.tar.bz2 scummvm-rg350-266806d8925330ec0d9e020fafffd74a2cb272e6.zip |
SCI: Fix Mac icon bar palettes
The Mac icon bar uses a palette from the executable and keeps those entries in the palette constantly.
In addition, we're now performing gamma correction on the Mac-based colors so that they are in the same gamma as SCI. The color matching now works with this and using the same color finding as the Mac Palette Manager.
Diffstat (limited to 'engines/sci/graphics/screen.cpp')
-rw-r--r-- | engines/sci/graphics/screen.cpp | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/engines/sci/graphics/screen.cpp b/engines/sci/graphics/screen.cpp index 896ac0db22..6a045f1e8b 100644 --- a/engines/sci/graphics/screen.cpp +++ b/engines/sci/graphics/screen.cpp @@ -509,34 +509,6 @@ void GfxScreen::bitsRestoreDisplayScreen(Common::Rect rect, byte *&memoryPtr) { } } -void GfxScreen::getPalette(Palette *pal) { - // just copy palette to system - byte bpal[4 * 256]; - // Get current palette, update it and put back - g_system->getPaletteManager()->grabPalette(bpal, 0, 256); - for (int16 i = 1; i < 255; i++) { - pal->colors[i].r = bpal[i * 4]; - pal->colors[i].g = bpal[i * 4 + 1]; - pal->colors[i].b = bpal[i * 4 + 2]; - } -} - -void GfxScreen::setPalette(Palette *pal) { - // just copy palette to system - byte bpal[4 * 256]; - // Get current palette, update it and put back - g_system->getPaletteManager()->grabPalette(bpal, 0, 256); - for (int16 i = 0; i < 256; i++) { - if (!pal->colors[i].used) - continue; - bpal[i * 4] = CLIP(pal->colors[i].r * pal->intensity[i] / 100, 0, 255); - bpal[i * 4 + 1] = CLIP(pal->colors[i].g * pal->intensity[i] / 100, 0, 255); - bpal[i * 4 + 2] = CLIP(pal->colors[i].b * pal->intensity[i] / 100, 0, 255); - bpal[i * 4 + 3] = 100; - } - g_system->getPaletteManager()->setPalette(bpal, 0, 256); -} - void GfxScreen::setVerticalShakePos(uint16 shakePos) { if (!_upscaledHires) g_system->setShakePos(shakePos); |