diff options
author | Travis Howell | 2006-04-24 10:32:36 +0000 |
---|---|---|
committer | Travis Howell | 2006-04-24 10:32:36 +0000 |
commit | e59f47e33e680a8d88671844f3cbdaad39c5aa32 (patch) | |
tree | 88d84065a102c1d56a7b693c69eb0da8c502f707 /engines/simon | |
parent | d088729a8c21570c13fb85a17abd34eaeef50011 (diff) | |
download | scummvm-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.cpp | 19 |
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; |