From 902e0699b11095d61bae29e3ca9b9d18482fdec2 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 25 Sep 2009 01:00:34 +0000 Subject: Add comment about why r44322 was needed. svn-id: r44323 --- engines/scumm/gfx.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'engines/scumm') diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp index b8e40b557d..008dfb3793 100644 --- a/engines/scumm/gfx.cpp +++ b/engines/scumm/gfx.cpp @@ -3189,6 +3189,10 @@ void Gdi16Bit::writeRoomColor(byte *dst, byte color) const { } void Gdi::writeRoomColor(byte *dst, byte color) const { + // As described in bug #1294513 "FOA/Amiga: Palette problem (Regression)" + // the original AMIGA version of Indy4: The Fate of Atlantis allowed + // overflowing of the palette index. To have the same result in our code, + // we need to do an logical AND 0xFF here to keep the result in [0, 255]. *dst = _roomPalette[(color + _paletteMod) & 0xFF]; } -- cgit v1.2.3