From 3efec5720de2c46355c323763dee96b719ed5aa1 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 6 Jun 2010 06:46:29 +0000 Subject: Bugfixes for correct positioning of opening animation svn-id: r49448 --- engines/m4/animation.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'engines/m4/animation.cpp') 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; -- cgit v1.2.3