diff options
author | Travis Howell | 2009-05-19 01:20:54 +0000 |
---|---|---|
committer | Travis Howell | 2009-05-19 01:20:54 +0000 |
commit | 36ace75983e62f423fb6842647d9190fc0ea69bc (patch) | |
tree | 85652a17101c42c95edfbbae4e18fe16e748f780 | |
parent | 7561bd9dfbf325a15d330caef00438cafc9f7ab3 (diff) | |
download | scummvm-rg350-36ace75983e62f423fb6842647d9190fc0ea69bc.tar.gz scummvm-rg350-36ace75983e62f423fb6842647d9190fc0ea69bc.tar.bz2 scummvm-rg350-36ace75983e62f423fb6842647d9190fc0ea69bc.zip |
Improve looping of videos, in the demo version of The Feeble Files.
svn-id: r40716
-rw-r--r-- | engines/agos/animation.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/engines/agos/animation.cpp b/engines/agos/animation.cpp index 143c1d7cff..c73f46fa93 100644 --- a/engines/agos/animation.cpp +++ b/engines/agos/animation.cpp @@ -321,6 +321,12 @@ void MoviePlayerDXA::nextFrame() { return; } + if (_vm->_interactiveVideo == TYPE_LOOPING && getCurFrame() == getFrameCount()) { + _fileStream->seek(_videoInfo.frameOffs); + _videoInfo.currentFrame = 0; + startSound(); + } + if (getCurFrame() < getFrameCount()) { decodeNextFrame(); if (_vm->_interactiveVideo == TYPE_OMNITV) { @@ -328,16 +334,10 @@ void MoviePlayerDXA::nextFrame() { } else if (_vm->_interactiveVideo == TYPE_LOOPING) { copyFrameToBuffer(_vm->getBackBuf(), (_vm->_screenWidth - getWidth()) / 2, (_vm->_screenHeight - getHeight()) / 2, _vm->_screenWidth); } - } else { - if (_vm->_interactiveVideo == TYPE_OMNITV) { - closeFile(); - _vm->_interactiveVideo = 0; - _vm->_variableArray[254] = 6747; - } else if (_vm->_interactiveVideo == TYPE_LOOPING) { - _fileStream->seek(_videoInfo.frameOffs); - _videoInfo.currentFrame = 0; - startSound(); - } + } else if (_vm->_interactiveVideo == TYPE_OMNITV) { + closeFile(); + _vm->_interactiveVideo = 0; + _vm->_variableArray[254] = 6747; } } @@ -444,6 +444,11 @@ void MoviePlayerSMK::handleNextFrame() { } void MoviePlayerSMK::nextFrame() { + if (_vm->_interactiveVideo == TYPE_LOOPING && getCurFrame() == getFrameCount()) { + _fileStream->seek(_videoInfo.frameOffs); + _videoInfo.currentFrame = 0; + } + if (getCurFrame() < getFrameCount()) { decodeNextFrame(); if (_vm->_interactiveVideo == TYPE_OMNITV) { @@ -451,15 +456,10 @@ void MoviePlayerSMK::nextFrame() { } else if (_vm->_interactiveVideo == TYPE_LOOPING) { copyFrameToBuffer(_vm->getBackBuf(), (_vm->_screenWidth - getWidth()) / 2, (_vm->_screenHeight - getHeight()) / 2, _vm->_screenWidth); } - } else { - if (_vm->_interactiveVideo == TYPE_OMNITV) { - closeFile(); - _vm->_interactiveVideo = 0; - _vm->_variableArray[254] = 6747; - } else if (_vm->_interactiveVideo == TYPE_LOOPING) { - _fileStream->seek(_videoInfo.frameOffs); - _videoInfo.currentFrame = 0; - } + } else if (_vm->_interactiveVideo == TYPE_OMNITV) { + closeFile(); + _vm->_interactiveVideo = 0; + _vm->_variableArray[254] = 6747; } } |