From 815ca646e1eb81240cc36631238fb10d8dc95a4a Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 19 May 2008 21:47:42 +0000 Subject: - Fixed out of bounds bug in KyraEngine_MR::updateItemAnimations - Clean up in KyraEngine_HoF::updateItemAnimations svn-id: r32189 --- engines/kyra/animator_hof.cpp | 2 +- engines/kyra/animator_mr.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/kyra/animator_hof.cpp b/engines/kyra/animator_hof.cpp index 65f38cd961..c5d44d10af 100644 --- a/engines/kyra/animator_hof.cpp +++ b/engines/kyra/animator_hof.cpp @@ -128,7 +128,7 @@ void KyraEngine_HoF::updateItemAnimations() { const ItemAnimData_v2 *s = &_itemAnimData[_nextAnimItem]; ActiveItemAnim *a = &_activeItemAnim[_nextAnimItem]; - _nextAnimItem = ++_nextAnimItem % 14; + _nextAnimItem = ++_nextAnimItem % _itemAnimDataSize; uint32 ctime = _system->getMillis(); if (ctime < a->nextFrame) diff --git a/engines/kyra/animator_mr.cpp b/engines/kyra/animator_mr.cpp index 212b4919dd..9702499fe7 100644 --- a/engines/kyra/animator_mr.cpp +++ b/engines/kyra/animator_mr.cpp @@ -205,7 +205,7 @@ void KyraEngine_MR::updateItemAnimations() { const ItemAnimData_v2 *s = &_itemAnimData[_nextAnimItem]; ActiveItemAnim *a = &_activeItemAnim[_nextAnimItem]; - _nextAnimItem = ++_nextAnimItem % 11; + _nextAnimItem = ++_nextAnimItem % 10; uint32 ctime = _system->getMillis(); if (ctime < a->nextFrame) -- cgit v1.2.3