aboutsummaryrefslogtreecommitdiff
path: root/engines/simon
diff options
context:
space:
mode:
authorTravis Howell2006-04-24 10:32:36 +0000
committerTravis Howell2006-04-24 10:32:36 +0000
commite59f47e33e680a8d88671844f3cbdaad39c5aa32 (patch)
tree88d84065a102c1d56a7b693c69eb0da8c502f707 /engines/simon
parentd088729a8c21570c13fb85a17abd34eaeef50011 (diff)
downloadscummvm-rg350-e59f47e33e680a8d88671844f3cbdaad39c5aa32.tar.gz
scummvm-rg350-e59f47e33e680a8d88671844f3cbdaad39c5aa32.tar.bz2
scummvm-rg350-e59f47e33e680a8d88671844f3cbdaad39c5aa32.zip
Remove duplicate code
svn-id: r22138
Diffstat (limited to 'engines/simon')
-rw-r--r--engines/simon/animation.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/engines/simon/animation.cpp b/engines/simon/animation.cpp
index e4353c9815..b38fcd71a7 100644
--- a/engines/simon/animation.cpp
+++ b/engines/simon/animation.cpp
@@ -148,14 +148,9 @@ void MoviePlayer::play() {
startSound();
- while (_frameNum < _framesCount) {
+ while (_frameNum < _framesCount)
handleNextFrame();
- if (_leftButtonDown && _rightButtonDown && !_vm->getBitFlag(41)) {
- _frameNum = _framesCount;
- }
- }
-
close();
_vm->o_killAnimate();
@@ -167,6 +162,12 @@ void MoviePlayer::play() {
}
}
+void MoviePlayer::close() {
+ _fd.close();
+ free(_frameBuffer1);
+ free(_frameBuffer2);
+}
+
void MoviePlayer::startSound() {
uint32 tag = _fd.readUint32BE();
if (tag == MKID_BE('WAVE')) {
@@ -182,12 +183,6 @@ void MoviePlayer::startSound() {
}
}
-void MoviePlayer::close() {
- _fd.close();
- free(_frameBuffer1);
- free(_frameBuffer2);
-}
-
void MoviePlayer::nextFrame() {
if (!_omniTV)
return;