diff options
author | Max Horn | 2003-04-26 13:28:34 +0000 |
---|---|---|
committer | Max Horn | 2003-04-26 13:28:34 +0000 |
commit | 2d8fa42f4492ff4ea8defaa12569c8b4587e4454 (patch) | |
tree | b79d1beb3211d9be800fd1c65ca0c1dd66905eee /scumm | |
parent | 5626e42f5bf50ae7fdde587047d48cf6986d61e8 (diff) | |
download | scummvm-rg350-2d8fa42f4492ff4ea8defaa12569c8b4587e4454.tar.gz scummvm-rg350-2d8fa42f4492ff4ea8defaa12569c8b4587e4454.tar.bz2 scummvm-rg350-2d8fa42f4492ff4ea8defaa12569c8b4587e4454.zip |
renamed setCursorHotspot2 to setCursorHotspot; fixed (with a hack) cursor in Loom
svn-id: r7132
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/gfx.cpp | 12 | ||||
-rw-r--r-- | scumm/object.cpp | 6 | ||||
-rw-r--r-- | scumm/script_v5.cpp | 2 | ||||
-rw-r--r-- | scumm/script_v6.cpp | 2 | ||||
-rw-r--r-- | scumm/script_v8.cpp | 2 | ||||
-rw-r--r-- | scumm/scumm.h | 2 |
6 files changed, 15 insertions, 11 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index 703f96eb83..f32a482afd 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -3218,7 +3218,7 @@ void Scumm::setCursor(int cursor) { 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::setCursorHotspot2(int x, int y) { 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 @@ void Scumm::decompressDefaultCursor(int idx) { // 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; diff --git a/scumm/object.cpp b/scumm/object.cpp index e0fdce0597..7195089e4e 100644 --- a/scumm/object.cpp +++ b/scumm/object.cpp @@ -1250,17 +1250,17 @@ void Scumm::setCursorImg(uint img, uint room, uint imgindex) { 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; diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp index 90cfade9a0..6fe98e5b60 100644 --- a/scumm/script_v5.cpp +++ b/scumm/script_v5.cpp @@ -633,7 +633,7 @@ void Scumm_v5::o5_cursorCommand() { i = getVarOrDirectByte(0x80); j = getVarOrDirectByte(0x40); k = getVarOrDirectByte(0x20); - setCursorHotspot2(j, k); + setCursorHotspot(j, k); break; case 12: /* init cursor */ setCursor(getVarOrDirectByte(0x80)); diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index 1e1a474731..1a8d391109 100644 --- a/scumm/script_v6.cpp +++ b/scumm/script_v6.cpp @@ -820,7 +820,7 @@ void Scumm_v6::o6_cursorCommand() { } case 0x9A: a = pop(); - setCursorHotspot2(pop(), a); + setCursorHotspot(pop(), a); break; case 0x9C: /* init charset */ initCharset(pop()); diff --git a/scumm/script_v8.cpp b/scumm/script_v8.cpp index 95fcb574dc..43a787642a 100644 --- a/scumm/script_v8.cpp +++ b/scumm/script_v8.cpp @@ -829,7 +829,7 @@ void Scumm_v8::o8_cursorCommand() { 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()); diff --git a/scumm/scumm.h b/scumm/scumm.h index d49d36ca20..2c5ad3b8b6 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -815,7 +815,7 @@ public: 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); |