MOHAWK: Fix Stoneship's hologram projector
This commit is contained in:
parent
b367772b5f
commit
8cd55a11a0
3 changed files with 12 additions and 2 deletions
|
@ -623,7 +623,7 @@ void Stoneship::o_hologramSelectionMove(uint16 op, uint16 var, uint16 argc, uint
|
||||||
uint16 selectionPos = position * 1500 / 243;
|
uint16 selectionPos = position * 1500 / 243;
|
||||||
|
|
||||||
VideoHandle handleMovie = _hologramSelection->playMovie();
|
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;
|
_hologramDisplayPos = position * 1450 / 243 + 350;
|
||||||
|
|
||||||
|
@ -631,7 +631,7 @@ void Stoneship::o_hologramSelectionMove(uint16 op, uint16 var, uint16 argc, uint
|
||||||
if (_hologramTurnedOn) {
|
if (_hologramTurnedOn) {
|
||||||
_hologramDisplay->setBlocking(false);
|
_hologramDisplay->setBlocking(false);
|
||||||
VideoHandle displayMovie = _hologramDisplay->playMovie();
|
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -529,6 +529,15 @@ void VideoManager::setVideoBounds(VideoHandle handle, Audio::Timestamp start, Au
|
||||||
_videoStreams[handle]->seekToTime(start);
|
_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) {
|
void VideoManager::seekToTime(VideoHandle handle, Audio::Timestamp time) {
|
||||||
assert(handle != NULL_VID_HANDLE);
|
assert(handle != NULL_VID_HANDLE);
|
||||||
_videoStreams[handle]->seekToTime(time);
|
_videoStreams[handle]->seekToTime(time);
|
||||||
|
|
|
@ -104,6 +104,7 @@ public:
|
||||||
uint32 getDuration(VideoHandle videoHandle);
|
uint32 getDuration(VideoHandle videoHandle);
|
||||||
bool endOfVideo(VideoHandle handle);
|
bool endOfVideo(VideoHandle handle);
|
||||||
void setVideoBounds(VideoHandle handle, Audio::Timestamp start, Audio::Timestamp end);
|
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 seekToTime(VideoHandle handle, Audio::Timestamp time);
|
||||||
void setVideoLooping(VideoHandle handle, bool loop);
|
void setVideoLooping(VideoHandle handle, bool loop);
|
||||||
void waitUntilMovieEnds(VideoHandle videoHandle);
|
void waitUntilMovieEnds(VideoHandle videoHandle);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue