diff options
author | Adrian Frühwirth | 2018-03-02 22:52:41 +0100 |
---|---|---|
committer | Adrian Frühwirth | 2018-03-02 22:52:41 +0100 |
commit | 3de1ba11b3dff52a5449d6ef9435572238f16958 (patch) | |
tree | a0297f8dcdd9ee8692c8d184f894d82efca3e8c8 /engines/tucker/tucker.cpp | |
parent | 5b89fd7dab3dfb5b4c30f12dde00aa203657cda6 (diff) | |
download | scummvm-rg350-3de1ba11b3dff52a5449d6ef9435572238f16958.tar.gz scummvm-rg350-3de1ba11b3dff52a5449d6ef9435572238f16958.tar.bz2 scummvm-rg350-3de1ba11b3dff52a5449d6ef9435572238f16958.zip |
TUCKER: Use Verb enum in more places
Diffstat (limited to 'engines/tucker/tucker.cpp')
-rw-r--r-- | engines/tucker/tucker.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/engines/tucker/tucker.cpp b/engines/tucker/tucker.cpp index 7c0204aa9a..e4d7cde18a 100644 --- a/engines/tucker/tucker.cpp +++ b/engines/tucker/tucker.cpp @@ -247,7 +247,8 @@ void TuckerEngine::resetVariables() { _pendingActionDelay = 0; _charPositionFlagNum = 0; _charPositionFlagValue = 0; - _actionVerb = kVerbWalk; + _actionVerb = _currentActionVerb = _previousActionVerb = kVerbWalk; + _actionVerbLocked = false; _nextAction = 0; _selectedObjectNum = 0; _selectedObjectType = 0; @@ -255,7 +256,6 @@ void TuckerEngine::resetVariables() { _actionObj1Type = _actionObj2Type = 0; _actionObj1Num = _actionObj2Num = 0; _actionRequiresTwoObjects = false; - _actionVerbLocked = false; _actionPosX = 0; _actionPosY = 0; _selectedObjectLocationMask = false; @@ -302,8 +302,6 @@ void TuckerEngine::resetVariables() { memset(_characterAnimationsTable, 0, sizeof(_characterAnimationsTable)); memset(_characterStateTable, 0, sizeof(_characterStateTable)); _backgroundSprOffset = 0; - _currentActionVerb = 0; - _previousActionVerb = 0; _mainSpritesBaseOffset = 0; _currentSpriteAnimationLength = 0; _currentSpriteAnimationFrame = 0; @@ -831,7 +829,7 @@ void TuckerEngine::updateMouseState() { void TuckerEngine::updateCharPositionHelper() { setCursorState(kCursorStateDisabledHidden ); _charSpeechSoundCounter = kDefaultCharSpeechSoundCounter; - _currentActionVerb = 0; + _currentActionVerb = kVerbWalk; startSpeechSound(_speechSoundNum, _speechVolume); int pos = getPositionForLine(_speechSoundNum, _characterSpeechDataPtr); _characterSpeechDataPtr += pos; @@ -855,7 +853,7 @@ void TuckerEngine::updateCharPosition() { } if (_currentActionObj1Num == 259) { handleSpecialObjectSelectionSequence(); - _currentActionVerb = 0; + _currentActionVerb = kVerbWalk; return; } _speechSoundNum = _currentActionObj1Num; @@ -897,7 +895,7 @@ void TuckerEngine::updateCharPosition() { return; } else if (_currentActionObj1Num == 91) { handleSpecialObjectSelectionSequence(); - _currentActionVerb = 0; + _currentActionVerb = kVerbWalk; return; } break; @@ -945,7 +943,7 @@ void TuckerEngine::updateCharPosition() { } if (!skip) { playSpeechForAction(_currentActionVerb); - _currentActionVerb = 0; + _currentActionVerb = kVerbWalk; return; } assert(action); @@ -969,7 +967,7 @@ void TuckerEngine::updateCharPosition() { _characterSoundFxDelayCounter = action->_fxDelay; _characterSoundFxNum = action->_fxNum; _previousActionVerb = _currentActionVerb; - _currentActionVerb = 0; + _currentActionVerb = kVerbWalk; } void TuckerEngine::updateFlagsForCharPosition() { @@ -1143,7 +1141,7 @@ void TuckerEngine::updateCursor() { } else { _actionVerbLocked = false; _actionRequiresTwoObjects = false; - _currentActionVerb = 0; + _currentActionVerb = kVerbWalk; setSelectedObjectKey(); } } @@ -3683,7 +3681,7 @@ void TuckerEngine::handleMouseClickOnInventoryObject() { _actionCharacterNum = 99; setCursorState(kCursorStateDisabledHidden); _charSpeechSoundCounter = kDefaultCharSpeechSoundCounter; - _currentActionVerb = 0; + _currentActionVerb = kVerbWalk; _speechSoundNum = 2235; startSpeechSound(_speechSoundNum, _speechVolume); _characterSpeechDataPtr = _ptTextBuf + getPositionForLine(_speechSoundNum, _ptTextBuf); |