aboutsummaryrefslogtreecommitdiff
path: root/engines/lure
diff options
context:
space:
mode:
authorPaul Gilbert2006-10-02 12:47:29 +0000
committerPaul Gilbert2006-10-02 12:47:29 +0000
commite8623fa477119e4b418200826e1bac372b9f8df4 (patch)
treee343cb4f0ae374a2a6c367feb0ea599d7e7c5b4e /engines/lure
parent6201707122c9f6d6af38909eec20ec35eacc000b (diff)
downloadscummvm-rg350-e8623fa477119e4b418200826e1bac372b9f8df4.tar.gz
scummvm-rg350-e8623fa477119e4b418200826e1bac372b9f8df4.tar.bz2
scummvm-rg350-e8623fa477119e4b418200826e1bac372b9f8df4.zip
Added methods for push/pop cursors
svn-id: r24069
Diffstat (limited to 'engines/lure')
-rw-r--r--engines/lure/events.cpp22
-rw-r--r--engines/lure/events.h3
2 files changed, 25 insertions, 0 deletions
diff --git a/engines/lure/events.cpp b/engines/lure/events.cpp
index 30e393c1ee..4e90d76b63 100644
--- a/engines/lure/events.cpp
+++ b/engines/lure/events.cpp
@@ -97,6 +97,28 @@ void Mouse::setCursorNum(uint8 cursorNum, int hotspotX, int hotspotY) {
CursorMan.replaceCursor(cursorAddr, CURSOR_WIDTH, CURSOR_HEIGHT, hotspotX, hotspotY, 0);
}
+void Mouse::pushCursorNum(uint8 cursorNum) {
+ int hotspotX = 7, hotspotY = 7;
+ if ((cursorNum == CURSOR_ARROW) || (cursorNum == CURSOR_MENUBAR)) {
+ hotspotX = 0;
+ hotspotY = 0;
+ }
+
+ pushCursorNum(cursorNum, hotspotX, hotspotY);
+}
+
+void Mouse::pushCursorNum(uint8 cursorNum, int hotspotX, int hotspotY) {
+ Resources &res = Resources::getReference();
+
+ _cursorNum = cursorNum;
+ byte *cursorAddr = res.getCursor(cursorNum);
+ CursorMan.pushCursor(cursorAddr, CURSOR_WIDTH, CURSOR_HEIGHT, hotspotX, hotspotY, 0);
+}
+
+void Mouse::popCursor() {
+ CursorMan.popCursor();
+}
+
void Mouse::setPosition(int newX, int newY) {
System::getReference().warpMouse(newX, newY);
}
diff --git a/engines/lure/events.h b/engines/lure/events.h
index e41ae722e7..435edc0a15 100644
--- a/engines/lure/events.h
+++ b/engines/lure/events.h
@@ -52,6 +52,9 @@ public:
bool lButton() { return _lButton; }
bool rButton() { return _rButton; }
void waitForRelease();
+ void pushCursorNum(uint8 cursorNum);
+ void pushCursorNum(uint8 cursorNum, int hotspotX, int hotspotY);
+ void popCursor();
};
class Events {