aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/tsage/core.cpp17
-rw-r--r--engines/tsage/core.h3
2 files changed, 17 insertions, 3 deletions
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp
index c243624608..6c015ab45f 100644
--- a/engines/tsage/core.cpp
+++ b/engines/tsage/core.cpp
@@ -3073,9 +3073,22 @@ void Player::enableControl() {
}
}
-void Player::enableControl(CursorType cursor) {
+void Player::disableControl(CursorType cursorId, CursorType objectId) {
+ if (cursorId != -1)
+ R2_GLOBALS._events.setCursor(cursorId);
+ else if (objectId != CURSOR_NONE)
+ R2_GLOBALS._events.setCursor(objectId);
+
+ disableControl();
+}
+
+void Player::enableControl(CursorType cursorId, CursorType objectId) {
enableControl();
- R2_GLOBALS._events.setCursor(cursor);
+
+ if (cursorId != -1)
+ R2_GLOBALS._events.setCursor(cursorId);
+ else if (objectId != CURSOR_NONE)
+ R2_GLOBALS._events.setCursor(objectId);
}
void Player::process(Event &event) {
diff --git a/engines/tsage/core.h b/engines/tsage/core.h
index 060ffee121..e887be050b 100644
--- a/engines/tsage/core.h
+++ b/engines/tsage/core.h
@@ -646,7 +646,8 @@ public:
void disableControl();
void enableControl();
- void enableControl(CursorType cursor);
+ void disableControl(CursorType cursorId, CursorType objectId);
+ void enableControl(CursorType cursorId, CursorType objectId = CURSOR_NONE);
};
/*--------------------------------------------------------------------------*/