From b0b1ab70c3a5f71d2c62dcc178611ef51cb0428b Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Mon, 26 Oct 2009 14:49:01 +0000 Subject: Fix charset color in PCE version of Loom. svn-id: r45407 --- engines/scumm/charset.cpp | 8 ++++---- engines/scumm/palette.cpp | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'engines/scumm') diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp index a12636d9a4..5af0c41d6e 100644 --- a/engines/scumm/charset.cpp +++ b/engines/scumm/charset.cpp @@ -971,12 +971,12 @@ void CharsetRendererCommon::drawBits1(const Graphics::Surface &s, byte *dst, con if ((bits & revBitMask(x % 8)) && y + drawTop >= 0) { if (bitDepth == 2) { if (_shadowMode != kNoShadowMode) { - WRITE_UINT16(dst + 2, _shadowColor); - WRITE_UINT16(dst + s.pitch, _shadowColor); + WRITE_UINT16(dst + 2, _vm->_16BitPalette[_shadowColor]); + WRITE_UINT16(dst + s.pitch, _vm->_16BitPalette[_shadowColor]); if (_shadowMode != kFMTOWNSShadowMode) - WRITE_UINT16(dst + s.pitch + 2, _shadowColor); + WRITE_UINT16(dst + s.pitch + 2, _vm->_16BitPalette[_shadowColor]); } - WRITE_UINT16(dst, _color); + WRITE_UINT16(dst, _vm->_16BitPalette[_color]); } else { if (_shadowMode != kNoShadowMode) { *(dst + 1) = _shadowColor; diff --git a/engines/scumm/palette.cpp b/engines/scumm/palette.cpp index 57b70f0bbf..1b0edd743d 100644 --- a/engines/scumm/palette.cpp +++ b/engines/scumm/palette.cpp @@ -261,9 +261,8 @@ void ScummEngine::setPCEPaletteFromPtr(const byte *ptr) { } if (_game.features & GF_16BIT_COLOR) { - for (int i = firstIndex; i < firstIndex + numcolor - 1; ++i) { + for (int i = firstIndex; i < firstIndex + numcolor; ++i) _16BitPalette[i] = get16BitColor(_currentPalette[i * 3 + 0], _currentPalette[i * 3 + 1], _currentPalette[i * 3 + 2]); - } } setDirtyColors(firstIndex, firstIndex + numcolor - 1); } -- cgit v1.2.3