From 266806d8925330ec0d9e020fafffd74a2cb272e6 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Thu, 17 Feb 2011 13:13:30 -0500 Subject: 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. --- engines/sci/graphics/screen.cpp | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'engines/sci/graphics/screen.cpp') 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); -- cgit v1.2.3