Add comment about why r44322 was needed.

svn-id: r44323
This commit is contained in:
Johannes Schickel 2009-09-25 01:00:34 +00:00
parent ec040488b7
commit 902e0699b1

View File

@ -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];
}