diff options
-rw-r--r-- | engines/sherlock/events.cpp | 16 | ||||
-rw-r--r-- | engines/sherlock/events.h | 2 |
2 files changed, 14 insertions, 4 deletions
diff --git a/engines/sherlock/events.cpp b/engines/sherlock/events.cpp index 216ef158a3..ec6863c2a8 100644 --- a/engines/sherlock/events.cpp +++ b/engines/sherlock/events.cpp @@ -64,14 +64,24 @@ void Events::setCursor(CursorId cursorId) { _cursorId = cursorId; + int hotspotX, hotspotY; + + if (cursorId == MAGNIFY) { + hotspotX = 8; + hotspotY = 8; + } else { + hotspotX = 0; + hotspotY = 0; + } + // Set the cursor data Graphics::Surface &s = (*_cursorImages)[cursorId]._frame; - setCursor(s); + setCursor(s, hotspotX, hotspotY); } -void Events::setCursor(const Graphics::Surface &src) { - CursorMan.replaceCursor(src.getPixels(), src.w, src.h, 0, 0, 0xff); +void Events::setCursor(const Graphics::Surface &src, int hotspotX, int hotspotY) { + CursorMan.replaceCursor(src.getPixels(), src.w, src.h, hotspotX, hotspotY, 0xff); showCursor(); } diff --git a/engines/sherlock/events.h b/engines/sherlock/events.h index b35109fefe..653049f72a 100644 --- a/engines/sherlock/events.h +++ b/engines/sherlock/events.h @@ -75,7 +75,7 @@ public: /** * Set the cursor to show from a passed frame */ - void setCursor(const Graphics::Surface &src); + void setCursor(const Graphics::Surface &src, int hotspotX = 0, int hotspotY = 0); /** * Animates the mouse cursor if the Wait cursor is showing |