aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/animator_mr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/kyra/animator_mr.cpp')
-rw-r--r--engines/kyra/animator_mr.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/engines/kyra/animator_mr.cpp b/engines/kyra/animator_mr.cpp
index 31c5cd1a53..29fa3aba80 100644
--- a/engines/kyra/animator_mr.cpp
+++ b/engines/kyra/animator_mr.cpp
@@ -187,15 +187,14 @@ void KyraEngine_MR::refreshAnimObjects(int force) {
void KyraEngine_MR::updateItemAnimations() {
bool nextFrame = false;
- if (_itemAnimData[0].itemIndex == -1)
+ if (_itemAnimDefinition[0].itemIndex == -1)
return;
- const ItemAnimData_v2 *s = &_itemAnimData[_nextAnimItem];
+ const ItemAnimDefinition *s = &_itemAnimDefinition[_nextAnimItem];
ActiveItemAnim *a = &_activeItemAnim[_nextAnimItem];
_nextAnimItem = (_nextAnimItem + 1) % 10;
- uint32 ctime = _system->getMillis();
- if (ctime < a->nextFrame)
+ if (_system->getMillis() < a->nextFrameTime)
return;
uint16 shpIdx = s->frames[a->currentFrame].index + 248;
@@ -230,7 +229,7 @@ void KyraEngine_MR::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;
}
}