diff options
author | Paul Gilbert | 2010-06-06 06:46:29 +0000 |
---|---|---|
committer | Paul Gilbert | 2010-06-06 06:46:29 +0000 |
commit | 3efec5720de2c46355c323763dee96b719ed5aa1 (patch) | |
tree | 43cb9bc6613b0430889332c890a6a6d3517015c9 /engines | |
parent | c253a57e471be34567c2a28f8ccb4f6e084d7e20 (diff) | |
download | scummvm-rg350-3efec5720de2c46355c323763dee96b719ed5aa1.tar.gz scummvm-rg350-3efec5720de2c46355c323763dee96b719ed5aa1.tar.bz2 scummvm-rg350-3efec5720de2c46355c323763dee96b719ed5aa1.zip |
Bugfixes for correct positioning of opening animation
svn-id: r49448
Diffstat (limited to 'engines')
-rw-r--r-- | engines/m4/animation.cpp | 5 | ||||
-rw-r--r-- | engines/m4/mads_views.cpp | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/engines/m4/animation.cpp b/engines/m4/animation.cpp index a4e4ccbc0e..b372222bd0 100644 --- a/engines/m4/animation.cpp +++ b/engines/m4/animation.cpp @@ -34,6 +34,7 @@ namespace M4 { MadsAnimation::MadsAnimation(MadsM4Engine *vm, MadsView *view): Animation(vm), _view(view) { _font = NULL; + _resetFlag = false; _freeFlag = false; _skipLoad = false; _unkIndex = -1; @@ -159,7 +160,7 @@ void MadsAnimation::initialise(const Common::String &filename, uint16 flags, M4S rec.spriteSlot.xp = animStream->readUint16LE(); rec.spriteSlot.yp = animStream->readUint16LE(); rec.spriteSlot.depth = animStream->readByte(); - rec.spriteSlot.scale = animStream->readByte(); + rec.spriteSlot.scale = (int8)animStream->readByte(); _frameEntries.push_back(rec); } @@ -287,7 +288,7 @@ void MadsAnimation::update() { } // Validate the current frame - if (_currentFrame > (int)_miscEntries.size()) { + if (_currentFrame >= (int)_miscEntries.size()) { // Is the animation allowed to be repeated? if (_resetFlag) { _currentFrame = 0; diff --git a/engines/m4/mads_views.cpp b/engines/m4/mads_views.cpp index bfd57c4add..cfcb113dcd 100644 --- a/engines/m4/mads_views.cpp +++ b/engines/m4/mads_views.cpp @@ -195,7 +195,7 @@ void MadsSpriteSlots::drawForeground(View *view) { if (slot.scale < 100) { // Minimalised drawing assert(slot.spriteListIndex < (int)_sprites.size()); - M4Sprite *spr = spriteSet.getFrame(slot.frameNumber - 1); + M4Sprite *spr = spriteSet.getFrame((slot.frameNumber & 0x7fff) - 1); spr->copyTo(view, slot.xp, slot.yp, slot.depth, _owner._depthSurface, slot.scale, 0); } else { int xp, yp; |