aboutsummaryrefslogtreecommitdiff
path: root/scumm/cursor.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2005-03-17 03:20:25 +0000
committerEugene Sandulenko2005-03-17 03:20:25 +0000
commited45ee5a0503b39f8612faeb762da1238c62588c (patch)
tree4e1876a324b0597fe28e6f51d9f7539e7eeeb664 /scumm/cursor.cpp
parent1abab501239ce856f8b2986dd8126837b19de9b0 (diff)
downloadscummvm-rg350-ed45ee5a0503b39f8612faeb762da1238c62588c.tar.gz
scummvm-rg350-ed45ee5a0503b39f8612faeb762da1238c62588c.tar.bz2
scummvm-rg350-ed45ee5a0503b39f8612faeb762da1238c62588c.zip
NES cursor fixes from Quitetust. No need to use separate palette.
svn-id: r17170
Diffstat (limited to 'scumm/cursor.cpp')
-rw-r--r--scumm/cursor.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/scumm/cursor.cpp b/scumm/cursor.cpp
index 8fce49b22e..f283a37e01 100644
--- a/scumm/cursor.cpp
+++ b/scumm/cursor.cpp
@@ -108,7 +108,7 @@ void ScummEngine_v6::setCursorTransparency(int a) {
void ScummEngine::updateCursor() {
_system->setMouseCursor(_grabbedCursor, _cursor.width, _cursor.height,
_cursor.hotspotX, _cursor.hotspotY,
- (_features & GF_NES ? 0x40 : 255),
+ (_features & GF_NES ? _grabbedCursor[63] : 255),
(_heversion == 70 ? 2 : 1));
}
@@ -344,15 +344,13 @@ void ScummEngine_v5::setBuiltinCursor(int idx) {
byte *dst = _grabbedCursor;
byte *src = &_NESCostumeGfx[0][0xfa * 16];
+ byte *palette = getResourceAddress(rtCostume, 35) + 2;
- // Cursor uses colors 0-2, which are differ from room to room
- // Instead of remapping, we shift it 0x40 colors up (beyond NES
- // palette) and specify those colors in setupNESPalette()
for (i = 0; i < 8; i++) {
byte c0 = src[i];
byte c1 = src[i + 8];
for (j = 0; j < 8; j++)
- *dst++ = ((c0 >> (7 - j)) & 1) | (((c1 >> (7 - j)) & 1) << 1) + 0x40;
+ *dst++ = palette[((c0 >> (7 - j)) & 1) | (((c1 >> (7 - j)) & 1) << 1) | ((idx == 3) ? 4 : 0)];
}
} else if (_version <= 2) {