aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/graphics
diff options
context:
space:
mode:
authorFilippos Karapetis2011-09-27 16:45:17 +0300
committerFilippos Karapetis2011-09-27 16:54:14 +0300
commit4717d11862a45991b56f367cc6616ffb1379e8c6 (patch)
treee36380be9c5dc2ac699d0528378c2ddd925c6d4c /engines/sci/graphics
parent295394f9c10e5c4528ace907b5f7495d50187248 (diff)
downloadscummvm-rg350-4717d11862a45991b56f367cc6616ffb1379e8c6.tar.gz
scummvm-rg350-4717d11862a45991b56f367cc6616ffb1379e8c6.tar.bz2
scummvm-rg350-4717d11862a45991b56f367cc6616ffb1379e8c6.zip
SCI: Added support for the halfbrite palette used in Longbow Amiga
This fixes the remaining palette problems in the game (bug #3309036)
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r--engines/sci/graphics/palette.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/engines/sci/graphics/palette.cpp b/engines/sci/graphics/palette.cpp
index c667e3313f..5f703b90e3 100644
--- a/engines/sci/graphics/palette.cpp
+++ b/engines/sci/graphics/palette.cpp
@@ -206,6 +206,14 @@ bool GfxPalette::setAmiga() {
_sysPalette.colors[curColor].r = (byte1 & 0x0F) * 0x11;
_sysPalette.colors[curColor].g = ((byte2 & 0xF0) >> 4) * 0x11;
_sysPalette.colors[curColor].b = (byte2 & 0x0F) * 0x11;
+
+ if (_totalScreenColors == 64) {
+ // Set the associated color from the Amiga halfbrite colors
+ _sysPalette.colors[curColor + 32].used = 1;
+ _sysPalette.colors[curColor + 32].r = _sysPalette.colors[curColor].r >> 1;
+ _sysPalette.colors[curColor + 32].g = _sysPalette.colors[curColor].g >> 1;
+ _sysPalette.colors[curColor + 32].b = _sysPalette.colors[curColor].b >> 1;
+ }
}
// Directly set the palette, because setOnScreen() wont do a thing for amiga
@@ -226,6 +234,13 @@ void GfxPalette::modifyAmigaPalette(byte *data) {
_sysPalette.colors[curColor].r = (byte1 & 0x0F) * 0x11;
_sysPalette.colors[curColor].g = ((byte2 & 0xF0) >> 4) * 0x11;
_sysPalette.colors[curColor].b = (byte2 & 0x0F) * 0x11;
+
+ if (_totalScreenColors == 64) {
+ // Set the associated color from the Amiga halfbrite colors
+ _sysPalette.colors[curColor + 32].r = _sysPalette.colors[curColor].r >> 1;
+ _sysPalette.colors[curColor + 32].g = _sysPalette.colors[curColor].g >> 1;
+ _sysPalette.colors[curColor + 32].b = _sysPalette.colors[curColor].b >> 1;
+ }
}
copySysPaletteToScreen();