diff options
author | Paul Gilbert | 2011-12-22 21:12:08 +1100 |
---|---|---|
committer | Paul Gilbert | 2011-12-22 21:12:08 +1100 |
commit | b5e53281846e455ebd3f4a7bf40d1fffc6afeafe (patch) | |
tree | 77069cfa468ba8eb2ea55eff354c64fcfe78e0cc /engines/tsage | |
parent | 0319cd06ef8e20486a3c7aa69a84bd39e8a71683 (diff) | |
download | scummvm-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')
-rw-r--r-- | engines/tsage/core.cpp | 17 | ||||
-rw-r--r-- | engines/tsage/core.h | 3 |
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); }; /*--------------------------------------------------------------------------*/ |