From e2c40aaee6282a8d4db82776242c41f1ff6b016c Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Mon, 7 May 2007 08:47:40 +0000 Subject: Fix inventory palette glitches in Elvira 2. svn-id: r26775 --- engines/agos/vga_e2.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'engines/agos') diff --git a/engines/agos/vga_e2.cpp b/engines/agos/vga_e2.cpp index 5342d4c0d4..a85135a9d2 100644 --- a/engines/agos/vga_e2.cpp +++ b/engines/agos/vga_e2.cpp @@ -70,9 +70,14 @@ void AGOSEngine::vc45_setWindowPalette() { const uint16 *vlut = &_videoWindows[num * 4]; uint16 *dst = (uint16 *)getBackBuf() + vlut[0] * 8 + vlut[1] * _dxSurfacePitch / 2; + uint width = vlut[2] * 8; + + if (getGameType() == GType_ELVIRA2 && num == 7) { + dst -= 4; + width += 4; + } for (uint h = 0; h < vlut[3]; h++) { - uint width = vlut[2] * 8; for (uint w = 0; w < width; w++) { dst[w] &= 0xF0F; dst[w] |= color * 16; -- cgit v1.2.3