diff options
Diffstat (limited to 'engines/tucker')
-rw-r--r-- | engines/tucker/locations.cpp | 6 | ||||
-rw-r--r-- | engines/tucker/tucker.cpp | 20 |
2 files changed, 12 insertions, 14 deletions
diff --git a/engines/tucker/locations.cpp b/engines/tucker/locations.cpp index dc7e43f209..28fca114b0 100644 --- a/engines/tucker/locations.cpp +++ b/engines/tucker/locations.cpp @@ -1350,7 +1350,7 @@ void TuckerEngine::updateSprite_locationNum21() { void TuckerEngine::execData3PreUpdate_locationNum21() { if (_xPosCurrent > 460 && _flagsTable[58] == 0 && _nextAction == 0) { - _currentActionVerb = 0; + _currentActionVerb = kVerbWalk; _pendingActionDelay = 0; _flagsTable[59] = 1; _nextAction = 2; @@ -1754,7 +1754,7 @@ void TuckerEngine::execData3PreUpdate_locationNum28() { _csDataLoaded = false; _pendingActionDelay = 0; _pendingActionIndex = 0; - _currentActionVerb = 0; + _currentActionVerb = kVerbWalk; } } @@ -2356,7 +2356,7 @@ void TuckerEngine::execData3PreUpdate_locationNum53() { _csDataLoaded = false; _pendingActionDelay = 0; _pendingActionIndex = 0; - _currentActionVerb = 0; + _currentActionVerb = kVerbWalk; } } 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); |