aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorJody Northup2009-06-05 08:09:37 +0000
committerJody Northup2009-06-05 08:09:37 +0000
commit9789ba7f28d2c0a093adda01435306f28e91fede (patch)
treeced66d59e1c0b16a59ca36196159378b871d4333 /engines/scumm
parent662a305752214564a9db0ac2d61594367067efa1 (diff)
downloadscummvm-rg350-9789ba7f28d2c0a093adda01435306f28e91fede.tar.gz
scummvm-rg350-9789ba7f28d2c0a093adda01435306f28e91fede.tar.bz2
scummvm-rg350-9789ba7f28d2c0a093adda01435306f28e91fede.zip
Corrected backend to be able to accept a 16-bit mouseKeyColor without overflow
svn-id: r41194
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/cursor.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp
index 957370b8fe..3710956b74 100644
--- a/engines/scumm/cursor.cpp
+++ b/engines/scumm/cursor.cpp
@@ -112,10 +112,20 @@ void ScummEngine_v6::setCursorTransparency(int a) {
void ScummEngine::updateCursor() {
int transColor = (_game.heversion >= 80) ? 5 : 255;
- CursorMan.replaceCursor(_grabbedCursor, _cursor.width, _cursor.height,
- _cursor.hotspotX, _cursor.hotspotY,
- (_game.platform == Common::kPlatformNES ? _grabbedCursor[63] : transColor),
- (_game.heversion == 70 ? 2 : 1));
+ if (_game.features & GF_16BIT_COLOR && _hePalettes) {
+ //HACK Had to make a second method to avoid many, many linker errors from other engines
+ //this requires ENABLE_16BIT to be defined in the Scumm project, again, because I #ifdef'ed
+ //the method's definition and declaration in cursorman.h
+ CursorMan.replaceCursor16(_grabbedCursor, _cursor.width, _cursor.height,
+ _cursor.hotspotX, _cursor.hotspotY,
+ (_game.platform == Common::kPlatformNES ? _grabbedCursor[63] : transColor),
+ (_game.heversion == 70 ? 2 : 1));
+ } else {
+ CursorMan.replaceCursor(_grabbedCursor, _cursor.width, _cursor.height,
+ _cursor.hotspotX, _cursor.hotspotY,
+ (_game.platform == Common::kPlatformNES ? _grabbedCursor[63] : transColor),
+ (_game.heversion == 70 ? 2 : 1));
+ }
}
void ScummEngine_v6::grabCursor(int x, int y, int w, int h) {