aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/animator_hof.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/kyra/animator_hof.cpp')
-rw-r--r--engines/kyra/animator_hof.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/engines/kyra/animator_hof.cpp b/engines/kyra/animator_hof.cpp
index 741e358143..5a2378f4d0 100644
--- a/engines/kyra/animator_hof.cpp
+++ b/engines/kyra/animator_hof.cpp
@@ -115,15 +115,14 @@ void KyraEngine_HoF::refreshAnimObjects(int force) {
void KyraEngine_HoF::updateItemAnimations() {
bool nextFrame = false;
- if (_itemAnimData[0].itemIndex == -1 || _inventorySaved)
+ if (_itemAnimDefinition[0].itemIndex == -1 || _inventorySaved)
return;
- const ItemAnimData_v2 *s = &_itemAnimData[_nextAnimItem];
+ const ItemAnimDefinition *s = &_itemAnimDefinition[_nextAnimItem];
ActiveItemAnim *a = &_activeItemAnim[_nextAnimItem];
- _nextAnimItem = (_nextAnimItem + 1) % _itemAnimDataSize;
+ _nextAnimItem = (_nextAnimItem + 1) % _itemAnimDefinitionSize;
- uint32 ctime = _system->getMillis();
- if (ctime < a->nextFrame)
+ if (_system->getMillis() < a->nextFrameTime)
return;
uint16 shpIdx = s->frames[a->currentFrame].index + 64;
@@ -164,7 +163,7 @@ void KyraEngine_HoF::updateItemAnimations() {
}
if (nextFrame) {
- a->nextFrame = _system->getMillis() + (s->frames[a->currentFrame].delay * _tickLength);
+ a->nextFrameTime = _system->getMillis() + (s->frames[a->currentFrame].delay * _tickLength);
a->currentFrame = (a->currentFrame + 1) % s->numFrames;
}
}