aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk
diff options
context:
space:
mode:
authorBastien Bouclet2012-12-09 16:24:44 +0100
committerBastien Bouclet2012-12-16 06:51:01 +0100
commit5d90c93385359b293f351bfd1ad66d4d1cb243d3 (patch)
treea04a199e19e0bd364c29261c1b875c3bb89edaf3 /engines/mohawk
parentbbc760c51c9961e9ed65bb43901face1579d5b47 (diff)
downloadscummvm-rg350-5d90c93385359b293f351bfd1ad66d4d1cb243d3.tar.gz
scummvm-rg350-5d90c93385359b293f351bfd1ad66d4d1cb243d3.tar.bz2
scummvm-rg350-5d90c93385359b293f351bfd1ad66d4d1cb243d3.zip
MOHAWK: Play Channelwood stairs door closing movie backwards
Diffstat (limited to 'engines/mohawk')
-rw-r--r--engines/mohawk/myst_areas.cpp17
-rw-r--r--engines/mohawk/myst_stacks/channelwood.cpp5
2 files changed, 13 insertions, 9 deletions
diff --git a/engines/mohawk/myst_areas.cpp b/engines/mohawk/myst_areas.cpp
index a54b67bef4..a1f965a25f 100644
--- a/engines/mohawk/myst_areas.cpp
+++ b/engines/mohawk/myst_areas.cpp
@@ -202,22 +202,23 @@ VideoHandle MystResourceType6::playMovie() {
// Check if the video is already running
VideoHandle handle = _vm->_video->findVideoHandle(_videoFile);
- if (_direction != 1)
- warning("Playing QT movies backwards is not implemented");
-
// If the video is not running, play it
if (handle == NULL_VID_HANDLE || _vm->_video->endOfVideo(handle)) {
- if (_playBlocking) {
- _vm->_video->playMovieBlocking(_videoFile, _left, _top);
- handle = NULL_VID_HANDLE;
- } else {
- handle = _vm->_video->playMovie(_videoFile, _left, _top, _loop);
+ handle = _vm->_video->playMovie(_videoFile, _left, _top, _loop);
+ if (_direction == -1) {
+ _vm->_video->seekToTime(handle, _vm->_video->getDuration(handle));
+ _vm->_video->setVideoRate(handle, -1);
}
} else {
// Resume the video
_vm->_video->pauseMovie(handle, false);
}
+ if (_playBlocking) {
+ _vm->_video->waitUntilMovieEnds(handle);
+ handle = NULL_VID_HANDLE;
+ }
+
return handle;
}
diff --git a/engines/mohawk/myst_stacks/channelwood.cpp b/engines/mohawk/myst_stacks/channelwood.cpp
index 069281f5dc..c32ab3a378 100644
--- a/engines/mohawk/myst_stacks/channelwood.cpp
+++ b/engines/mohawk/myst_stacks/channelwood.cpp
@@ -476,9 +476,12 @@ void Channelwood::o_stairsDoorToggle(uint16 op, uint16 var, uint16 argc, uint16
MystResourceType6 *movie = static_cast<MystResourceType6 *>(_invokingResource);
if (_state.stairsUpperDoorState) {
- // TODO: Play backwards
+ // Close door, play the open movie backwards
+ movie->setDirection(-1);
movie->playMovie();
} else {
+ // Open door
+ movie->setDirection(1);
movie->playMovie();
}
}