diff options
author | Matthew Hoops | 2011-12-12 12:09:37 -0500 |
---|---|---|
committer | Matthew Hoops | 2011-12-12 12:28:48 -0500 |
commit | 8cd55a11a07a1004bf14e63a42caad9e8039a36c (patch) | |
tree | a15b6ed436d5ff1910a55fdfbcb34fd0f37af808 | |
parent | b367772b5f6966ef99ea0914b8e10644b18652ea (diff) | |
download | scummvm-rg350-8cd55a11a07a1004bf14e63a42caad9e8039a36c.tar.gz scummvm-rg350-8cd55a11a07a1004bf14e63a42caad9e8039a36c.tar.bz2 scummvm-rg350-8cd55a11a07a1004bf14e63a42caad9e8039a36c.zip |
MOHAWK: Fix Stoneship's hologram projector
-rw-r--r-- | engines/mohawk/myst_stacks/stoneship.cpp | 4 | ||||
-rw-r--r-- | engines/mohawk/video.cpp | 9 | ||||
-rw-r--r-- | engines/mohawk/video.h | 1 |
3 files changed, 12 insertions, 2 deletions
diff --git a/engines/mohawk/myst_stacks/stoneship.cpp b/engines/mohawk/myst_stacks/stoneship.cpp index 4c715b56e4..6d54d0c586 100644 --- a/engines/mohawk/myst_stacks/stoneship.cpp +++ b/engines/mohawk/myst_stacks/stoneship.cpp @@ -623,7 +623,7 @@ void Stoneship::o_hologramSelectionMove(uint16 op, uint16 var, uint16 argc, uint uint16 selectionPos = position * 1500 / 243; VideoHandle handleMovie = _hologramSelection->playMovie(); - _vm->_video->setVideoBounds(handleMovie, Audio::Timestamp(0, selectionPos, 600), Audio::Timestamp(0, selectionPos, 600)); + _vm->_video->drawVideoFrame(handleMovie, Audio::Timestamp(0, selectionPos, 600)); _hologramDisplayPos = position * 1450 / 243 + 350; @@ -631,7 +631,7 @@ void Stoneship::o_hologramSelectionMove(uint16 op, uint16 var, uint16 argc, uint if (_hologramTurnedOn) { _hologramDisplay->setBlocking(false); VideoHandle displayMovie = _hologramDisplay->playMovie(); - _vm->_video->setVideoBounds(displayMovie, Audio::Timestamp(0, _hologramDisplayPos, 600), Audio::Timestamp(0, _hologramDisplayPos, 600)); + _vm->_video->drawVideoFrame(displayMovie, Audio::Timestamp(0, _hologramDisplayPos, 600)); } } } diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp index cd8fc8ef80..7958906897 100644 --- a/engines/mohawk/video.cpp +++ b/engines/mohawk/video.cpp @@ -529,6 +529,15 @@ void VideoManager::setVideoBounds(VideoHandle handle, Audio::Timestamp start, Au _videoStreams[handle]->seekToTime(start); } +void VideoManager::drawVideoFrame(VideoHandle handle, Audio::Timestamp time) { + assert(handle != NULL_VID_HANDLE); + _videoStreams[handle].end = Audio::Timestamp(0xffffffff, 1); + _videoStreams[handle]->seekToTime(time); + updateMovies(); + delete _videoStreams[handle].video; + _videoStreams[handle].clear(); +} + void VideoManager::seekToTime(VideoHandle handle, Audio::Timestamp time) { assert(handle != NULL_VID_HANDLE); _videoStreams[handle]->seekToTime(time); diff --git a/engines/mohawk/video.h b/engines/mohawk/video.h index efa81edfbd..34c287497f 100644 --- a/engines/mohawk/video.h +++ b/engines/mohawk/video.h @@ -104,6 +104,7 @@ public: uint32 getDuration(VideoHandle videoHandle); bool endOfVideo(VideoHandle handle); void setVideoBounds(VideoHandle handle, Audio::Timestamp start, Audio::Timestamp end); + void drawVideoFrame(VideoHandle handle, Audio::Timestamp time); void seekToTime(VideoHandle handle, Audio::Timestamp time); void setVideoLooping(VideoHandle handle, bool loop); void waitUntilMovieEnds(VideoHandle videoHandle); |