aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/vga_s1.cpp
diff options
context:
space:
mode:
authorTravis Howell2008-03-25 08:03:32 +0000
committerTravis Howell2008-03-25 08:03:32 +0000
commit48fac2f9dc4bf608d9568c4c626f4fabc98160c8 (patch)
treed64c584b7c2c2db71827e4bdb1a3d9c62b667a52 /engines/agos/vga_s1.cpp
parent1bb41bf225e3f8e8595bc2c9ffce9c3a51bf70e0 (diff)
downloadscummvm-rg350-48fac2f9dc4bf608d9568c4c626f4fabc98160c8.tar.gz
scummvm-rg350-48fac2f9dc4bf608d9568c4c626f4fabc98160c8.tar.bz2
scummvm-rg350-48fac2f9dc4bf608d9568c4c626f4fabc98160c8.zip
Fix palette glitches in Amiga OCS version of Simon the Sorcerer 1.
svn-id: r31233
Diffstat (limited to 'engines/agos/vga_s1.cpp')
-rw-r--r--engines/agos/vga_s1.cpp48
1 files changed, 48 insertions, 0 deletions
diff --git a/engines/agos/vga_s1.cpp b/engines/agos/vga_s1.cpp
index f99c8afb83..b3ee374595 100644
--- a/engines/agos/vga_s1.cpp
+++ b/engines/agos/vga_s1.cpp
@@ -61,6 +61,41 @@ void AGOSEngine::vc17_setPathfinderItem() {
_vcPtr += 2;
}
+static const uint8 customPalette[96] = {
+ 0x00, 0x00, 0x00,
+ 0x99, 0x22, 0xFF,
+ 0x66, 0xCC, 0xFF,
+ 0xFF, 0x99, 0xFF,
+ 0xFF, 0xFF, 0xFF,
+ 0x66, 0x44, 0xBB,
+ 0x77, 0x55, 0xCC,
+ 0x88, 0x77, 0xCC,
+ 0xCC, 0xAA, 0xDD,
+ 0x33, 0x00, 0x09,
+ 0x66, 0x44, 0xCC,
+ 0x88, 0x55, 0xCC,
+ 0xAA, 0x77, 0xEE,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00,
+ 0xFF, 0xFF, 0xFF,
+ 0x33, 0x00, 0x00,
+ 0xCC, 0xCC, 0xDD,
+ 0x88, 0x99, 0xBB,
+ 0x44, 0x77, 0xAA,
+ 0x44, 0x44, 0x66,
+ 0x44, 0x44, 0x00,
+ 0x44, 0x66, 0x00,
+ 0x88, 0x99, 0x00,
+ 0x99, 0x44, 0x00,
+ 0xBB, 0x44, 0x22,
+ 0xFF, 0x55, 0x33,
+ 0xFF, 0x88, 0x88,
+ 0xFF, 0xBB, 0x33,
+ 0xFF, 0xFF, 0x77,
+};
+
void AGOSEngine::vc22_setPaletteNew() {
byte *offs, *palptr = 0, *src;
uint16 a = 0, b, num, palSize = 0;
@@ -93,6 +128,19 @@ void AGOSEngine::vc22_setPaletteNew() {
src += 3;
} while (--num);
+ if (getFeatures() & GF_32COLOR) {
+ // Custom palette used for verb area
+ palptr = &_displayPalette[(13 * 64)];
+ for (uint8 c = 0; c < 32; c++) {
+ palptr[0] = customPalette[c * 3 + 0];
+ palptr[1] = customPalette[c * 3 + 1];
+ palptr[2] = customPalette[c * 3 + 2];
+ palptr[3] = 0;
+
+ palptr += 4;
+ };
+ }
+
_paletteFlag = 2;
_vgaSpriteChanged++;
}