diff options
-rw-r--r-- | engines/mohawk/myst_stacks/myst.cpp | 4 | ||||
-rw-r--r-- | engines/mohawk/myst_stacks/stoneship.cpp | 2 | ||||
-rw-r--r-- | engines/mohawk/video.cpp | 27 | ||||
-rw-r--r-- | engines/mohawk/video.h | 3 |
4 files changed, 3 insertions, 33 deletions
diff --git a/engines/mohawk/myst_stacks/myst.cpp b/engines/mohawk/myst_stacks/myst.cpp index 84a91e2a5b..edd4eccd6c 100644 --- a/engines/mohawk/myst_stacks/myst.cpp +++ b/engines/mohawk/myst_stacks/myst.cpp @@ -2981,7 +2981,7 @@ void Myst::o_clockLeverEndMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) for (uint i = 0; i < ARRAYSIZE(videos); i++) { VideoHandle handle = _vm->_video->findVideoHandle(_vm->wrapMovieFilename(videos[i], kMystStack)); if (handle) - _vm->_video->delayUntilMovieEnds(handle); + _vm->_video->waitUntilMovieEnds(handle); } if (_clockMiddleGearMovedAlone) @@ -3065,7 +3065,7 @@ void Myst::clockReset() { for (uint i = 0; i < ARRAYSIZE(videos); i++) { VideoHandle handle = _vm->_video->findVideoHandle(_vm->wrapMovieFilename(videos[i], kMystStack)); if (handle) - _vm->_video->delayUntilMovieEnds(handle); + _vm->_video->waitUntilMovieEnds(handle); } _vm->_sound->replaceSoundMyst(10113); diff --git a/engines/mohawk/myst_stacks/stoneship.cpp b/engines/mohawk/myst_stacks/stoneship.cpp index 293c0f96f4..2308738957 100644 --- a/engines/mohawk/myst_stacks/stoneship.cpp +++ b/engines/mohawk/myst_stacks/stoneship.cpp @@ -608,7 +608,7 @@ void Stoneship::o_hologramPlayback(uint16 op, uint16 var, uint16 argc, uint16 *a displayMovie->setBounds(Audio::Timestamp(0, startPoint, 600), Audio::Timestamp(0, endPoint, 600)); } - _vm->_video->delayUntilMovieEnds(displayMovie); + _vm->_video->waitUntilMovieEnds(displayMovie); } void Stoneship::o_hologramSelectionStart(uint16 op, uint16 var, uint16 argc, uint16 *argv) { diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp index eec0e9a7a0..1a7c019973 100644 --- a/engines/mohawk/video.cpp +++ b/engines/mohawk/video.cpp @@ -203,10 +203,6 @@ void VideoManager::playMovieBlockingCentered(const Common::String &fileName, boo waitUntilMovieEnds(VideoHandle(ptr)); } -void VideoManager::waitUntilMovieEnds(const VideoEntryPtr &video) { - waitUntilMovieEnds(VideoHandle(video)); -} - void VideoManager::waitUntilMovieEnds(VideoHandle videoHandle) { if (!videoHandle) return; @@ -252,29 +248,6 @@ void VideoManager::waitUntilMovieEnds(VideoHandle videoHandle) { removeEntry(videoHandle._ptr); } -void VideoManager::delayUntilMovieEnds(VideoHandle videoHandle) { - // FIXME: Why is this separate from waitUntilMovieEnds? - // It seems to only cut out the event loop (which is bad). - - if (!videoHandle) - return; - - // Sanity check - if (videoHandle._ptr->isLooping()) - error("Called delayUntilMovieEnds() on a looping video"); - - while (!videoHandle->endOfVideo() && !_vm->shouldQuit()) { - if (updateMovies()) - _vm->_system->updateScreen(); - - // Cut down on CPU usage - _vm->_system->delayMillis(10); - } - - // Ensure it's removed - removeEntry(videoHandle._ptr); -} - VideoHandle VideoManager::playMovie(const Common::String &fileName) { VideoEntryPtr ptr = open(fileName); if (!ptr) diff --git a/engines/mohawk/video.h b/engines/mohawk/video.h index c59c4af96a..4298298b75 100644 --- a/engines/mohawk/video.h +++ b/engines/mohawk/video.h @@ -305,13 +305,10 @@ public: void stopVideos(); bool isVideoPlaying(); - void waitUntilMovieEnds(const VideoEntryPtr &video); - // Handle functions VideoHandle findVideoHandle(uint16 id); VideoHandle findVideoHandle(const Common::String &fileName); void waitUntilMovieEnds(VideoHandle handle); - void delayUntilMovieEnds(VideoHandle handle); void drawVideoFrame(VideoHandle handle, const Audio::Timestamp &time); private: |