aboutsummaryrefslogtreecommitdiff
path: root/engines/m4/animation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/m4/animation.cpp')
-rw-r--r--engines/m4/animation.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/engines/m4/animation.cpp b/engines/m4/animation.cpp
index bf49c649fb..a4e4ccbc0e 100644
--- a/engines/m4/animation.cpp
+++ b/engines/m4/animation.cpp
@@ -354,14 +354,13 @@ void MadsAnimation::update() {
if (spriteSlotIndex == 0) {
int slotIndex = _view->_spriteSlots.getIndex();
- _view->_spriteSlots[slotIndex].copy(_frameEntries[_oldFrameEntry].spriteSlot);
- _view->_spriteSlots[slotIndex].seqIndex += 0x80;
+ MadsSpriteSlot &slot = _view->_spriteSlots[slotIndex];
+ slot.copy(_frameEntries[_oldFrameEntry].spriteSlot);
+ slot.seqIndex = _frameEntries[_oldFrameEntry].seqIndex + 0x80;
SpriteAsset &spriteSet = _view->_spriteSlots.getSprite(
_view->_spriteSlots[slotIndex].spriteListIndex);
-
- _view->_spriteSlots[slotIndex].spriteType = (spriteSet.getAssetType() == 0) ?
- SPRITE_FOUR : SPRITE_ZERO;
+ slot.spriteType = spriteSet.isBackground() ? BACKGROUND_SPRITE : FOREGROUND_SPRITE;
}
break;
}