aboutsummaryrefslogtreecommitdiff
path: root/engines/mads
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mads')
-rw-r--r--engines/mads/sequence.cpp9
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() {