diff options
author | Bastien Bouclet | 2017-07-08 18:55:06 +0200 |
---|---|---|
committer | Bastien Bouclet | 2017-07-09 06:55:10 +0200 |
commit | efcbe6575717764207f017e16c58d2c493a78939 (patch) | |
tree | 61a077ade4d065ecef2a72c4a9f5c7dd3a9bd9c2 | |
parent | bcd027cf6471207dc1724646de94b32d10252a31 (diff) | |
download | scummvm-rg350-efcbe6575717764207f017e16c58d2c493a78939.tar.gz scummvm-rg350-efcbe6575717764207f017e16c58d2c493a78939.tar.bz2 scummvm-rg350-efcbe6575717764207f017e16c58d2c493a78939.zip |
MOHAWK: Riven: Fix ending video not playing when using the trap book
Fixes #9911.
-rw-r--r-- | engines/mohawk/riven_graphics.cpp | 1 | ||||
-rw-r--r-- | engines/mohawk/riven_stack.cpp | 18 |
2 files changed, 6 insertions, 13 deletions
diff --git a/engines/mohawk/riven_graphics.cpp b/engines/mohawk/riven_graphics.cpp index d152419661..824372a808 100644 --- a/engines/mohawk/riven_graphics.cpp +++ b/engines/mohawk/riven_graphics.cpp @@ -633,7 +633,6 @@ void RivenGraphics::updateCredits() { // Now flush the new screen _vm->_system->copyRectToScreen(_mainScreen->getPixels(), _mainScreen->pitch, 0, 0, _mainScreen->w, _mainScreen->h); - _vm->_system->updateScreen(); } } diff --git a/engines/mohawk/riven_stack.cpp b/engines/mohawk/riven_stack.cpp index 323cbc0d6a..d3c76edd82 100644 --- a/engines/mohawk/riven_stack.cpp +++ b/engines/mohawk/riven_stack.cpp @@ -186,6 +186,7 @@ void RivenStack::runDemoBoundaryDialog() { void RivenStack::runEndGame(uint16 videoCode, uint32 delay) { _vm->_sound->stopAllSLST(); RivenVideo *video = _vm->_video->openSlot(videoCode); + video->enable(); video->play(); runCredits(videoCode, delay); } @@ -202,27 +203,20 @@ void RivenStack::runCredits(uint16 video, uint32 delay) { if (videoPtr->getCurFrame() >= (int32)videoPtr->getFrameCount() - 1) { if (nextCreditsFrameStart == 0) { // Set us up to start after delay ms - nextCreditsFrameStart = _vm->_system->getMillis() + delay; - } else if (_vm->_system->getMillis() >= nextCreditsFrameStart) { + nextCreditsFrameStart = _vm->getTotalPlayTime() + delay; + } else if (_vm->getTotalPlayTime() >= nextCreditsFrameStart) { // the first two frames stay on for 4 seconds // the rest of the scroll updates happen at 30Hz if (_vm->_gfx->getCurCreditsImage() < 304) - nextCreditsFrameStart = _vm->_system->getMillis() + 4000; + nextCreditsFrameStart = _vm->getTotalPlayTime() + 4000; else - nextCreditsFrameStart = _vm->_system->getMillis() + 1000 / 30; + nextCreditsFrameStart = _vm->getTotalPlayTime() + 1000 / 30; _vm->_gfx->updateCredits(); } - } else { - _vm->_video->updateMovies(); - _vm->_system->updateScreen(); } - Common::Event event; - while (_vm->_system->getEventManager()->pollEvent(event)) - ; - - _vm->_system->delayMillis(10); + _vm->doFrame(); } if (_vm->shouldQuit()) { |