aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorJohannes Schickel2011-08-26 18:27:21 +0200
committerJohannes Schickel2011-08-26 18:29:03 +0200
commite791f904ed1e3090ca176f8b42e784602d18df08 (patch)
tree6d76d51c6000c91f93eff1064ab039debfd1f270 /engines/scumm
parentcef09b345b73042a6459f6e7e21b3adc7ca875b2 (diff)
downloadscummvm-rg350-e791f904ed1e3090ca176f8b42e784602d18df08.tar.gz
scummvm-rg350-e791f904ed1e3090ca176f8b42e784602d18df08.tar.bz2
scummvm-rg350-e791f904ed1e3090ca176f8b42e784602d18df08.zip
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.
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/cursor.cpp16
-rw-r--r--engines/scumm/palette.cpp10
2 files changed, 20 insertions, 6 deletions
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));
}
diff --git a/engines/scumm/palette.cpp b/engines/scumm/palette.cpp
index 216708f098..75db90842d 100644
--- a/engines/scumm/palette.cpp
+++ b/engines/scumm/palette.cpp
@@ -1324,6 +1324,16 @@ void ScummEngine::updatePalette() {
*p++ = data[1] * 255 / 15;
*p++ = data[2] * 255 / 15;
}
+
+ // Setup colors for the mouse cursor
+ // Color values taken from Indy4 DOS
+ static const uint8 mouseCursorPalette[] = {
+ 255, 255, 255,
+ 171, 171, 171,
+ 87, 87, 87
+ };
+
+ _system->getPaletteManager()->setPalette(mouseCursorPalette, 252, 3);
} else {
bool noir_mode = (_game.id == GID_SAMNMAX && readVar(0x8000));
int i;