aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/animator_hof.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2012-01-08 23:00:41 +0100
committerJohannes Schickel2012-01-08 23:00:41 +0100
commitd66bfb131caa1ef3eb57c7cf98d423444eaecb66 (patch)
tree634b42aba9a89c0450b7b8896a1c0bde83bf147c /engines/kyra/animator_hof.cpp
parent2dc3111bbefbd1233db08e1d05d5eab90e1e264d (diff)
downloadscummvm-rg350-d66bfb131caa1ef3eb57c7cf98d423444eaecb66.tar.gz
scummvm-rg350-d66bfb131caa1ef3eb57c7cf98d423444eaecb66.tar.bz2
scummvm-rg350-d66bfb131caa1ef3eb57c7cf98d423444eaecb66.zip
KYRA: Cleanup v2 item animation a little bit.
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;
}
}