diff options
author | Matthew Hoops | 2012-08-12 01:20:13 -0400 |
---|---|---|
committer | Matthew Hoops | 2012-08-12 01:22:47 -0400 |
commit | 0817a02a7d69313d4649af27062c7e3d89c0d2c5 (patch) | |
tree | 7dc37b2909af5283fec54afcad7b4dd49a35aa26 /engines/mohawk | |
parent | a458b91e7e4a1774d8dea1fe75966d834f43ee7b (diff) | |
download | scummvm-rg350-0817a02a7d69313d4649af27062c7e3d89c0d2c5.tar.gz scummvm-rg350-0817a02a7d69313d4649af27062c7e3d89c0d2c5.tar.bz2 scummvm-rg350-0817a02a7d69313d4649af27062c7e3d89c0d2c5.zip |
MOHAWK: Use setStopTime()
Diffstat (limited to 'engines/mohawk')
-rw-r--r-- | engines/mohawk/myst_stacks/dni.cpp | 2 | ||||
-rw-r--r-- | engines/mohawk/video.cpp | 6 | ||||
-rw-r--r-- | 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 |