aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/myst_areas.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2015-07-15 23:59:21 -0400
committerMatthew Hoops2015-07-17 20:05:00 -0400
commit7e6c8be7db2449c1f793b6fb01af5613282e7f27 (patch)
tree02fd969920a4c0a4aad285462eee2050885e620e /engines/mohawk/myst_areas.cpp
parent95b1288329b12dce9d96a1a97a28f1bc457d605f (diff)
downloadscummvm-rg350-7e6c8be7db2449c1f793b6fb01af5613282e7f27.tar.gz
scummvm-rg350-7e6c8be7db2449c1f793b6fb01af5613282e7f27.tar.bz2
scummvm-rg350-7e6c8be7db2449c1f793b6fb01af5613282e7f27.zip
MOHAWK: Make video handles actual objects
Diffstat (limited to 'engines/mohawk/myst_areas.cpp')
-rw-r--r--engines/mohawk/myst_areas.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/mohawk/myst_areas.cpp b/engines/mohawk/myst_areas.cpp
index 4a3001774a..fcfb55e3b3 100644
--- a/engines/mohawk/myst_areas.cpp
+++ b/engines/mohawk/myst_areas.cpp
@@ -223,20 +223,20 @@ VideoHandle MystResourceType6::playMovie() {
VideoHandle handle = _vm->_video->findVideoHandle(_videoFile);
// If the video is not running, play it
- if (handle == NULL_VID_HANDLE || _vm->_video->endOfVideo(handle)) {
+ if (!handle || handle->endOfVideo()) {
handle = _vm->_video->playMovie(_videoFile, _left, _top, _loop);
if (_direction == -1) {
- _vm->_video->seekToTime(handle, _vm->_video->getDuration(handle));
- _vm->_video->setVideoRate(handle, -1);
+ handle->seek(handle->getDuration());
+ handle->setRate(-1);
}
} else {
// Resume the video
- _vm->_video->pauseMovie(handle, false);
+ handle->pause(false);
}
if (_playBlocking) {
_vm->_video->waitUntilMovieEnds(handle);
- handle = NULL_VID_HANDLE;
+ return VideoHandle();
}
return handle;
@@ -249,13 +249,13 @@ void MystResourceType6::handleCardChange() {
bool MystResourceType6::isPlaying() {
VideoHandle handle = _vm->_video->findVideoHandle(_videoFile);
- return handle != NULL_VID_HANDLE && !_vm->_video->endOfVideo(handle);
+ return handle && !handle->endOfVideo();
}
void MystResourceType6::pauseMovie(bool pause) {
VideoHandle handle = _vm->_video->findVideoHandle(_videoFile);
- if (handle != NULL_VID_HANDLE && !_vm->_video->endOfVideo(handle))
- _vm->_video->pauseMovie(handle, pause);
+ if (handle && !handle->endOfVideo())
+ handle->pause(pause);
}
MystResourceType7::MystResourceType7(MohawkEngine_Myst *vm, Common::SeekableReadStream *rlstStream, MystResource *parent) : MystResource(vm, rlstStream, parent) {