From 4ea4172cbad466738836f7be8ebdcad4eabd0bb9 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 26 Aug 2011 05:51:08 +0200 Subject: SCUMM: Implement proper Indy4 Amiga palette handling. This should fix incorrect text colors in some scenes. --- engines/scumm/cursor.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'engines/scumm/cursor.cpp') diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp index 6739282c9d..1c79ac7a5a 100644 --- a/engines/scumm/cursor.cpp +++ b/engines/scumm/cursor.cpp @@ -610,6 +610,11 @@ void ScummEngine_v5::setBuiltinCursor(int idx) { WRITE_UINT16(_grabbedCursor + i * 2, 0xFF); } else { color = default_cursor_colors[idx]; + // Indy4 Amiga always uses the room or verb palette map to match colors to + // the currently setup palette, thus we need to select it over here too. + // This is guesswork! + if (_game.platform == Common::kPlatformAmiga && _game.id == GID_INDY4) + color = _roomPalette[color]; memset(_grabbedCursor, 0xFF, sizeof(_grabbedCursor)); } -- cgit v1.2.3 From e791f904ed1e3090ca176f8b42e784602d18df08 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 26 Aug 2011 18:27:21 +0200 Subject: SCUMM: Fix Indy4 Amiga cursor. The original did not use the room nor verb palette map for the cursor, but seems to use a custom palette. I now just changed the cursor to use the colors from the DOS version of Indy4. This is rather guesswork, but the original did always show a flashing color in those colors instead of based on the screen colors. --- engines/scumm/cursor.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'engines/scumm/cursor.cpp') diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp index 1c79ac7a5a..36f06a4889 100644 --- a/engines/scumm/cursor.cpp +++ b/engines/scumm/cursor.cpp @@ -609,12 +609,16 @@ void ScummEngine_v5::setBuiltinCursor(int idx) { for (i = 0; i < 1024; i++) WRITE_UINT16(_grabbedCursor + i * 2, 0xFF); } else { - color = default_cursor_colors[idx]; - // Indy4 Amiga always uses the room or verb palette map to match colors to - // the currently setup palette, thus we need to select it over here too. - // This is guesswork! - if (_game.platform == Common::kPlatformAmiga && _game.id == GID_INDY4) - color = _roomPalette[color]; + // Indy4 Amiga uses its own color set for the cursor image. + // This is patchwork code to make the cursor flash in correct colors. + if (_game.platform == Common::kPlatformAmiga && _game.id == GID_INDY4) { + static const uint8 indy4AmigaColors[4] = { + 252, 252, 253, 254 + }; + color = indy4AmigaColors[idx]; + } else { + color = default_cursor_colors[idx]; + } memset(_grabbedCursor, 0xFF, sizeof(_grabbedCursor)); } -- cgit v1.2.3