[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.58,2.59 object.cpp,1.77,1.78 script_v5.cpp,1.37,1.38 script_v6.cpp,1.99,1.100 script_v8.cpp,2.148,2.149 scumm.h,1.166,1.167
Max Horn
fingolfin at users.sourceforge.net
Sat Apr 26 06:29:09 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv4740
Modified Files:
gfx.cpp object.cpp script_v5.cpp script_v6.cpp script_v8.cpp
scumm.h
Log Message:
renamed setCursorHotspot2 to setCursorHotspot; fixed (with a hack) cursor in Loom
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.58
retrieving revision 2.59
diff -u -d -r2.58 -r2.59
--- gfx.cpp 26 Apr 2003 10:43:59 -0000 2.58
+++ gfx.cpp 26 Apr 2003 13:28:33 -0000 2.59
@@ -3218,7 +3218,7 @@
warning("setCursor(%d)", cursor);
}
-void Scumm::setCursorHotspot2(int x, int y) {
+void Scumm::setCursorHotspot(int x, int y) {
_cursor.hotspotX = x;
_cursor.hotspotY = y;
// FIXME this hacks around offset cursor in the humongous games
@@ -3230,7 +3230,7 @@
void Scumm::updateCursor() {
_system->set_mouse_cursor(_grabbedCursor, _cursor.width, _cursor.height,
- _cursor.hotspotX, _cursor.hotspotY);
+ _cursor.hotspotX, _cursor.hotspotY);
}
void Scumm::animateCursor() {
@@ -3272,14 +3272,18 @@
// FIXME: None of the stock cursors are right for Loom. Why is that?
if ((_gameId == GID_LOOM256) || (_gameId == GID_LOOM)) {
- int w;
+ int w = 0;
_cursor.width = 8;
_cursor.height = 8;
_cursor.hotspotX = 0;
_cursor.hotspotY = 0;
+
+ // FIXME - this corrects the cursor hotspot in Loom (EGA)
+ if (_gameId == GID_LOOM)
+ _cursor.hotspotY = 15;
- for (i = 0, w = 0; i < 8; i++) {
+ for (i = 0; i < 8; i++) {
w += (i >= 6) ? -2 : 1;
for (j = 0; j < w; j++)
_grabbedCursor[i * 8 + j] = color;
Index: object.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/object.cpp,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- object.cpp 21 Apr 2003 13:10:57 -0000 1.77
+++ object.cpp 26 Apr 2003 13:28:33 -0000 1.78
@@ -1250,17 +1250,17 @@
findObjectInRoom(&foir, foCodeHeader | foImageHeader | foCheckAlreadyLoaded, img, room);
if (_features & GF_AFTER_V8) {
- setCursorHotspot2(READ_LE_UINT32(&foir.imhd->v8.hotspot[0].x),
+ setCursorHotspot(READ_LE_UINT32(&foir.imhd->v8.hotspot[0].x),
READ_LE_UINT32(&foir.imhd->v8.hotspot[0].y));
w = READ_LE_UINT32(&foir.imhd->v8.width) >> 3;
h = READ_LE_UINT32(&foir.imhd->v8.height) >> 3;
} else if (_features & GF_AFTER_V7) {
- setCursorHotspot2(READ_LE_UINT16(&foir.imhd->v7.hotspot[0].x),
+ setCursorHotspot(READ_LE_UINT16(&foir.imhd->v7.hotspot[0].x),
READ_LE_UINT16(&foir.imhd->v7.hotspot[0].y));
w = READ_LE_UINT16(&foir.imhd->v7.width) >> 3;
h = READ_LE_UINT16(&foir.imhd->v7.height) >> 3;
} else {
- setCursorHotspot2(READ_LE_UINT16(&foir.imhd->old.hotspot[0].x),
+ setCursorHotspot(READ_LE_UINT16(&foir.imhd->old.hotspot[0].x),
READ_LE_UINT16(&foir.imhd->old.hotspot[0].y));
w = READ_LE_UINT16(&foir.cdhd->v6.w) >> 3;
h = READ_LE_UINT16(&foir.cdhd->v6.h) >> 3;
Index: script_v5.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v5.cpp,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- script_v5.cpp 23 Apr 2003 08:43:35 -0000 1.37
+++ script_v5.cpp 26 Apr 2003 13:28:33 -0000 1.38
@@ -633,7 +633,7 @@
i = getVarOrDirectByte(0x80);
j = getVarOrDirectByte(0x40);
k = getVarOrDirectByte(0x20);
- setCursorHotspot2(j, k);
+ setCursorHotspot(j, k);
break;
case 12: /* init cursor */
setCursor(getVarOrDirectByte(0x80));
Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -d -r1.99 -r1.100
--- script_v6.cpp 22 Apr 2003 14:49:29 -0000 1.99
+++ script_v6.cpp 26 Apr 2003 13:28:33 -0000 1.100
@@ -820,7 +820,7 @@
}
case 0x9A:
a = pop();
- setCursorHotspot2(pop(), a);
+ setCursorHotspot(pop(), a);
break;
case 0x9C: /* init charset */
initCharset(pop());
Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.148
retrieving revision 2.149
diff -u -d -r2.148 -r2.149
--- script_v8.cpp 7 Apr 2003 16:04:27 -0000 2.148
+++ script_v8.cpp 26 Apr 2003 13:28:33 -0000 2.149
@@ -829,7 +829,7 @@
break;
case 0xE5: // SO_CURSOR_HOTSPOT Set cursor hotspot
a = pop();
- setCursorHotspot2(pop(), a);
+ setCursorHotspot(pop(), a);
break;
case 0xE6: // SO_CURSOR_TRANSPARENT Set cursor transparent color
makeCursorColorTransparent(pop());
Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -d -r1.166 -r1.167
--- scumm.h 20 Apr 2003 14:28:24 -0000 1.166
+++ scumm.h 26 Apr 2003 13:28:34 -0000 1.167
@@ -815,7 +815,7 @@
void setCursor(int cursor);
void setCursorImg(uint img, uint room, uint imgindex);
- void setCursorHotspot2(int x, int y);
+ void setCursorHotspot(int x, int y);
void grabCursor(int x, int y, int w, int h);
void grabCursor(byte *ptr, int width, int height);
void makeCursorColorTransparent(int a);
More information about the Scummvm-git-logs
mailing list