SCUMM: (DOTT/EGA) -fix verb screen glitch

(wrong color range in darkenPalette, but actually only for games that don't really support the EGA mode)
This commit is contained in:
athrxx 2022-07-29 19:35:06 +02:00
parent 27f9a460b5
commit c79f3e8781

View File

@ -1065,8 +1065,8 @@ void ScummEngine::darkenPalette(int redScale, int greenScale, int blueScale, int
if (!_EPAL_offs) {
// We can support the EGA mode for games that aren't supposed to have it, like this.
// Might be glitchy, though...
const byte *p = getPalettePtr(_curPalIndex, _roomResource);
for (int i = 0; i < 256; ++i) {
const byte *p = getPalettePtr(_curPalIndex, _roomResource) + startColor * 3;
for (int i = startColor; i <= endColor; ++i) {
byte col = egaFindBestMatch(p[0], p[1], p[2]);
_egaColorMap[0][i] = col & 0x0F;
_egaColorMap[1][i] = col >> 4;