aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/kyra/animator_hof.cpp8
-rw-r--r--engines/kyra/animator_mr.cpp6
2 files changed, 3 insertions, 11 deletions
diff --git a/engines/kyra/animator_hof.cpp b/engines/kyra/animator_hof.cpp
index 1192145530..65f38cd961 100644
--- a/engines/kyra/animator_hof.cpp
+++ b/engines/kyra/animator_hof.cpp
@@ -127,12 +127,8 @@ void KyraEngine_HoF::updateItemAnimations() {
return;
const ItemAnimData_v2 *s = &_itemAnimData[_nextAnimItem];
- ActiveItemAnim *a = &_activeItemAnim[_nextAnimItem];
-
- if (++_nextAnimItem == 14) {
- _nextAnimItem = 0;
- return;
- }
+ ActiveItemAnim *a = &_activeItemAnim[_nextAnimItem];
+ _nextAnimItem = ++_nextAnimItem % 14;
uint32 ctime = _system->getMillis();
if (ctime < a->nextFrame)
diff --git a/engines/kyra/animator_mr.cpp b/engines/kyra/animator_mr.cpp
index f04ca0345d..212b4919dd 100644
--- a/engines/kyra/animator_mr.cpp
+++ b/engines/kyra/animator_mr.cpp
@@ -205,11 +205,7 @@ void KyraEngine_MR::updateItemAnimations() {
const ItemAnimData_v2 *s = &_itemAnimData[_nextAnimItem];
ActiveItemAnim *a = &_activeItemAnim[_nextAnimItem];
-
- if (++_nextAnimItem == 11) {
- _nextAnimItem = 0;
- return;
- }
+ _nextAnimItem = ++_nextAnimItem % 11;
uint32 ctime = _system->getMillis();
if (ctime < a->nextFrame)