diff options
author | Adrian Frühwirth | 2018-03-04 23:23:23 +0100 |
---|---|---|
committer | Adrian Frühwirth | 2018-03-14 21:59:17 +0100 |
commit | 57479c2fa45554e8b75843de4d3366758ee7bc9d (patch) | |
tree | 4ee30f149c90849c2dba7879ffd23784644f0364 /engines/tucker/tucker.cpp | |
parent | 0df574abda0b9f1ca1bce8a34e59810ec5e42285 (diff) | |
download | scummvm-rg350-57479c2fa45554e8b75843de4d3366758ee7bc9d.tar.gz scummvm-rg350-57479c2fa45554e8b75843de4d3366758ee7bc9d.tar.bz2 scummvm-rg350-57479c2fa45554e8b75843de4d3366758ee7bc9d.zip |
TUCKER: Use Verb enum in even more places
Diffstat (limited to 'engines/tucker/tucker.cpp')
-rw-r--r-- | engines/tucker/tucker.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/engines/tucker/tucker.cpp b/engines/tucker/tucker.cpp index 6673164589..59506bde7e 100644 --- a/engines/tucker/tucker.cpp +++ b/engines/tucker/tucker.cpp @@ -986,19 +986,21 @@ void TuckerEngine::updateFlagsForCharPosition() { return; } switch (_previousActionVerb) { - case 3: - case 4: - case 8: - case 2: + case kVerbTalk: + case kVerbOpen: + case kVerbClose: + case kVerbUse: debug(3, "updateFlagsForCharPosition() set flag %d value %d", _charPositionFlagNum, _charPositionFlagValue); _flagsTable[_charPositionFlagNum] = _charPositionFlagValue; break; - case 6: + case kVerbTake: if (_charPositionFlagValue == 1) { addObjectToInventory(_charPositionFlagNum); _forceRedrawPanelItems = true; } break; + default: + break; } if (_pendingActionIndex > 0) { _nextAction = _pendingActionIndex; @@ -1058,9 +1060,10 @@ void TuckerEngine::updateCursor() { } if (_rightMouseButtonPressed) { if (!_updateCursorFlag) { - ++_actionVerb; - if (_actionVerb > 8) { - _actionVerb = kVerbWalk; + if (_actionVerb == kVerbLast) { + _actionVerb = kVerbFirst; + } else { + _actionVerb = (Verb)(_actionVerb + 1); } _updateCursorFlag = true; _actionVerbLocked = true; @@ -3473,7 +3476,7 @@ void TuckerEngine::setActionVerbUnderCursor() { } else if (_mousePosX > 195) { _actionVerb = kVerbLook; } else if (_panelStyle == kPanelStyleVerbs) { - _actionVerb = ((_mousePosY - 150) / 17) * 3 + (_mousePosX / 67); + _actionVerb = (Verb)(((_mousePosY - 150) / 17) * 3 + (_mousePosX / 67)); } else { _actionVerb = kVerbWalk; if (_mousePosX < 30) { |