diff options
author | Willem Jan Palenstijn | 2015-07-22 22:37:40 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2015-07-22 22:43:42 +0200 |
commit | 6ec9c81b575f13b2c4b30aeac592ebf2557b5890 (patch) | |
tree | 503d50902bad2d800165593039d08d5ccf0c98ab /engines/mohawk/myst_stacks/dni.cpp | |
parent | 5ec05f6b647c5ea41418be7ed19ad381f97cabd8 (diff) | |
parent | 4e5c8d35f7e133e2e72a846fdbd54900c91eeb73 (diff) | |
download | scummvm-rg350-6ec9c81b575f13b2c4b30aeac592ebf2557b5890.tar.gz scummvm-rg350-6ec9c81b575f13b2c4b30aeac592ebf2557b5890.tar.bz2 scummvm-rg350-6ec9c81b575f13b2c4b30aeac592ebf2557b5890.zip |
Merge branch 'master' into mm
Conflicts:
engines/access/access.cpp
engines/access/asurface.h
engines/access/bubble_box.cpp
engines/access/bubble_box.h
engines/access/martian/martian_game.cpp
engines/access/player.cpp
engines/access/player.h
engines/access/resources.cpp
engines/access/screen.cpp
engines/access/screen.h
engines/access/sound.cpp
engines/access/sound.h
Diffstat (limited to 'engines/mohawk/myst_stacks/dni.cpp')
-rw-r--r-- | engines/mohawk/myst_stacks/dni.cpp | 56 |
1 files changed, 41 insertions, 15 deletions
diff --git a/engines/mohawk/myst_stacks/dni.cpp b/engines/mohawk/myst_stacks/dni.cpp index 3eb3c40cbb..6ba0b63423 100644 --- a/engines/mohawk/myst_stacks/dni.cpp +++ b/engines/mohawk/myst_stacks/dni.cpp @@ -103,14 +103,14 @@ void Dni::o_handPage(uint16 op, uint16 var, uint16 argc, uint16 *argv) { VideoHandle atrus = _vm->_video->findVideoHandle(_video); // Good ending and Atrus asked to give page - if (_globals.ending == 1 && _vm->_video->getTime(atrus) > (uint)Audio::Timestamp(0, 6801, 600).msecs()) { + if (_globals.ending == 1 && atrus && atrus->getTime() > (uint)Audio::Timestamp(0, 6801, 600).msecs()) { _globals.ending = 2; _globals.heldPage = 0; _vm->setMainCursor(kDefaultMystCursor); // Play movie end (atrus leaving) - _vm->_video->setVideoBounds(atrus, Audio::Timestamp(0, 14813, 600), _vm->_video->getDuration(atrus)); - _vm->_video->setVideoLooping(atrus, false); + atrus->setBounds(Audio::Timestamp(0, 14813, 600), atrus->getDuration()); + atrus->setLooping(false); _atrusLeft = true; _waitForLoop = false; @@ -121,8 +121,12 @@ void Dni::o_handPage(uint16 op, uint16 var, uint16 argc, uint16 *argv) { void Dni::atrusLeft_run() { if (_vm->_system->getMillis() > _atrusLeftTime + 63333) { _video = _vm->wrapMovieFilename("atrus2", kDniStack); - VideoHandle atrus = _vm->_video->playMovie(_video, 215, 77); - _vm->_video->setVideoBounds(atrus, Audio::Timestamp(0, 0, 600), Audio::Timestamp(0, 98000, 600)); + VideoHandle atrus = _vm->_video->playMovie(_video); + if (!atrus) + error("Failed to open '%s'", _video.c_str()); + + atrus->moveTo(215, 77); + atrus->setBounds(Audio::Timestamp(0, 0, 600), Audio::Timestamp(0, 98000, 600)); _waitForLoop = true; _loopStart = 73095; @@ -139,9 +143,13 @@ void Dni::atrusLeft_run() { void Dni::loopVideo_run() { if (!_vm->_video->isVideoPlaying()) { - VideoHandle atrus = _vm->_video->playMovie(_video, 215, 77); - _vm->_video->setVideoBounds(atrus, Audio::Timestamp(0, _loopStart, 600), Audio::Timestamp(0, _loopEnd, 600)); - _vm->_video->setVideoLooping(atrus, true); + VideoHandle atrus = _vm->_video->playMovie(_video); + if (!atrus) + error("Failed to open '%s'", _video.c_str()); + + atrus->moveTo(215, 77); + atrus->setBounds(Audio::Timestamp(0, _loopStart, 600), Audio::Timestamp(0, _loopEnd, 600)); + atrus->setLooping(true); _waitForLoop = false; } @@ -155,14 +163,23 @@ void Dni::atrus_run() { // Atrus asking for page if (!_vm->_video->isVideoPlaying()) { _video = _vm->wrapMovieFilename("atr1page", kDniStack); - VideoHandle atrus = _vm->_video->playMovie(_video, 215, 77, true); - _vm->_video->setVideoBounds(atrus, Audio::Timestamp(0, 7388, 600), Audio::Timestamp(0, 14700, 600)); + VideoHandle atrus = _vm->_video->playMovie(_video); + if (!atrus) + error("Failed to open '%s'", _video.c_str()); + + atrus->moveTo(215, 77); + atrus->setLooping(true); + atrus->setBounds(Audio::Timestamp(0, 7388, 600), Audio::Timestamp(0, 14700, 600)); } } else if (_globals.ending != 3 && _globals.ending != 4) { if (_globals.heldPage == 13) { _video = _vm->wrapMovieFilename("atr1page", kDniStack); - VideoHandle atrus = _vm->_video->playMovie(_video, 215, 77); - _vm->_video->setVideoBounds(atrus, Audio::Timestamp(0, 0, 600), Audio::Timestamp(0, 14700, 600)); + VideoHandle atrus = _vm->_video->playMovie(_video); + if (!atrus) + error("Failed to open '%s'", _video.c_str()); + + atrus->moveTo(215, 77); + atrus->setBounds(Audio::Timestamp(0, 0, 600), Audio::Timestamp(0, 14700, 600)); _waitForLoop = true; _loopStart = 7388; @@ -173,8 +190,12 @@ void Dni::atrus_run() { } else { _video = _vm->wrapMovieFilename("atr1nopg", kDniStack); - VideoHandle atrus = _vm->_video->playMovie(_video, 215, 77); - _vm->_video->setVideoBounds(atrus, Audio::Timestamp(0, 0, 600), Audio::Timestamp(0, 46175, 600)); + VideoHandle atrus = _vm->_video->playMovie(_video); + if (!atrus) + error("Failed to open '%s'", _video.c_str()); + + atrus->moveTo(215, 77); + atrus->setBounds(Audio::Timestamp(0, 0, 600), Audio::Timestamp(0, 46175, 600)); _waitForLoop = true; _loopStart = 30656; @@ -184,7 +205,12 @@ void Dni::atrus_run() { _globals.ending = 3; } } else if (!_vm->_video->isVideoPlaying()) { - _vm->_video->playMovie(_vm->wrapMovieFilename("atrwrite", kDniStack), 215, 77, true); + VideoHandle handle = _vm->_video->playMovie(_vm->wrapMovieFilename("atrwrite", kDniStack)); + if (!handle) + error("Failed to open atrwrite movie"); + + handle->moveTo(215, 77); + handle->setLooping(true); } } |