diff options
author | Paul Gilbert | 2014-04-12 17:40:26 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-04-12 17:40:26 -0400 |
commit | a2d03dad4c5be915dfbc7a05af85be40d3e749f2 (patch) | |
tree | e89c8f1815b16a515648a0f9b2ff121a46ff784a /engines | |
parent | d58d9075da363a8481859236b197a0e6b01b2bfd (diff) | |
download | scummvm-rg350-a2d03dad4c5be915dfbc7a05af85be40d3e749f2.tar.gz scummvm-rg350-a2d03dad4c5be915dfbc7a05af85be40d3e749f2.tar.bz2 scummvm-rg350-a2d03dad4c5be915dfbc7a05af85be40d3e749f2.zip |
MADS: Fix for sprite animation range
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mads/sequence.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/mads/sequence.cpp b/engines/mads/sequence.cpp index d27f9d289f..c74fe44305 100644 --- a/engines/mads/sequence.cpp +++ b/engines/mads/sequence.cpp @@ -373,7 +373,7 @@ void SequenceList::setAnimRange(int seqIndex, int startVal, int endVal) { SequenceEntry &seqEntry = _entries[seqIndex]; SpriteAsset &spriteSet = *scene._sprites[seqEntry._spritesIndex]; int numSprites = spriteSet.getCount(); - int tempStart = startVal, tempEnd = endVal; + int tempStart, tempEnd; switch (startVal) { case -2: @@ -382,6 +382,9 @@ void SequenceList::setAnimRange(int seqIndex, int startVal, int endVal) { case -1: tempStart = 1; break; + default: + tempStart = startVal; + break; } switch (endVal) { @@ -393,14 +396,14 @@ void SequenceList::setAnimRange(int seqIndex, int startVal, int endVal) { tempEnd = 1; break; default: - tempEnd = numSprites; + tempEnd = endVal; break; } seqEntry._frameStart = tempStart; seqEntry._numSprites = tempEnd; - seqEntry._frameIndex = (seqEntry._frameInc < 0) ? tempStart : tempEnd; + seqEntry._frameIndex = (seqEntry._frameInc >= 0) ? tempStart : tempEnd; } void SequenceList::scan() { |