From b9065aa2d23d87c5da887ebe1f685230a4693827 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 5 Jun 2010 04:18:23 +0000 Subject: Various bugfixes to the animation code - first Rex animation now plays, albeit in the wrong place svn-id: r49437 --- engines/m4/animation.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'engines/m4/animation.cpp') 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; } -- cgit v1.2.3