aboutsummaryrefslogtreecommitdiff
path: root/engines/avalanche
diff options
context:
space:
mode:
authoruruk2013-09-21 19:22:21 +0200
committeruruk2013-09-21 19:22:21 +0200
commited7e71d226fa833577bba1939b3bc034a0ad877a (patch)
treef595c68494f418fea8f1635dcf8268d541374252 /engines/avalanche
parent183f10e4a08dfe714b49866b079beffd98cafffc (diff)
downloadscummvm-rg350-ed7e71d226fa833577bba1939b3bc034a0ad877a.tar.gz
scummvm-rg350-ed7e71d226fa833577bba1939b3bc034a0ad877a.tar.bz2
scummvm-rg350-ed7e71d226fa833577bba1939b3bc034a0ad877a.zip
AVALANCHE: Some revision in Sequence.
Diffstat (limited to 'engines/avalanche')
-rw-r--r--engines/avalanche/sequence.cpp7
-rw-r--r--engines/avalanche/sequence.h2
2 files changed, 5 insertions, 4 deletions
diff --git a/engines/avalanche/sequence.cpp b/engines/avalanche/sequence.cpp
index 871a38573a..a17200ebc0 100644
--- a/engines/avalanche/sequence.cpp
+++ b/engines/avalanche/sequence.cpp
@@ -77,7 +77,9 @@ void Sequence::startToOpen() {
}
void Sequence::shoveLeft() {
- memcpy(_seq, _seq+1, kSeqLength - 1); // Shift everything to the left.
+ for (uint i = 0; i < kSeqLength - 1; i++)
+ _seq[i] = _seq[i + 1];
+ _seq[kSeqLength - 1] = 0;
}
void Sequence::callSequencer() {
@@ -93,8 +95,7 @@ void Sequence::callSequencer() {
break;
}
- if ((_seq[0] >= 1) && (_seq[0] <= 176)) {
- // Show a frame.
+ if (_seq[0] <= 176) { // Show a frame.
_vm->_background->drawBackgroundSprite(-1, -1, _seq[0] - 1);
shoveLeft();
}
diff --git a/engines/avalanche/sequence.h b/engines/avalanche/sequence.h
index 67650d519d..c1461c696c 100644
--- a/engines/avalanche/sequence.h
+++ b/engines/avalanche/sequence.h
@@ -54,7 +54,7 @@ public:
private:
AvalancheEngine *_vm;
- void shoveLeft(); // This PROC is called by Timer when it's time to do another frame.
+ void shoveLeft(); // This is called by Timer when it's time to do another frame. It shifts everything to the left.
};
} // End of namespace Avalanche.