aboutsummaryrefslogtreecommitdiff
path: root/scumm/cursor.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2004-08-24 06:36:12 +0000
committerTorbjörn Andersson2004-08-24 06:36:12 +0000
commit103cbac40a22189d01e06ed0e0a26ceca1344959 (patch)
tree271566c1f763652f49fdd2f75cd5e38d2eda8740 /scumm/cursor.cpp
parentbb0b18515b9fe88bb537a366e5a18c6e57d78d6a (diff)
downloadscummvm-rg350-103cbac40a22189d01e06ed0e0a26ceca1344959.tar.gz
scummvm-rg350-103cbac40a22189d01e06ed0e0a26ceca1344959.tar.bz2
scummvm-rg350-103cbac40a22189d01e06ed0e0a26ceca1344959.zip
Fixed bug #1014296, the Loom cursor hotspot regression.
svn-id: r14726
Diffstat (limited to 'scumm/cursor.cpp')
-rw-r--r--scumm/cursor.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/scumm/cursor.cpp b/scumm/cursor.cpp
index a37486f899..07f39d9dd5 100644
--- a/scumm/cursor.cpp
+++ b/scumm/cursor.cpp
@@ -64,7 +64,7 @@ static uint16 default_cursor_images[5][16] = {
0x1004, 0x2002, 0x0000, 0x0080, 0x01c0, 0x02a0, 0x0080, 0x0000 },
};
-static const byte default_cursor_hotspots[10] = {
+static byte default_cursor_hotspots[10] = {
8, 7, 8, 7, 1, 1, 5, 0,
8, 7, //zak256
};
@@ -255,12 +255,13 @@ void ScummEngine_v6::useBompCursor(const byte *im, int width, int height) {
void ScummEngine::redefineBuiltinCursorFromChar(int index, int chr) {
// Cursor image in both Looms are based on images from charset.
- // For now we don't handle them.
if (_gameId != GID_LOOM && _gameId != GID_LOOM256) {
// FIXME: Actually: is this opcode ever called by a non-Loom game?
// Which V3-V5 game besides Loom makes use of custom cursors, ever?
warning("V3--V5 SO_CURSOR_IMAGE(%d,%d) called - tell Fingolfin where you saw this!", index, chr);
}
+
+ assert(index >= 0 && index < 5);
// const int oldID = _charset->getCurID();
@@ -295,6 +296,20 @@ void ScummEngine::redefineBuiltinCursorFromChar(int index, int chr) {
// _charset->setCurID(oldID);
}
+void ScummEngine::redefineBuiltinCursorHotspot(int index, int x, int y) {
+ // Cursor image in both Looms are based on images from charset.
+ if (_gameId != GID_LOOM && _gameId != GID_LOOM256) {
+ // FIXME: Actually: is this opcode ever called by a non-Loom game?
+ // Which V3-V5 game besides Loom makes use of custom cursors, ever?
+ warning("V3--V5 SO_CURSOR_HOTSPOT(%d,%d,%d) called - tell Fingolfin where you saw this!", index, x, y);
+ }
+
+ assert(index >= 0 && index < 5);
+
+ default_cursor_hotspots[index * 2] = x;
+ default_cursor_hotspots[index * 2 + 1] = y;
+}
+
void ScummEngine::setBuiltinCursor(int idx) {
int i, j;
byte color;