diff options
author | Matthew Hoops | 2012-03-20 14:18:57 -0400 |
---|---|---|
committer | Matthew Hoops | 2012-03-20 14:49:16 -0400 |
commit | 71756bdf4eae5ba9cc3f329b85e894f04640aaef (patch) | |
tree | 40d464262da107ab5eed82f198685209161ebac1 /engines/kyra/animator_hof.cpp | |
parent | 03eba05b09e5c9e5a351f8111185934b92a3fed3 (diff) | |
parent | 3c3576a224b92c703b4e8ea20008ac8a069980dd (diff) | |
download | scummvm-rg350-71756bdf4eae5ba9cc3f329b85e894f04640aaef.tar.gz scummvm-rg350-71756bdf4eae5ba9cc3f329b85e894f04640aaef.tar.bz2 scummvm-rg350-71756bdf4eae5ba9cc3f329b85e894f04640aaef.zip |
Merge remote branch 'upstream/master' into pegasus
Diffstat (limited to 'engines/kyra/animator_hof.cpp')
-rw-r--r-- | engines/kyra/animator_hof.cpp | 11 |
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; } } |