[Scummvm-cvs-logs] CVS: scummvm/scumm cursor.cpp,2.13,2.14 script_v5.cpp,1.260,1.261 scumm.h,1.449,1.450
Torbjörn Andersson
eriktorbjorn at users.sourceforge.net
Mon Aug 23 23:37:04 CEST 2004
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm cursor.cpp,2.12,2.13
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.189,2.190 script.cpp,1.176,1.177 script_v6.cpp,1.386,1.387 script_v6he.cpp,2.90,2.91 script_v72he.cpp,2.7,2.8 script_v7he.cpp,2.44,2.45
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11206
Modified Files:
cursor.cpp script_v5.cpp scumm.h
Log Message:
Fixed bug #1014296, the Loom cursor hotspot regression.
Index: cursor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/cursor.cpp,v
retrieving revision 2.13
retrieving revision 2.14
diff -u -d -r2.13 -r2.14
--- cursor.cpp 24 Aug 2004 06:20:30 -0000 2.13
+++ cursor.cpp 24 Aug 2004 06:36:12 -0000 2.14
@@ -64,7 +64,7 @@
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::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 @@
// _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;
Index: script_v5.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v5.cpp,v
retrieving revision 1.260
retrieving revision 1.261
diff -u -d -r1.260 -r1.261
--- script_v5.cpp 23 Aug 2004 08:37:55 -0000 1.260
+++ script_v5.cpp 24 Aug 2004 06:36:12 -0000 1.261
@@ -683,7 +683,7 @@
i = getVarOrDirectByte(PARAM_1);
j = getVarOrDirectByte(PARAM_2);
k = getVarOrDirectByte(PARAM_3);
- setCursorHotspot(j, k);
+ redefineBuiltinCursorHotspot(i, j, k);
break;
case 12: // SO_CURSOR_SET
i = getVarOrDirectByte(PARAM_1);
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.449
retrieving revision 1.450
diff -u -d -r1.449 -r1.450
--- scumm.h 24 Aug 2004 02:02:56 -0000 1.449
+++ scumm.h 24 Aug 2004 06:36:12 -0000 1.450
@@ -943,6 +943,7 @@
void setBuiltinCursor(int index);
void redefineBuiltinCursorFromChar(int index, int chr);
+ void redefineBuiltinCursorHotspot(int index, int x, int y);
void grabCursor(int x, int y, int w, int h);
void setCursorFromBuffer(byte *ptr, int width, int height, int pitch);
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm cursor.cpp,2.12,2.13
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.189,2.190 script.cpp,1.176,1.177 script_v6.cpp,1.386,1.387 script_v6he.cpp,2.90,2.91 script_v72he.cpp,2.7,2.8 script_v7he.cpp,2.44,2.45
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list