diff options
-rw-r--r-- | engines/hopkins/objects.cpp | 22 | ||||
-rw-r--r-- | engines/hopkins/objects.h | 4 | ||||
-rw-r--r-- | engines/hopkins/talk.cpp | 4 |
3 files changed, 15 insertions, 15 deletions
diff --git a/engines/hopkins/objects.cpp b/engines/hopkins/objects.cpp index 001b0351ba..6261e8c2a8 100644 --- a/engines/hopkins/objects.cpp +++ b/engines/hopkins/objects.cpp @@ -583,8 +583,8 @@ void ObjectsManager::resetBob(int idx) { bob._animData = g_PTRNUL; bob._bobMode10 = false; bob._bobModeChange = 0; - bob.field20 = 0; - bob.field22 = 0; + bob._modeChangeCtr = 0; + bob._modeChangeUnused = 0; bob._disableFl = false; bob._zoomFactor = 0; bob._flipFl = false; @@ -666,12 +666,12 @@ void ObjectsManager::displayBob(int idx) { int16 bobModeChange = READ_LE_INT16(data + 2); int16 newField22 = READ_LE_INT16(data + 4); // data[6] isn't used, read skipped - int16 newField20 = READ_LE_INT16(data + 8); + int16 newModeChangeCtr = READ_LE_INT16(data + 8); if (!bobModeChange) bobModeChange = 1; - if (!newField20) - newField20 = -1; + if (!newModeChangeCtr) + newModeChangeCtr = -1; _bob[idx]._isSpriteFl = false; @@ -686,8 +686,8 @@ void ObjectsManager::displayBob(int idx) { _bob[idx]._spriteData = _vm->_animationManager->Bank[bankIdx]._data; _bob[idx]._bobModeChange = bobModeChange; - _bob[idx].field20 = newField20; - _bob[idx].field22 = newField22; + _bob[idx]._modeChangeCtr = newModeChangeCtr; + _bob[idx]._modeChangeUnused = newField22; } void ObjectsManager::hideBob(int idx) { @@ -1000,7 +1000,7 @@ void ObjectsManager::displayBobAnim() { continue; _bob[idx]._bobMode10 = false; - if (_bob[idx]._animData == g_PTRNUL || _bob[idx]._disabledAnimationFl || _bob[idx].field20 == 0 || _bob[idx].field20 < -1) { + if (_bob[idx]._animData == g_PTRNUL || _bob[idx]._disabledAnimationFl || _bob[idx]._modeChangeCtr == 0 || _bob[idx]._modeChangeCtr < -1) { if (_bob[idx]._bobModeChange == 1 || _bob[idx]._bobModeChange == 2) _bob[idx]._bobMode10 = true; continue; @@ -1046,9 +1046,9 @@ void ObjectsManager::displayBobAnim() { _bob[idx]._moveChange1 = 1; } if (!_bob[idx]._moveChange1) { - if (_bob[idx].field20 > 0) - _bob[idx].field20--; - if (_bob[idx].field20 != -1 && _bob[idx].field20 <= 0) { + if (_bob[idx]._modeChangeCtr > 0) + _bob[idx]._modeChangeCtr--; + if (_bob[idx]._modeChangeCtr != -1 && _bob[idx]._modeChangeCtr <= 0) { _bob[idx]._bobMode = 11; } else { _bob[idx]._animDataIdx = 0; diff --git a/engines/hopkins/objects.h b/engines/hopkins/objects.h index fd67de134d..3c8cdeb346 100644 --- a/engines/hopkins/objects.h +++ b/engines/hopkins/objects.h @@ -75,8 +75,8 @@ struct BobItem { byte *_animData; bool _bobMode10; int _bobModeChange; - int field20; - int field22; + int _modeChangeCtr; + int _modeChangeUnused; bool _disableFl; // Set to true in B_CACHE_OFF() int _zoomFactor; bool _flipFl; diff --git a/engines/hopkins/talk.cpp b/engines/hopkins/talk.cpp index 555932f03a..455ead6b9b 100644 --- a/engines/hopkins/talk.cpp +++ b/engines/hopkins/talk.cpp @@ -614,8 +614,8 @@ void TalkManager::BOB_VISU_PARLE(int idx) { bqeData = _characterSprite; _vm->_objectsManager->_bob[idx]._spriteData = _characterSprite; _vm->_objectsManager->_bob[idx]._bobModeChange = newMode; - _vm->_objectsManager->_bob[idx].field20 = -1; - _vm->_objectsManager->_bob[idx].field22 = 0; + _vm->_objectsManager->_bob[idx]._modeChangeCtr = -1; + _vm->_objectsManager->_bob[idx]._modeChangeUnused = 0; } } } |