From b08c22b283fa2df5d67a04c09fa436370934174c Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 1 Mar 2009 07:14:13 +0000 Subject: Fix bottom palette in AtariST version of Elvira 2. svn-id: r39014 --- engines/agos/gfx.cpp | 3 +++ engines/agos/vga.cpp | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) (limited to 'engines/agos') diff --git a/engines/agos/gfx.cpp b/engines/agos/gfx.cpp index fa33c7faf4..95abbc0425 100644 --- a/engines/agos/gfx.cpp +++ b/engines/agos/gfx.cpp @@ -938,6 +938,9 @@ void AGOSEngine::drawImage(VC10_state *state) { if (getGameType() == GType_ELVIRA2 || getGameType() == GType_WW) state->palette = state->surf_addr[0] & 0xF0; + if (getGameType() == GType_ELVIRA2 && getPlatform() == Common::kPlatformAtariST && yoffs > 133) + state->palette = 208; + if (_backFlag == 1) { drawBackGroundImage(state); } else { diff --git a/engines/agos/vga.cpp b/engines/agos/vga.cpp index d04c9aa56d..2ad09fb430 100644 --- a/engines/agos/vga.cpp +++ b/engines/agos/vga.cpp @@ -842,6 +842,25 @@ void AGOSEngine::vc21_endRepeat() { } } +static const uint8 iconPalette[64] = { + 0x00, 0x00, 0x00, + 0x77, 0x77, 0x55, + 0x55, 0x00, 0x00, + 0x77, 0x00, 0x00, + 0x22, 0x00, 0x00, + 0x00, 0x11, 0x00, + 0x11, 0x22, 0x11, + 0x22, 0x33, 0x22, + 0x44, 0x55, 0x44, + 0x33, 0x44, 0x00, + 0x11, 0x33, 0x00, + 0x00, 0x11, 0x44, + 0x77, 0x44, 0x00, + 0x66, 0x22, 0x00, + 0x00, 0x22, 0x66, + 0x77, 0x55, 0x00, +}; + void AGOSEngine::vc22_setPaletteOld() { byte *offs, *palptr, *src; uint16 b, num; @@ -879,6 +898,20 @@ void AGOSEngine::vc22_setPaletteOld() { } } + if (getGameType() == GType_ELVIRA2 && getPlatform() == Common::kPlatformAtariST) { + // Custom palette used for icon area + palptr = &_displayPalette[13 * 64]; + for (uint8 c = 0; c < 16; c++) { + palptr[0] = iconPalette[c * 3 + 0] * 2; + palptr[1] = iconPalette[c * 3 + 1] * 2; + palptr[2] = iconPalette[c * 3 + 2] * 2; + palptr[3] = 0; + + palptr += 4; + }; + } + + palptr = _displayPalette; offs = _curVgaFile1 + READ_BE_UINT16(_curVgaFile1 + 6); src = offs + b * 32; -- cgit v1.2.3