diff options
author | Paul Gilbert | 2011-09-18 16:33:09 +1000 |
---|---|---|
committer | Paul Gilbert | 2011-09-18 16:33:09 +1000 |
commit | 45ee4f4845b2355eb528a85c7f9c14aeb98c31a8 (patch) | |
tree | 46e62d4391aea8fead7fc1637720042a022e697d /engines | |
parent | 83a03d883dd657d06b3ec9d41c279a04f2ea8d25 (diff) | |
download | scummvm-rg350-45ee4f4845b2355eb528a85c7f9c14aeb98c31a8.tar.gz scummvm-rg350-45ee4f4845b2355eb528a85c7f9c14aeb98c31a8.tar.bz2 scummvm-rg350-45ee4f4845b2355eb528a85c7f9c14aeb98c31a8.zip |
TSAGE: In Blue Force, cursor doesn't reset to Walk after doing actions
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tsage/core.cpp | 54 | ||||
-rw-r--r-- | engines/tsage/events.h | 2 |
2 files changed, 32 insertions, 24 deletions
diff --git a/engines/tsage/core.cpp b/engines/tsage/core.cpp index 99ea4ab88b..a41362e46d 100644 --- a/engines/tsage/core.cpp +++ b/engines/tsage/core.cpp @@ -2987,22 +2987,28 @@ void Player::enableControl() { _canWalk = true; _uiEnabled = true; _enabled = true; - _globals->_events.setCursor(CURSOR_WALK); - switch (_globals->_events.getCursor()) { - case CURSOR_WALK: - case CURSOR_LOOK: - case CURSOR_USE: - case CURSOR_TALK: - _globals->_events.setCursor(_globals->_events.getCursor()); - break; - default: + if (_vm->getGameID() == GType_Ringworld) { _globals->_events.setCursor(CURSOR_WALK); - break; - } - if ((_vm->getGameID() == GType_BlueForce) && BF_GLOBALS._uiElements._active) - BF_GLOBALS._uiElements.show(); + switch (_globals->_events.getCursor()) { + case CURSOR_WALK: + case CURSOR_LOOK: + case CURSOR_USE: + case CURSOR_TALK: + _globals->_events.setCursor(_globals->_events.getCursor()); + break; + default: + _globals->_events.setCursor(CURSOR_WALK); + break; + } + } else { + CursorType cursor = _globals->_events.getCursor(); + _globals->_events.setCursor(cursor); + + if (BF_GLOBALS._uiElements._active) + BF_GLOBALS._uiElements.show(); + } } void Player::process(Event &event) { @@ -3845,17 +3851,19 @@ void SceneHandler::process(Event &event) { event.handled = _globals->_events.getCursor() != CURSOR_WALK; - if (_globals->_player._uiEnabled && _globals->_player._canWalk && - (_globals->_events.getCursor() != CURSOR_LOOK)) { - _globals->_events.setCursor(CURSOR_WALK); - } else if (_globals->_player._canWalk && (_globals->_events.getCursor() != CURSOR_LOOK)) { - _globals->_events.setCursor(CURSOR_WALK); - } else if (_globals->_player._uiEnabled && (_globals->_events.getCursor() != CURSOR_LOOK)) { - _globals->_events.setCursor(CURSOR_USE); - } + if ((_vm->getGameID() == GType_Ringworld) || (_globals->_events.getCursor() == CURSOR_9999)) { + if (_globals->_player._uiEnabled && _globals->_player._canWalk && + (_globals->_events.getCursor() != CURSOR_LOOK)) { + _globals->_events.setCursor(CURSOR_WALK); + } else if (_globals->_player._canWalk && (_globals->_events.getCursor() != CURSOR_LOOK)) { + _globals->_events.setCursor(CURSOR_WALK); + } else if (_globals->_player._uiEnabled && (_globals->_events.getCursor() != CURSOR_LOOK)) { + _globals->_events.setCursor(CURSOR_USE); + } - if (_vm->getGameID() == GType_BlueForce) - event.handled = true; + if (_vm->getGameID() == GType_BlueForce) + event.handled = true; + } break; } } diff --git a/engines/tsage/events.h b/engines/tsage/events.h index 3680250ee9..3ce7332ede 100644 --- a/engines/tsage/events.h +++ b/engines/tsage/events.h @@ -84,7 +84,7 @@ enum CursorType { // Cursors CURSOR_WALK = 0x100, CURSOR_LOOK = 0x200, CURSOR_700 = 700, CURSOR_USE = 0x400, CURSOR_TALK = 0x800, - CURSOR_1000 = 0x1000, CURSOR_EXIT = 0x7004, + CURSOR_1000 = 0x1000, CURSOR_EXIT = 0x7004, CURSOR_9999 = 9999, CURSOR_NONE = -1, CURSOR_CROSSHAIRS = -2, CURSOR_ARROW = -3 }; |