More palette changes needed for HE 7.0 games.

svn-id: r14202
This commit is contained in:
Travis Howell 2004-07-13 09:59:13 +00:00
parent a98f67562b
commit d189654e55

View file

@ -588,40 +588,39 @@ void ScummEngine::darkenPalette(int redScale, int greenScale, int blueScale, int
if (startColor <= endColor) { if (startColor <= endColor) {
const byte *cptr; const byte *cptr;
byte *cur; int color, idx, j;
int j;
int color;
cptr = getPalettePtr(_curPalIndex) + startColor * 3;
cur = _currentPalette + startColor * 3;
for (j = startColor; j <= endColor; j++) { for (j = startColor; j <= endColor; j++) {
// FIXME: Hack to fix Amiga palette adjustments // FIXME: Hack to fix Amiga palette adjustments
if ((_features & GF_AMIGA && _version == 5) && (j >= 16 && j < 81)) { if ((_features & GF_AMIGA && _version == 5) && (j >= 16 && j < 81))
cptr += 3;
cur += 3;
continue; continue;
}
idx = (_heversion == 70) ? _HEV7ActorPalette[j] : j;
cptr = getPalettePtr(_curPalIndex) + idx * 3;
if (_heversion == 70)
setDirtyColors(idx, idx);
color = *cptr++; color = *cptr++;
color = color * redScale / 0xFF; color = color * redScale / 0xFF;
if (color > 255) if (color > 255)
color = 255; color = 255;
*cur++ = color; _currentPalette[idx * 3 + 0] = color;
color = *cptr++; color = *cptr++;
color = color * greenScale / 0xFF; color = color * greenScale / 0xFF;
if (color > 255) if (color > 255)
color = 255; color = 255;
*cur++ = color; _currentPalette[idx * 3 + 1] = color;
color = *cptr++; color = *cptr++;
color = color * blueScale / 0xFF; color = color * blueScale / 0xFF;
if (color > 255) if (color > 255)
color = 255; color = 255;
*cur++ = color; _currentPalette[idx * 3 + 2] = color;
} }
setDirtyColors(startColor, endColor); if (_heversion != 70)
setDirtyColors(startColor, endColor);
} }
} }
@ -809,6 +808,9 @@ void ScummEngine::copyPalColor(int dst, int src) {
} }
void ScummEngine::setPalColor(int idx, int r, int g, int b) { void ScummEngine::setPalColor(int idx, int r, int g, int b) {
if (_heversion == 70)
idx = _HEV7ActorPalette[idx];
_currentPalette[idx * 3 + 0] = r; _currentPalette[idx * 3 + 0] = r;
_currentPalette[idx * 3 + 1] = g; _currentPalette[idx * 3 + 1] = g;
_currentPalette[idx * 3 + 2] = b; _currentPalette[idx * 3 + 2] = b;