aboutsummaryrefslogtreecommitdiff
path: root/engines/m4/animation.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2010-06-05 04:18:23 +0000
committerPaul Gilbert2010-06-05 04:18:23 +0000
commitb9065aa2d23d87c5da887ebe1f685230a4693827 (patch)
tree483b976d069e1c7df0a771d74447fde376072ce8 /engines/m4/animation.cpp
parent5686c251f09fa25432d5db8195ac1df2fcda88fb (diff)
downloadscummvm-rg350-b9065aa2d23d87c5da887ebe1f685230a4693827.tar.gz
scummvm-rg350-b9065aa2d23d87c5da887ebe1f685230a4693827.tar.bz2
scummvm-rg350-b9065aa2d23d87c5da887ebe1f685230a4693827.zip
Various bugfixes to the animation code - first Rex animation now plays, albeit in the wrong place
svn-id: r49437
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;
}