From 0817a02a7d69313d4649af27062c7e3d89c0d2c5 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Sun, 12 Aug 2012 01:20:13 -0400 Subject: MOHAWK: Use setStopTime() --- engines/mohawk/myst_stacks/dni.cpp | 2 +- engines/mohawk/video.cpp | 6 ++---- engines/mohawk/video.h | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/engines/mohawk/myst_stacks/dni.cpp b/engines/mohawk/myst_stacks/dni.cpp index cae165ccf0..d103105c2d 100644 --- a/engines/mohawk/myst_stacks/dni.cpp +++ b/engines/mohawk/myst_stacks/dni.cpp @@ -109,7 +109,7 @@ void Dni::o_handPage(uint16 op, uint16 var, uint16 argc, uint16 *argv) { _vm->setMainCursor(kDefaultMystCursor); // Play movie end (atrus leaving) - _vm->_video->setVideoBounds(atrus, Audio::Timestamp(0, 14813, 600), Audio::Timestamp(0xFFFFFFFF)); + _vm->_video->setVideoBounds(atrus, Audio::Timestamp(0, 14813, 600), _vm->_video->getDuration(atrus)); _vm->_video->setVideoLooping(atrus, false); _atrusLeft = true; diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp index 3b4e61646d..5b811382ff 100644 --- a/engines/mohawk/video.cpp +++ b/engines/mohawk/video.cpp @@ -43,13 +43,12 @@ void VideoEntry::clear() { loop = false; enabled = false; start = Audio::Timestamp(0, 1); - end = Audio::Timestamp(0xFFFFFFFF, 1); // Largest possible, there is an endOfVideo() check anyway filename.clear(); id = -1; } bool VideoEntry::endOfVideo() { - return !video || video->endOfVideo() || video->getTime() >= (uint)end.msecs(); + return !video || video->endOfVideo(); } VideoManager::VideoManager(MohawkEngine* vm) : _vm(vm) { @@ -514,13 +513,12 @@ bool VideoManager::isVideoPlaying() { void VideoManager::setVideoBounds(VideoHandle handle, Audio::Timestamp start, Audio::Timestamp end) { assert(handle != NULL_VID_HANDLE); _videoStreams[handle].start = start; - _videoStreams[handle].end = end; + _videoStreams[handle]->setStopTime(end); _videoStreams[handle]->seek(start); } void VideoManager::drawVideoFrame(VideoHandle handle, Audio::Timestamp time) { assert(handle != NULL_VID_HANDLE); - _videoStreams[handle].end = Audio::Timestamp(0xffffffff, 1); _videoStreams[handle]->seek(time); updateMovies(); delete _videoStreams[handle].video; diff --git a/engines/mohawk/video.h b/engines/mohawk/video.h index 937cd0f2dd..4e34604bfd 100644 --- a/engines/mohawk/video.h +++ b/engines/mohawk/video.h @@ -50,7 +50,7 @@ struct VideoEntry { uint16 y; bool loop; bool enabled; - Audio::Timestamp start, end; + Audio::Timestamp start; // Identification Common::String filename; // External video files -- cgit v1.2.3