MOHAWK: Fix Stoneship's hologram projector

This commit is contained in:
Matthew Hoops 2011-12-12 12:09:37 -05:00
parent b367772b5f
commit 8cd55a11a0
3 changed files with 12 additions and 2 deletions

View file

@ -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));
}
}
}

View file

@ -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);

View file

@ -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);