aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage/core.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2011-12-22 21:12:08 +1100
committerPaul Gilbert2011-12-22 21:12:08 +1100
commitb5e53281846e455ebd3f4a7bf40d1fffc6afeafe (patch)
tree77069cfa468ba8eb2ea55eff354c64fcfe78e0cc /engines/tsage/core.cpp
parent0319cd06ef8e20486a3c7aa69a84bd39e8a71683 (diff)
downloadscummvm-rg350-b5e53281846e455ebd3f4a7bf40d1fffc6afeafe.tar.gz
scummvm-rg350-b5e53281846e455ebd3f4a7bf40d1fffc6afeafe.tar.bz2
scummvm-rg350-b5e53281846e455ebd3f4a7bf40d1fffc6afeafe.zip
TSAGE: Implement R2R 2 parameter versions of Player disableControl and enableControl
Diffstat (limited to 'engines/tsage/core.cpp')
-rw-r--r--engines/tsage/core.cpp17
1 files changed, 15 insertions, 2 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) {