aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/mohawk/console.cpp8
-rw-r--r--engines/mohawk/livingbooks.cpp4
-rw-r--r--engines/mohawk/myst.cpp4
-rw-r--r--engines/mohawk/myst_areas.cpp4
-rw-r--r--engines/mohawk/myst_stacks/channelwood.cpp34
-rw-r--r--engines/mohawk/myst_stacks/dni.cpp12
-rw-r--r--engines/mohawk/myst_stacks/intro.cpp12
-rw-r--r--engines/mohawk/myst_stacks/mechanical.cpp8
-rw-r--r--engines/mohawk/myst_stacks/myst.cpp52
-rw-r--r--engines/mohawk/myst_stacks/selenitic.cpp2
-rw-r--r--engines/mohawk/myst_stacks/stoneship.cpp14
-rw-r--r--engines/mohawk/riven.cpp4
-rw-r--r--engines/mohawk/riven_external.cpp102
-rw-r--r--engines/mohawk/riven_scripts.cpp18
-rw-r--r--engines/mohawk/riven_scripts.h2
-rw-r--r--engines/mohawk/video.cpp24
-rw-r--r--engines/mohawk/video.h20
17 files changed, 162 insertions, 162 deletions
diff --git a/engines/mohawk/console.cpp b/engines/mohawk/console.cpp
index d5170b2813..1f06663541 100644
--- a/engines/mohawk/console.cpp
+++ b/engines/mohawk/console.cpp
@@ -252,13 +252,13 @@ bool MystConsole::Cmd_PlayMovie(int argc, const char **argv) {
}
if (argc == 2)
- _vm->_video->playBackgroundMovie(argv[1], 0, 0);
+ _vm->_video->playMovie(argv[1], 0, 0);
else if (argc == 3)
- _vm->_video->playBackgroundMovie(_vm->wrapMovieFilename(argv[1], stackNum - 1), 0, 0);
+ _vm->_video->playMovie(_vm->wrapMovieFilename(argv[1], stackNum - 1), 0, 0);
else if (argc == 4)
- _vm->_video->playBackgroundMovie(argv[1], atoi(argv[2]), atoi(argv[3]));
+ _vm->_video->playMovie(argv[1], atoi(argv[2]), atoi(argv[3]));
else
- _vm->_video->playBackgroundMovie(_vm->wrapMovieFilename(argv[1], stackNum - 1), atoi(argv[3]), atoi(argv[4]));
+ _vm->_video->playMovie(_vm->wrapMovieFilename(argv[1], stackNum - 1), atoi(argv[3]), atoi(argv[4]));
return false;
}
diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp
index b269788755..d2c539cc06 100644
--- a/engines/mohawk/livingbooks.cpp
+++ b/engines/mohawk/livingbooks.cpp
@@ -190,7 +190,7 @@ Common::Error MohawkEngine_LivingBooks::run() {
updatePage();
- if (_video->updateBackgroundMovies())
+ if (_video->updateMovies())
_needsUpdate = true;
if (_needsUpdate) {
@@ -3353,7 +3353,7 @@ void LBMovieItem::update() {
bool LBMovieItem::togglePlaying(bool playing, bool restart) {
if (playing) {
if ((!_neverEnabled && _enabled && _globalEnabled) || _phase == 0x7FFF) {
- _vm->_video->playBackgroundMovie(_resourceId, _rect.left, _rect.top);
+ _vm->_video->playMovie(_resourceId, _rect.left, _rect.top);
return true;
}
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp
index cf12fea541..af0d621572 100644
--- a/engines/mohawk/myst.cpp
+++ b/engines/mohawk/myst.cpp
@@ -295,7 +295,7 @@ Common::Error MohawkEngine_Myst::run() {
Common::Event event;
while (!shouldQuit()) {
// Update any background videos
- _needsUpdate = _video->updateBackgroundMovies();
+ _needsUpdate = _video->updateMovies();
_scriptParser->runPersistentScripts();
while (_eventMan->pollEvent(event)) {
@@ -531,7 +531,7 @@ void MohawkEngine_Myst::changeToStack(uint16 stack, uint16 card, uint16 linkSrcS
}
if (flyby)
- _video->playMovieCentered(wrapMovieFilename(flyby, kMasterpieceOnly));
+ _video->playMovieBlockingCentered(wrapMovieFilename(flyby, kMasterpieceOnly));
}
changeToCard(card, true);
diff --git a/engines/mohawk/myst_areas.cpp b/engines/mohawk/myst_areas.cpp
index c69fd47633..2388478ba3 100644
--- a/engines/mohawk/myst_areas.cpp
+++ b/engines/mohawk/myst_areas.cpp
@@ -206,10 +206,10 @@ VideoHandle MystResourceType6::playMovie() {
// If the video is not running, play it
if (handle == NULL_VID_HANDLE || _vm->_video->endOfVideo(handle)) {
if (_playBlocking) {
- _vm->_video->playMovie(_videoFile, _left, _top);
+ _vm->_video->playMovieBlocking(_videoFile, _left, _top);
handle = NULL_VID_HANDLE;
} else {
- handle = _vm->_video->playBackgroundMovie(_videoFile, _left, _top, _loop);
+ handle = _vm->_video->playMovie(_videoFile, _left, _top, _loop);
}
}
diff --git a/engines/mohawk/myst_stacks/channelwood.cpp b/engines/mohawk/myst_stacks/channelwood.cpp
index a6c9c49049..df9e4b71e4 100644
--- a/engines/mohawk/myst_stacks/channelwood.cpp
+++ b/engines/mohawk/myst_stacks/channelwood.cpp
@@ -238,10 +238,10 @@ void MystScriptParser_Channelwood::opcode_101(uint16 op, uint16 var, uint16 argc
// of start and finish points.
if (!_vm->_varStore->getVar(6)) {
// Play Pipe Extending i.e. 0 to 1/2 way through file
- _vm->_video->playMovie(_vm->wrapMovieFilename("pipebrid", kChannelwoodStack), 267, 170);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("pipebrid", kChannelwoodStack), 267, 170);
} else {
// Play Pipe Retracting i.e. 1/2 way to end of file
- _vm->_video->playMovie(_vm->wrapMovieFilename("pipebrid", kChannelwoodStack), 267, 170);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("pipebrid", kChannelwoodStack), 267, 170);
}
} else
unknown(op, var, argc, argv);
@@ -397,16 +397,16 @@ void MystScriptParser_Channelwood::opcode_117(uint16 op, uint16 var, uint16 argc
switch (button) {
case 0:
- _vm->_video->playMovie(_vm->wrapMovieFilename("monalgh", kChannelwoodStack), 227, 71);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("monalgh", kChannelwoodStack), 227, 71);
break;
case 1:
- _vm->_video->playMovie(_vm->wrapMovieFilename("monamth", kChannelwoodStack), 227, 71);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("monamth", kChannelwoodStack), 227, 71);
break;
case 2:
- _vm->_video->playMovie(_vm->wrapMovieFilename("monasirs", kChannelwoodStack), 227, 71);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("monasirs", kChannelwoodStack), 227, 71);
break;
case 3:
- _vm->_video->playMovie(_vm->wrapMovieFilename("monsmsg", kChannelwoodStack), 227, 71);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("monsmsg", kChannelwoodStack), 227, 71);
break;
default:
warning("Opcode %d Control Variable Out of Range", op);
@@ -435,16 +435,16 @@ void MystScriptParser_Channelwood::opcode_119(uint16 op, uint16 var, uint16 argc
// TODO: Not 100% sure about movie position...
switch (_vm->_varStore->getVar(17)) {
case 0:
- _vm->_video->playMovie(_vm->wrapMovieFilename("holoalgh", kChannelwoodStack), 126, 74);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("holoalgh", kChannelwoodStack), 126, 74);
break;
case 1:
- _vm->_video->playMovie(_vm->wrapMovieFilename("holoamth", kChannelwoodStack), 126, 74);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("holoamth", kChannelwoodStack), 126, 74);
break;
case 2:
- _vm->_video->playMovie(_vm->wrapMovieFilename("holoasir", kChannelwoodStack), 126, 74);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("holoasir", kChannelwoodStack), 126, 74);
break;
case 3:
- _vm->_video->playMovie(_vm->wrapMovieFilename("holosmsg", kChannelwoodStack), 126, 74);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("holosmsg", kChannelwoodStack), 126, 74);
break;
default:
warning("Opcode %d Control Variable Out of Range", op);
@@ -509,19 +509,19 @@ void MystScriptParser_Channelwood::opcode_201(uint16 op, uint16 var, uint16 argc
// TODO: Fill in Function. Video Playback? Rect from invoking hotspot resource...
if (false) {
// Card 3161
- _vm->_video->playMovie(_vm->wrapMovieFilename("bridge", kChannelwoodStack), 292, 204);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("bridge", kChannelwoodStack), 292, 204);
// Card 3247
- _vm->_video->playMovie(_vm->wrapMovieFilename("welev1dn", kChannelwoodStack), 214, 107);
- _vm->_video->playMovie(_vm->wrapMovieFilename("welev1up", kChannelwoodStack), 214, 107);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("welev1dn", kChannelwoodStack), 214, 107);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("welev1up", kChannelwoodStack), 214, 107);
// Card 3252
- _vm->_video->playMovie(_vm->wrapMovieFilename("welev2dn", kChannelwoodStack), 215, 118);
- _vm->_video->playMovie(_vm->wrapMovieFilename("welev2up", kChannelwoodStack), 215, 118);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("welev2dn", kChannelwoodStack), 215, 118);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("welev2up", kChannelwoodStack), 215, 118);
// Card 3259
- _vm->_video->playMovie(_vm->wrapMovieFilename("welev3dn", kChannelwoodStack), 213, 99);
- _vm->_video->playMovie(_vm->wrapMovieFilename("welev3up", kChannelwoodStack), 213, 99);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("welev3dn", kChannelwoodStack), 213, 99);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("welev3up", kChannelwoodStack), 213, 99);
}
} else
unknown(op, var, argc, argv);
diff --git a/engines/mohawk/myst_stacks/dni.cpp b/engines/mohawk/myst_stacks/dni.cpp
index b6becff793..d79170c41b 100644
--- a/engines/mohawk/myst_stacks/dni.cpp
+++ b/engines/mohawk/myst_stacks/dni.cpp
@@ -121,7 +121,7 @@ void MystScriptParser_Dni::o_handPage(uint16 op, uint16 var, uint16 argc, uint16
void MystScriptParser_Dni::atrusLeft_run() {
if (_vm->_system->getMillis() > _atrusLeftTime + 63333) {
_video = _vm->wrapMovieFilename("atrus2", kDniStack);
- VideoHandle atrus = _vm->_video->playBackgroundMovie(_video, 215, 77);
+ VideoHandle atrus = _vm->_video->playMovie(_video, 215, 77);
_vm->_video->setVideoBounds(atrus, Graphics::VideoTimestamp(0, 600), Graphics::VideoTimestamp(98000, 600));
_waitForLoop = true;
@@ -139,7 +139,7 @@ void MystScriptParser_Dni::atrusLeft_run() {
void MystScriptParser_Dni::loopVideo_run() {
if (!_vm->_video->isVideoPlaying()) {
- VideoHandle atrus = _vm->_video->playBackgroundMovie(_video, 215, 77);
+ VideoHandle atrus = _vm->_video->playMovie(_video, 215, 77);
_vm->_video->setVideoBounds(atrus, Graphics::VideoTimestamp(_loopStart, 600), Graphics::VideoTimestamp(_loopEnd, 600));
_vm->_video->setVideoLooping(atrus, true);
@@ -155,13 +155,13 @@ void MystScriptParser_Dni::atrus_run() {
// Atrus asking for page
if (!_vm->_video->isVideoPlaying()) {
_video = _vm->wrapMovieFilename("atr1page", kDniStack);
- VideoHandle atrus = _vm->_video->playBackgroundMovie(_video, 215, 77, true);
+ VideoHandle atrus = _vm->_video->playMovie(_video, 215, 77, true);
_vm->_video->setVideoBounds(atrus, Graphics::VideoTimestamp(7388, 600), Graphics::VideoTimestamp(14700, 600));
}
} else if (_globals.ending != 3 && _globals.ending != 4) {
if (_globals.heldPage == 13) {
_video = _vm->wrapMovieFilename("atr1page", kDniStack);
- VideoHandle atrus = _vm->_video->playBackgroundMovie(_video, 215, 77);
+ VideoHandle atrus = _vm->_video->playMovie(_video, 215, 77);
_vm->_video->setVideoBounds(atrus, Graphics::VideoTimestamp(0, 600), Graphics::VideoTimestamp(14700, 600));
_waitForLoop = true;
@@ -173,7 +173,7 @@ void MystScriptParser_Dni::atrus_run() {
} else {
_video = _vm->wrapMovieFilename("atr1nopg", kDniStack);
- VideoHandle atrus = _vm->_video->playBackgroundMovie(_video, 215, 77);
+ VideoHandle atrus = _vm->_video->playMovie(_video, 215, 77);
_vm->_video->setVideoBounds(atrus, Graphics::VideoTimestamp(0, 600), Graphics::VideoTimestamp(46175, 600));
_waitForLoop = true;
@@ -184,7 +184,7 @@ void MystScriptParser_Dni::atrus_run() {
_globals.ending = 3;
}
} else if (!_vm->_video->isVideoPlaying()) {
- _vm->_video->playBackgroundMovie(_vm->wrapMovieFilename("atrwrite", kDniStack), 215, 77, true);
+ _vm->_video->playMovie(_vm->wrapMovieFilename("atrwrite", kDniStack), 215, 77, true);
}
}
diff --git a/engines/mohawk/myst_stacks/intro.cpp b/engines/mohawk/myst_stacks/intro.cpp
index 4d5801009e..a4a8cf2a89 100644
--- a/engines/mohawk/myst_stacks/intro.cpp
+++ b/engines/mohawk/myst_stacks/intro.cpp
@@ -104,7 +104,7 @@ void MystScriptParser_Intro::introMovies_run() {
case 0:
// Play the Mattel (or UbiSoft) logo in the Myst ME Mac version
if ((_vm->getFeatures() & GF_ME) && _vm->getPlatform() == Common::kPlatformMacintosh) {
- _vm->_video->playBackgroundMovie(_vm->wrapMovieFilename("mattel", kIntroStack));
+ _vm->_video->playMovie(_vm->wrapMovieFilename("mattel", kIntroStack));
_introStep = 1;
} else
_introStep = 2;
@@ -116,9 +116,9 @@ void MystScriptParser_Intro::introMovies_run() {
case 2:
_introStep = 3;
if ((_vm->getFeatures() & GF_ME) && _vm->getPlatform() == Common::kPlatformMacintosh)
- _vm->_video->playBackgroundMovie(_vm->wrapMovieFilename("presto", kIntroStack));
+ _vm->_video->playMovie(_vm->wrapMovieFilename("presto", kIntroStack));
else
- _vm->_video->playBackgroundMovie(_vm->wrapMovieFilename("broder", kIntroStack));
+ _vm->_video->playMovie(_vm->wrapMovieFilename("broder", kIntroStack));
break;
case 3:
if (!_vm->_video->isVideoPlaying())
@@ -126,7 +126,7 @@ void MystScriptParser_Intro::introMovies_run() {
break;
case 4:
_introStep = 5;
- _vm->_video->playBackgroundMovie(_vm->wrapMovieFilename("cyanlogo", kIntroStack));
+ _vm->_video->playMovie(_vm->wrapMovieFilename("cyanlogo", kIntroStack));
break;
case 5:
if (!_vm->_video->isVideoPlaying())
@@ -139,9 +139,9 @@ void MystScriptParser_Intro::introMovies_run() {
if ((_vm->getFeatures() & GF_ME) && _vm->getPlatform() == Common::kPlatformMacintosh)
// intro.mov uses Sorenson, introc uses Cinepak. Otherwise, they're the same.
// TODO: Switch back to the SVQ version when we support it
- _vm->_video->playBackgroundMovie(_vm->wrapMovieFilename("introc", kIntroStack));
+ _vm->_video->playMovie(_vm->wrapMovieFilename("introc", kIntroStack));
else
- _vm->_video->playBackgroundMovie(_vm->wrapMovieFilename("intro", kIntroStack));
+ _vm->_video->playMovie(_vm->wrapMovieFilename("intro", kIntroStack));
}
break;
case 7:
diff --git a/engines/mohawk/myst_stacks/mechanical.cpp b/engines/mohawk/myst_stacks/mechanical.cpp
index f0fcab9a15..96b9883ca4 100644
--- a/engines/mohawk/myst_stacks/mechanical.cpp
+++ b/engines/mohawk/myst_stacks/mechanical.cpp
@@ -224,10 +224,10 @@ void MystScriptParser_Mechanical::opcode_105(uint16 op, uint16 var, uint16 argc,
if (_vm->_varStore->getVar(10)) {
// TODO: Play Movie from 0 to 1/2 way...
- _vm->_video->playMovie(_vm->wrapMovieFilename("hhstairs", kMechanicalStack), 174, 222);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("hhstairs", kMechanicalStack), 174, 222);
} else {
// TODO: Play Movie from 1/2 way to end...
- _vm->_video->playMovie(_vm->wrapMovieFilename("hhstairs", kMechanicalStack), 174, 222);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("hhstairs", kMechanicalStack), 174, 222);
}
}
}
@@ -243,7 +243,7 @@ void MystScriptParser_Mechanical::opcode_121(uint16 op, uint16 var, uint16 argc,
warning("TODO: Opcode %d Movie Time Index %d to %d\n", op, startTime, endTime);
// TODO: Need version of playMovie blocking which allows selection
// of start and finish points.
- _vm->_video->playMovie(_vm->wrapMovieFilename("ewindow", kMechanicalStack), 253, 0);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("ewindow", kMechanicalStack), 253, 0);
} else
unknown(op, var, argc, argv);
}
@@ -270,7 +270,7 @@ void MystScriptParser_Mechanical::opcode_123(uint16 op, uint16 var, uint16 argc,
// TODO: Need version of playMovie blocking which allows selection
// of start and finish points.
// TODO: Not 100% sure about movie position
- _vm->_video->playMovie(_vm->wrapMovieFilename("hcelev", kMechanicalStack), 205, 40);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("hcelev", kMechanicalStack), 205, 40);
} else
unknown(op, var, argc, argv);
}
diff --git a/engines/mohawk/myst_stacks/myst.cpp b/engines/mohawk/myst_stacks/myst.cpp
index 9120e77b7b..8682477a6b 100644
--- a/engines/mohawk/myst_stacks/myst.cpp
+++ b/engines/mohawk/myst_stacks/myst.cpp
@@ -880,9 +880,9 @@ void MystScriptParser_Myst::o_fireplaceRotation(uint16 op, uint16 var, uint16 ar
debugC(kDebugScript, "\tmovieNum: %d", movieNum);
if (movieNum)
- _vm->_video->playMovie(_vm->wrapMovieFilename("fpout", kMystStack), 167, 4);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("fpout", kMystStack), 167, 4);
else
- _vm->_video->playMovie(_vm->wrapMovieFilename("fpin", kMystStack), 167, 4);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("fpin", kMystStack), 167, 4);
}
void MystScriptParser_Myst::o_courtyardBoxesCheckSolution(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
@@ -1132,7 +1132,7 @@ void MystScriptParser_Myst::o_clockWheelsExecute(uint16 op, uint16 var, uint16 a
_vm->_system->delayMillis(500);
// Gears rise up
- VideoHandle gears = _vm->_video->playBackgroundMovie(_vm->wrapMovieFilename("gears", kMystStack), 305, 33);
+ VideoHandle gears = _vm->_video->playMovie(_vm->wrapMovieFilename("gears", kMystStack), 305, 33);
_vm->_video->setVideoBounds(gears, Graphics::VideoTimestamp(0, 600), Graphics::VideoTimestamp(650, 600));
_vm->_video->waitUntilMovieEnds(gears);
@@ -1144,7 +1144,7 @@ void MystScriptParser_Myst::o_clockWheelsExecute(uint16 op, uint16 var, uint16 a
_vm->_system->delayMillis(500);
// Gears sink down
- VideoHandle gears = _vm->_video->playBackgroundMovie(_vm->wrapMovieFilename("gears", kMystStack), 305, 33);
+ VideoHandle gears = _vm->_video->playMovie(_vm->wrapMovieFilename("gears", kMystStack), 305, 33);
_vm->_video->setVideoBounds(gears, Graphics::VideoTimestamp(700, 600), Graphics::VideoTimestamp(1300, 600));
_vm->_video->waitUntilMovieEnds(gears);
@@ -1188,14 +1188,14 @@ void MystScriptParser_Myst::o_imagerPlayButton(uint16 op, uint16 var, uint16 arg
if (_state.imagerActive) {
// Mountains disappearing
Common::String file = _vm->wrapMovieFilename("vltmntn", kMystStack);
- VideoHandle mountain = _vm->_video->playBackgroundMovie(file, 159, 96, false);
+ VideoHandle mountain = _vm->_video->playMovie(file, 159, 96, false);
_vm->_video->setVideoBounds(mountain, Graphics::VideoTimestamp(11180, 600), Graphics::VideoTimestamp(16800, 600));
_state.imagerActive = 0;
} else {
// Mountains appearing
Common::String file = _vm->wrapMovieFilename("vltmntn", kMystStack);
- VideoHandle mountain = _vm->_video->playBackgroundMovie(file, 159, 96, false);
+ VideoHandle mountain = _vm->_video->playMovie(file, 159, 96, false);
_vm->_video->setVideoBounds(mountain, Graphics::VideoTimestamp(0, 600), Graphics::VideoTimestamp(11180, 600));
_state.imagerActive = 1;
@@ -1318,10 +1318,10 @@ void MystScriptParser_Myst::o_towerElevatorAnimation(uint16 op, uint16 var, uint
switch (argv[0]) {
case 0:
- _vm->_video->playMovie(_vm->wrapMovieFilename("libdown", kMystStack), 216, 78);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("libdown", kMystStack), 216, 78);
break;
case 1:
- _vm->_video->playMovie(_vm->wrapMovieFilename("libup", kMystStack), 216, 78);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("libup", kMystStack), 216, 78);
break;
default:
break;
@@ -2198,12 +2198,12 @@ void MystScriptParser_Myst::rocketCheckSolution() {
// Book appearing
Common::String movieFile = _vm->wrapMovieFilename("selenbok", kMystStack);
- _rocketLinkBook = _vm->_video->playBackgroundMovie(movieFile, 224, 41);
+ _rocketLinkBook = _vm->_video->playMovie(movieFile, 224, 41);
_vm->_video->setVideoBounds(_rocketLinkBook, Graphics::VideoTimestamp(0, 600), Graphics::VideoTimestamp(660, 600));
_vm->_video->waitUntilMovieEnds(_rocketLinkBook);
// Book looping closed
- _rocketLinkBook = _vm->_video->playBackgroundMovie(movieFile, 224, 41, true);
+ _rocketLinkBook = _vm->_video->playMovie(movieFile, 224, 41, true);
_vm->_video->setVideoBounds(_rocketLinkBook, Graphics::VideoTimestamp(660, 600), Graphics::VideoTimestamp(3500, 600));
_tempVar = 1;
@@ -2847,7 +2847,7 @@ void MystScriptParser_Myst::clockGearForwardOneStep(uint16 gear) {
// Set video bounds
uint16 gearPosition = _clockGearsPositions[gear] - 1;
- _clockGearsVideos[gear] = _vm->_video->playBackgroundMovie(_vm->wrapMovieFilename(videos[gear], kMystStack), x[gear], y[gear]);
+ _clockGearsVideos[gear] = _vm->_video->playMovie(_vm->wrapMovieFilename(videos[gear], kMystStack), x[gear], y[gear]);
_vm->_video->setVideoBounds(_clockGearsVideos[gear],
Graphics::VideoTimestamp(startTime[gearPosition], 600),
Graphics::VideoTimestamp(endTime[gearPosition], 600));
@@ -2855,7 +2855,7 @@ void MystScriptParser_Myst::clockGearForwardOneStep(uint16 gear) {
void MystScriptParser_Myst::clockWeightDownOneStep() {
// Set video bounds
- _clockWeightVideo = _vm->_video->playBackgroundMovie(_vm->wrapMovieFilename("cl1wlfch", kMystStack) , 124, 0);
+ _clockWeightVideo = _vm->_video->playMovie(_vm->wrapMovieFilename("cl1wlfch", kMystStack) , 124, 0);
_vm->_video->setVideoBounds(_clockWeightVideo,
Graphics::VideoTimestamp(_clockWeightPosition, 600),
Graphics::VideoTimestamp(_clockWeightPosition + 246, 600));
@@ -2917,7 +2917,7 @@ void MystScriptParser_Myst::clockGearsCheckSolution() {
// Make weight go down
_vm->_sound->replaceSound(9113);
- _clockWeightVideo = _vm->_video->playBackgroundMovie(_vm->wrapMovieFilename("cl1wlfch", kMystStack) , 124, 0);
+ _clockWeightVideo = _vm->_video->playMovie(_vm->wrapMovieFilename("cl1wlfch", kMystStack) , 124, 0);
_vm->_video->setVideoBounds(_clockWeightVideo,
Graphics::VideoTimestamp(_clockWeightPosition, 600),
Graphics::VideoTimestamp(2214, 600));
@@ -2929,7 +2929,7 @@ void MystScriptParser_Myst::clockGearsCheckSolution() {
_vm->_sound->replaceSound(7113);
// Gear opening video
- _vm->_video->playMovie(_vm->wrapMovieFilename("cl1wggat", kMystStack) , 195, 225);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("cl1wggat", kMystStack) , 195, 225);
_state.gearsOpen = 1;
_vm->redrawArea(40);
@@ -3003,7 +3003,7 @@ void MystScriptParser_Myst::clockReset() {
void MystScriptParser_Myst::clockResetWeight() {
// Set video bounds, weight going up
if (!(_vm->getFeatures() & GF_ME)) {
- _clockWeightVideo = _vm->_video->playBackgroundMovie(_vm->wrapMovieFilename("cl1wlfch", kMystStack) , 124, 0);
+ _clockWeightVideo = _vm->_video->playMovie(_vm->wrapMovieFilename("cl1wlfch", kMystStack) , 124, 0);
_vm->_video->setVideoBounds(_clockWeightVideo,
Graphics::VideoTimestamp(2214 * 2 - _clockWeightPosition, 600),
Graphics::VideoTimestamp(2214 * 2, 600));
@@ -3025,7 +3025,7 @@ void MystScriptParser_Myst::clockResetGear(uint16 gear) {
// Set video bounds, gears going to 3
uint16 gearPosition = _clockGearsPositions[gear] - 1;
if (gearPosition != 2) {
- _clockGearsVideos[gear] = _vm->_video->playBackgroundMovie(_vm->wrapMovieFilename(videos[gear], kMystStack), x[gear], y[gear]);
+ _clockGearsVideos[gear] = _vm->_video->playMovie(_vm->wrapMovieFilename(videos[gear], kMystStack), x[gear], y[gear]);
_vm->_video->setVideoBounds(_clockGearsVideos[gear],
Graphics::VideoTimestamp(time[gearPosition], 600),
Graphics::VideoTimestamp(time[2], 600));
@@ -3354,7 +3354,7 @@ void MystScriptParser_Myst::gullsFly1_run() {
else
x = _vm->_rnd->getRandomNumber(160) + 260;
- _vm->_video->playBackgroundMovie(_vm->wrapMovieFilename(gulls[video], kMystStack), x, 0);
+ _vm->_video->playMovie(_vm->wrapMovieFilename(gulls[video], kMystStack), x, 0);
_gullsNextTime = time + _vm->_rnd->getRandomNumber(16667) + 13334;
}
@@ -3500,7 +3500,7 @@ void MystScriptParser_Myst::gullsFly2_run() {
if (time > _gullsNextTime) {
uint16 video = _vm->_rnd->getRandomNumber(3);
if (video != 3) {
- _vm->_video->playBackgroundMovie(_vm->wrapMovieFilename(gulls[video], kMystStack), 424, 0);
+ _vm->_video->playMovie(_vm->wrapMovieFilename(gulls[video], kMystStack), 424, 0);
_gullsNextTime = time + _vm->_rnd->getRandomNumber(16667) + 13334;
}
@@ -3529,15 +3529,15 @@ void MystScriptParser_Myst::opcode_218(uint16 op, uint16 var, uint16 argc, uint1
// Used for Card 4097 (Cabin Boiler)
// TODO: Fill in logic
if (false) {
- _vm->_video->playMovie(_vm->wrapMovieFilename("cabfirfr", kMystStack), 254, 244);
- _vm->_video->playMovie(_vm->wrapMovieFilename("cabcgfar", kMystStack), 254, 138);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("cabfirfr", kMystStack), 254, 244);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("cabcgfar", kMystStack), 254, 138);
}
// Used for Card 4098 (Cabin Boiler)
// TODO: Fill in logic
if (false) {
- _vm->_video->playMovie(_vm->wrapMovieFilename("cabfire", kMystStack), 240, 279);
- _vm->_video->playMovie(_vm->wrapMovieFilename("cabingau", kMystStack), 243, 97);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("cabfire", kMystStack), 240, 279);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("cabingau", kMystStack), 243, 97);
}
}
@@ -3596,14 +3596,14 @@ void MystScriptParser_Myst::greenBook_run() {
if (_globals.ending != 4) {
_tempVar = 2;
- _vm->_video->playBackgroundMovie(file, 314, 76);
+ _vm->_video->playMovie(file, 314, 76);
} else {
- VideoHandle book = _vm->_video->playBackgroundMovie(file, 314, 76, true);
+ VideoHandle book = _vm->_video->playMovie(file, 314, 76, true);
_vm->_video->setVideoBounds(book, Graphics::VideoTimestamp(loopStart, 600), Graphics::VideoTimestamp(loopEnd, 600));
_tempVar = 0;
}
} else if (_tempVar == 2 && !_vm->_video->isVideoPlaying()) {
- VideoHandle book = _vm->_video->playBackgroundMovie(file, 314, 76);
+ VideoHandle book = _vm->_video->playMovie(file, 314, 76);
_vm->_video->setVideoBounds(book, Graphics::VideoTimestamp(loopStart, 600), Graphics::VideoTimestamp(loopEnd, 600));
_vm->_video->setVideoLooping(book, true);
_tempVar = 0;
@@ -3628,7 +3628,7 @@ void MystScriptParser_Myst::gullsFly3_run() {
if (video != 3) {
uint16 x = _vm->_rnd->getRandomNumber(280) + 135;
- _vm->_video->playBackgroundMovie(_vm->wrapMovieFilename(gulls[video], kMystStack), x, 0);
+ _vm->_video->playMovie(_vm->wrapMovieFilename(gulls[video], kMystStack), x, 0);
_gullsNextTime = time + _vm->_rnd->getRandomNumber(16667) + 13334;
}
diff --git a/engines/mohawk/myst_stacks/selenitic.cpp b/engines/mohawk/myst_stacks/selenitic.cpp
index 1fd76480c0..ab932a87a7 100644
--- a/engines/mohawk/myst_stacks/selenitic.cpp
+++ b/engines/mohawk/myst_stacks/selenitic.cpp
@@ -482,7 +482,7 @@ void MystScriptParser_Selenitic::mazeRunnerPlayVideo(uint16 video, uint16 pos) {
if (!file.empty()) {
const Common::Rect &dest = _mazeRunnerWindow->getRect();
- _vm->_video->playMovie(file, dest.left, dest.top, false);
+ _vm->_video->playMovieBlocking(file, dest.left, dest.top, false);
}
}
diff --git a/engines/mohawk/myst_stacks/stoneship.cpp b/engines/mohawk/myst_stacks/stoneship.cpp
index 90c6ea247f..c20b13960d 100644
--- a/engines/mohawk/myst_stacks/stoneship.cpp
+++ b/engines/mohawk/myst_stacks/stoneship.cpp
@@ -219,7 +219,7 @@ void MystScriptParser_Stoneship::opcode_102(uint16 op, uint16 var, uint16 argc,
warning("TODO: Opcode %d Movie Time Index %d to %d", op, startTime, endTime);
// TODO: Need version of playMovie blocking which allows selection
// of start and finish points.
- _vm->_video->playMovie(_vm->wrapMovieFilename("bkroom", kStoneshipStack), 159, 99);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("bkroom", kStoneshipStack), 159, 99);
} else
unknown(op, var, argc, argv);
}
@@ -329,7 +329,7 @@ void MystScriptParser_Stoneship::opcode_117(uint16 op, uint16 var, uint16 argc,
// Called when Valve Hotspot Clicked.
// TODO: Fill in Function to play right section of movie
// based on valve state and water in chest..
- _vm->_video->playMovie(_vm->wrapMovieFilename("ligspig", kStoneshipStack), 97, 267);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("ligspig", kStoneshipStack), 97, 267);
} else
unknown(op, var, argc, argv);
}
@@ -352,7 +352,7 @@ void MystScriptParser_Stoneship::opcode_119(uint16 op, uint16 var, uint16 argc,
if (argc == 0) {
// Used on Card 2143 (Lighthouse Trapdoor)
// Called when Lock Hotspot Clicked while holding key.
- _vm->_video->playMovie(_vm->wrapMovieFilename("openloc", kStoneshipStack), 187, 72);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("openloc", kStoneshipStack), 187, 72);
} else
unknown(op, var, argc, argv);
}
@@ -370,19 +370,19 @@ void MystScriptParser_Stoneship::opcode_120(uint16 op, uint16 var, uint16 argc,
switch (movieId) {
case 0:
// Card 2251
- _vm->_video->playMovie(_vm->wrapMovieFilename("tunaup", kStoneshipStack), 149, 161);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("tunaup", kStoneshipStack), 149, 161);
break;
case 1:
// Card 2247
- _vm->_video->playMovie(_vm->wrapMovieFilename("tunadown", kStoneshipStack), 218, 150);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("tunadown", kStoneshipStack), 218, 150);
break;
case 2:
// Card 2289
- _vm->_video->playMovie(_vm->wrapMovieFilename("tuncup", kStoneshipStack), 259, 161);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("tuncup", kStoneshipStack), 259, 161);
break;
case 3:
// Card 2285
- _vm->_video->playMovie(_vm->wrapMovieFilename("tuncdown", kStoneshipStack), 166, 150);
+ _vm->_video->playMovieBlocking(_vm->wrapMovieFilename("tuncdown", kStoneshipStack), 166, 150);
break;
default:
warning("Opcode 120 MovieId Out Of Range");
diff --git a/engines/mohawk/riven.cpp b/engines/mohawk/riven.cpp
index 939a1ded82..5ca49de944 100644
--- a/engines/mohawk/riven.cpp
+++ b/engines/mohawk/riven.cpp
@@ -160,7 +160,7 @@ void MohawkEngine_Riven::handleEvents() {
// Update background videos and the water effect
bool needsUpdate = _gfx->runScheduledWaterEffects();
- needsUpdate |= _video->updateBackgroundMovies();
+ needsUpdate |= _video->updateMovies();
while (_eventMan->pollEvent(event)) {
switch (event.type) {
@@ -652,7 +652,7 @@ void MohawkEngine_Riven::delayAndUpdate(uint32 ms) {
while (_system->getMillis() < startTime + ms && !shouldQuit()) {
bool needsUpdate = _gfx->runScheduledWaterEffects();
- needsUpdate |= _video->updateBackgroundMovies();
+ needsUpdate |= _video->updateMovies();
Common::Event event;
while (_system->getEventManager()->pollEvent(event))
diff --git a/engines/mohawk/riven_external.cpp b/engines/mohawk/riven_external.cpp
index 78b1eb25ea..afdf2e4a82 100644
--- a/engines/mohawk/riven_external.cpp
+++ b/engines/mohawk/riven_external.cpp
@@ -218,7 +218,7 @@ void RivenExternal::runDemoBoundaryDialog() {
void RivenExternal::runEndGame(uint16 video) {
_vm->_sound->stopAllSLST();
- _vm->_video->playMovie(video);
+ _vm->_video->playMovieRiven(video);
runCredits(video);
}
@@ -228,7 +228,7 @@ void RivenExternal::runCredits(uint16 video) {
VideoHandle videoHandle = _vm->_video->findVideoHandleRiven(video);
while (!_vm->_video->endOfVideo(videoHandle) && !_vm->shouldQuit()) {
- if (_vm->_video->updateBackgroundMovies())
+ if (_vm->_video->updateMovies())
_vm->_system->updateScreen();
Common::Event event;
@@ -243,7 +243,7 @@ void RivenExternal::runCredits(uint16 video) {
void RivenExternal::runDomeButtonMovie() {
// This command just plays the video of the button moving down and up.
- _vm->_video->playMovieBlocking(2);
+ _vm->_video->playMovieBlockingRiven(2);
}
void RivenExternal::runDomeCheck() {
@@ -830,7 +830,7 @@ void RivenExternal::xbchangeboiler(uint16 argc, uint16 *argv) {
_vm->_sound->playSLST(1, _vm->getCurCard());
_vm->_cursor->setCursor(kRivenHideCursor);
- _vm->_video->playMovieBlocking(11);
+ _vm->_video->playMovieBlockingRiven(11);
}
void RivenExternal::xbupdateboiler(uint16 argc, uint16 *argv) {
@@ -840,14 +840,14 @@ void RivenExternal::xbupdateboiler(uint16 argc, uint16 *argv) {
if (heat) {
if (platform == 0) {
_vm->_video->activateMLST(8, _vm->getCurCard());
- _vm->_video->playMovie(8);
+ _vm->_video->playMovieRiven(8);
} else {
_vm->_video->activateMLST(7, _vm->getCurCard());
- _vm->_video->playMovie(7);
+ _vm->_video->playMovieRiven(7);
}
} else {
- _vm->_video->disableMovie(7);
- _vm->_video->disableMovie(8);
+ _vm->_video->disableMovieRiven(7);
+ _vm->_video->disableMovieRiven(8);
}
}
@@ -988,24 +988,24 @@ void RivenExternal::xvalvecontrol(uint16 argc, uint16 *argv) {
if (*valve == 0 && changeY <= -10) {
*valve = 1;
_vm->_cursor->setCursor(kRivenHideCursor);
- _vm->_video->playMovieBlocking(2);
+ _vm->_video->playMovieBlockingRiven(2);
_vm->refreshCard();
} else if (*valve == 1) {
if (changeX >= 0 && changeY >= 10) {
*valve = 0;
_vm->_cursor->setCursor(kRivenHideCursor);
- _vm->_video->playMovieBlocking(3);
+ _vm->_video->playMovieBlockingRiven(3);
_vm->refreshCard();
} else if (changeX <= -10 && changeY <= 10) {
*valve = 2;
_vm->_cursor->setCursor(kRivenHideCursor);
- _vm->_video->playMovieBlocking(1);
+ _vm->_video->playMovieBlockingRiven(1);
_vm->refreshCard();
}
} else if (*valve == 2 && changeX >= 10) {
*valve = 1;
_vm->_cursor->setCursor(kRivenHideCursor);
- _vm->_video->playMovieBlocking(4);
+ _vm->_video->playMovieBlockingRiven(4);
_vm->refreshCard();
}
done = true;
@@ -1039,7 +1039,7 @@ void RivenExternal::xvalvecontrol(uint16 argc, uint16 *argv) {
void RivenExternal::xbchipper(uint16 argc, uint16 *argv) {
// Why is this an external command....?
if (*_vm->getVar("bvalve") == 2)
- _vm->_video->playMovieBlocking(2);
+ _vm->_video->playMovieBlockingRiven(2);
}
// ------------------------------------------------------------------------------------
@@ -1064,7 +1064,7 @@ void RivenExternal::lowerPins() {
uint32 *upMovie = _vm->getVar("gupmoov");
// Play the video of the pins going down
- VideoHandle handle = _vm->_video->playMovie(*upMovie);
+ VideoHandle handle = _vm->_video->playMovieRiven(*upMovie);
assert(handle != NULL_VID_HANDLE);
_vm->_video->setVideoBounds(handle, Graphics::VideoTimestamp(startTime, 600), Graphics::VideoTimestamp(startTime + 550, 600));
_vm->_video->waitUntilMovieEnds(handle);
@@ -1096,7 +1096,7 @@ void RivenExternal::xgrotatepins(uint16 argc, uint16 *argv) {
_vm->_sound->playSound(12);
// Play the video of the pins rotating
- VideoHandle handle = _vm->_video->playMovie(*_vm->getVar("gupmoov"));
+ VideoHandle handle = _vm->_video->playMovieRiven(*_vm->getVar("gupmoov"));
assert(handle != NULL_VID_HANDLE);
_vm->_video->setVideoBounds(handle, Graphics::VideoTimestamp(startTime, 600), Graphics::VideoTimestamp(startTime + 1215, 600));
_vm->_video->waitUntilMovieEnds(handle);
@@ -1180,7 +1180,7 @@ void RivenExternal::xgpincontrols(uint16 argc, uint16 *argv) {
_vm->_sound->playSound(14);
// Actually play the movie
- VideoHandle handle = _vm->_video->playMovie(pinMovieCodes[imagePos - 1]);
+ VideoHandle handle = _vm->_video->playMovieRiven(pinMovieCodes[imagePos - 1]);
assert(handle != NULL_VID_HANDLE);
uint32 startTime = 9630 - pinPos * 600;
_vm->_video->setVideoBounds(handle, Graphics::VideoTimestamp(startTime, 600), Graphics::VideoTimestamp(startTime + 550, 600));
@@ -1219,7 +1219,7 @@ void RivenExternal::xgisland1490_domecheck(uint16 argc, uint16 *argv) {
void RivenExternal::xgplateau3160_dopools(uint16 argc, uint16 *argv) {
// Play the deactivation of a pool if one is active and a different one is activated
_vm->_cursor->setCursor(kRivenHideCursor);
- _vm->_video->playMovieBlocking(*_vm->getVar("glkbtns") * 2);
+ _vm->_video->playMovieBlockingRiven(*_vm->getVar("glkbtns") * 2);
}
void RivenExternal::xgwt200_scribetime(uint16 argc, uint16 *argv) {
@@ -1257,7 +1257,7 @@ void RivenExternal::xgrviewer(uint16 argc, uint16 *argv) {
uint32 newPos = *curPos + hotspotPositions[_vm->_curHotspot - 1];
// Now play the movie
- VideoHandle handle = _vm->_video->playMovie(1);
+ VideoHandle handle = _vm->_video->playMovieRiven(1);
assert(handle != NULL_VID_HANDLE);
_vm->_video->setVideoBounds(handle, Graphics::VideoTimestamp(s_viewerTimeIntervals[*curPos], 600), Graphics::VideoTimestamp(s_viewerTimeIntervals[newPos], 600));
_vm->_video->waitUntilMovieEnds(handle);
@@ -1308,7 +1308,7 @@ void RivenExternal::xgplaywhark(uint16 argc, uint16 *argv) {
}
// For whatever reason the devs felt fit, code 31 is used for all of the videos
- _vm->_video->playMovieBlocking(31);
+ _vm->_video->playMovieBlockingRiven(31);
_vm->refreshCard();
}
@@ -1326,7 +1326,7 @@ void RivenExternal::xglviewer(uint16 argc, uint16 *argv) {
uint32 newPos = *curPos + hotspotPositions[_vm->_curHotspot - 1];
// Now play the movie
- VideoHandle handle = _vm->_video->playMovie(1);
+ VideoHandle handle = _vm->_video->playMovieRiven(1);
assert(handle != NULL_VID_HANDLE);
_vm->_video->setVideoBounds(handle, Graphics::VideoTimestamp(s_viewerTimeIntervals[*curPos], 600), Graphics::VideoTimestamp(s_viewerTimeIntervals[newPos], 600));
_vm->_video->waitUntilMovieEnds(handle);
@@ -1522,19 +1522,19 @@ void RivenExternal::xvga1300_carriage(uint16 argc, uint16 *argv) {
// Run the gallows's carriage
_vm->_cursor->setCursor(kRivenHideCursor); // Hide the cursor
- _vm->_video->playMovieBlocking(1); // Play handle movie
+ _vm->_video->playMovieBlockingRiven(1); // Play handle movie
_vm->_gfx->scheduleTransition(15); // Set pan down transition
_vm->changeToCard(_vm->matchRMAPToCard(0x18e77)); // Change to card facing up
_vm->_cursor->setCursor(kRivenHideCursor); // Hide the cursor (again)
- _vm->_video->playMovieBlocking(4); // Play carriage beginning to drop
+ _vm->_video->playMovieBlockingRiven(4); // Play carriage beginning to drop
_vm->_gfx->scheduleTransition(14); // Set pan up transition
_vm->changeToCard(_vm->matchRMAPToCard(0x183a9)); // Change to card looking straight again
- _vm->_video->playMovieBlocking(2);
+ _vm->_video->playMovieBlockingRiven(2);
uint32 *gallows = _vm->getVar("jgallows");
if (*gallows == 1) {
// If the gallows is open, play the up movie and return
- _vm->_video->playMovieBlocking(3);
+ _vm->_video->playMovieBlockingRiven(3);
return;
}
@@ -1569,10 +1569,10 @@ void RivenExternal::xvga1300_carriage(uint16 argc, uint16 *argv) {
_vm->_gfx->scheduleTransition(12); // Schedule pan left transition
_vm->changeToCard(_vm->matchRMAPToCard(0x18ab5)); // Turn right
_vm->_cursor->setCursor(kRivenHideCursor); // Hide the cursor
- _vm->_video->playMovieBlocking(1); // Play carriage ride movie
+ _vm->_video->playMovieBlockingRiven(1); // Play carriage ride movie
_vm->changeToCard(_vm->matchRMAPToCard(0x17167)); // We have arrived at the top
} else
- _vm->_video->playMovieBlocking(3); // Too slow!
+ _vm->_video->playMovieBlockingRiven(3); // Too slow!
}
void RivenExternal::xjdome25_resetsliders(uint16 argc, uint16 *argv) {
@@ -1633,8 +1633,8 @@ void RivenExternal::xhandlecontrolup(uint16 argc, uint16 *argv) {
// If we've moved the handle down, go down a floor
if (changeLevel == -1) {
- _vm->_video->playMovieBlocking(1);
- _vm->_video->playMovieBlocking(2);
+ _vm->_video->playMovieBlockingRiven(1);
+ _vm->_video->playMovieBlockingRiven(2);
_vm->changeToCard(_vm->matchRMAPToCard(0x1e374));
}
}
@@ -1644,8 +1644,8 @@ void RivenExternal::xhandlecontroldown(uint16 argc, uint16 *argv) {
// If we've moved the handle up, go up a floor
if (changeLevel == 1) {
- _vm->_video->playMovieBlocking(1);
- _vm->_video->playMovieBlocking(2);
+ _vm->_video->playMovieBlockingRiven(1);
+ _vm->_video->playMovieBlockingRiven(2);
_vm->changeToCard(_vm->matchRMAPToCard(0x1e374));
}
}
@@ -1658,24 +1658,24 @@ void RivenExternal::xhandlecontrolmid(uint16 argc, uint16 *argv) {
// Play the handle moving video
if (changeLevel == 1)
- _vm->_video->playMovieBlocking(7);
+ _vm->_video->playMovieBlockingRiven(7);
else
- _vm->_video->playMovieBlocking(6);
+ _vm->_video->playMovieBlockingRiven(6);
// If the whark's mouth is open, close it
uint32 *mouthVar = _vm->getVar("jwmouth");
if (*mouthVar == 1) {
- _vm->_video->playMovieBlocking(3);
- _vm->_video->playMovieBlocking(8);
+ _vm->_video->playMovieBlockingRiven(3);
+ _vm->_video->playMovieBlockingRiven(8);
*mouthVar = 0;
}
// Play the elevator video and then change the card
if (changeLevel == 1) {
- _vm->_video->playMovieBlocking(5);
+ _vm->_video->playMovieBlockingRiven(5);
_vm->changeToCard(_vm->matchRMAPToCard(0x1e597));
} else {
- _vm->_video->playMovieBlocking(4);
+ _vm->_video->playMovieBlockingRiven(4);
_vm->changeToCard(_vm->matchRMAPToCard(0x1e29c));
}
}
@@ -1717,9 +1717,9 @@ void RivenExternal::xjlagoon1500_alert(uint16 argc, uint16 *argv) {
// Have the sunners move a bit as you get closer ;)
uint32 *sunners = _vm->getVar("jsunners");
if (*sunners == 0) {
- _vm->_video->playMovieBlocking(3);
+ _vm->_video->playMovieBlockingRiven(3);
} else if (*sunners == 1) {
- _vm->_video->playMovieBlocking(2);
+ _vm->_video->playMovieBlockingRiven(2);
*sunners = 2;
}
}
@@ -1768,7 +1768,7 @@ void RivenExternal::xschool280_playwhark(uint16 argc, uint16 *argv) {
_vm->_cursor->setCursor(kRivenHideCursor);
// Play the spin movie
- _vm->_video->playMovieBlocking(spinMLST);
+ _vm->_video->playMovieBlockingRiven(spinMLST);
// Get our random number and redraw the area
uint16 number = _vm->_rnd->getRandomNumberRng(1, 10);
@@ -1777,7 +1777,7 @@ void RivenExternal::xschool280_playwhark(uint16 argc, uint16 *argv) {
// Handle movement
// (11560/600)s is the length of each of the two movies. We divide it into 19 parts
// (one for each of the possible positions the villager can have).
- VideoHandle handle = _vm->_video->playMovie(doomMLST);
+ VideoHandle handle = _vm->_video->playMovieRiven(doomMLST);
Graphics::VideoTimestamp startTime = Graphics::VideoTimestamp((11560 / 19) * (*posVar), 600);
*posVar += number; // Adjust to the end
Graphics::VideoTimestamp endTime = Graphics::VideoTimestamp((11560 / 19) * (*posVar), 600);
@@ -1786,7 +1786,7 @@ void RivenExternal::xschool280_playwhark(uint16 argc, uint16 *argv) {
if (*posVar > 19) {
// The villager has died :(
- _vm->_video->playMovieBlocking(snackMLST);
+ _vm->_video->playMovieBlockingRiven(snackMLST);
redrawWharkNumberPuzzle(overlayPLST, number);
*posVar = 0;
}
@@ -1855,7 +1855,7 @@ void RivenExternal::xbookclick(uint16 argc, uint16 *argv) {
// Just let the video play while we wait until Gehn opens the trap book for us
while (_vm->_video->getElapsedTime(video) < startTime && !_vm->shouldQuit()) {
- if (_vm->_video->updateBackgroundMovies())
+ if (_vm->_video->updateMovies())
_vm->_system->updateScreen();
Common::Event event;
@@ -1878,7 +1878,7 @@ void RivenExternal::xbookclick(uint16 argc, uint16 *argv) {
// OK, Gehn has opened the trap book and has asked us to go in. Let's watch
// and see what the player will do...
while (_vm->_video->getElapsedTime(video) < endTime && !_vm->shouldQuit()) {
- bool updateScreen = _vm->_video->updateBackgroundMovies();
+ bool updateScreen = _vm->_video->updateMovies();
Common::Event event;
while (_vm->_system->getEventManager()->pollEvent(event)) {
@@ -1900,7 +1900,7 @@ void RivenExternal::xbookclick(uint16 argc, uint16 *argv) {
_vm->_gfx->updateScreen(); // Update the screen
_vm->_sound->playSound(0); // Play the link sound
_vm->_video->activateMLST(7, _vm->getCurCard()); // Activate Gehn Link Video
- _vm->_video->playMovieBlocking(1); // Play Gehn Link Video
+ _vm->_video->playMovieBlockingRiven(1); // Play Gehn Link Video
*_vm->getVar("agehn") = 4; // Set Gehn to the trapped state
*_vm->getVar("atrapbook") = 1; // We've got the trap book again
_vm->_sound->playSound(0); // Play the link sound again
@@ -1949,7 +1949,7 @@ void RivenExternal::xooffice30_closebook(uint16 argc, uint16 *argv) {
*book = 0;
// Play the movie
- _vm->_video->playMovieBlocking(1);
+ _vm->_video->playMovieBlockingRiven(1);
// Set the hotspots into their correct states
_vm->_hotspots[2].enabled = false;
@@ -1963,7 +1963,7 @@ void RivenExternal::xooffice30_closebook(uint16 argc, uint16 *argv) {
void RivenExternal::xobedroom5_closedrawer(uint16 argc, uint16 *argv) {
// Close the drawer if open when clicking on the journal.
- _vm->_video->playMovieBlocking(2);
+ _vm->_video->playMovieBlockingRiven(2);
*_vm->getVar("ostanddrawer") = 0;
}
@@ -2039,7 +2039,7 @@ void RivenExternal::xgwatch(uint16 argc, uint16 *argv) {
// Now play the video for the watch
_vm->_video->activateMLST(1, _vm->getCurCard());
- _vm->_video->playMovieBlocking(1);
+ _vm->_video->playMovieBlockingRiven(1);
// And, finally, refresh
_vm->refreshCard();
@@ -2129,7 +2129,7 @@ void RivenExternal::xrwindowsetup(uint16 argc, uint16 *argv) {
void RivenExternal::xtexterior300_telescopedown(uint16 argc, uint16 *argv) {
// First, show the button movie
- _vm->_video->playMovieBlocking(3);
+ _vm->_video->playMovieBlockingRiven(3);
// Don't do anything else if the telescope power is off
if (*_vm->getVar("ttelevalve") == 0)
@@ -2182,7 +2182,7 @@ void RivenExternal::xtexterior300_telescopedown(uint16 argc, uint16 *argv) {
// Play a piece of the moving down movie
static const uint32 timeIntervals[] = { 4320, 3440, 2560, 1760, 880, 0 };
uint16 movieCode = (*telescopeCover) ? 1 : 2;
- VideoHandle handle = _vm->_video->playMovie(movieCode);
+ VideoHandle handle = _vm->_video->playMovieRiven(movieCode);
_vm->_video->setVideoBounds(handle, Graphics::VideoTimestamp(timeIntervals[*telescopePos], 600), Graphics::VideoTimestamp(timeIntervals[*telescopePos - 1], 600));
_vm->_sound->playSound(14); // Play the moving sound
_vm->_video->waitUntilMovieEnds(handle);
@@ -2195,7 +2195,7 @@ void RivenExternal::xtexterior300_telescopedown(uint16 argc, uint16 *argv) {
void RivenExternal::xtexterior300_telescopeup(uint16 argc, uint16 *argv) {
// First, show the button movie
- _vm->_video->playMovieBlocking(3);
+ _vm->_video->playMovieBlockingRiven(3);
// Don't do anything else if the telescope power is off
if (*_vm->getVar("ttelevalve") == 0)
@@ -2214,7 +2214,7 @@ void RivenExternal::xtexterior300_telescopeup(uint16 argc, uint16 *argv) {
// Play a piece of the moving up movie
static const uint32 timeIntervals[] = { 0, 800, 1680, 2560, 3440, 4320 };
uint16 movieCode = (*_vm->getVar("ttelecover")) ? 4 : 5;
- VideoHandle handle = _vm->_video->playMovie(movieCode);
+ VideoHandle handle = _vm->_video->playMovieRiven(movieCode);
_vm->_video->setVideoBounds(handle, Graphics::VideoTimestamp(timeIntervals[*telescopePos - 1], 600), Graphics::VideoTimestamp(timeIntervals[*telescopePos], 600));
_vm->_sound->playSound(14); // Play the moving sound
_vm->_video->waitUntilMovieEnds(handle);
diff --git a/engines/mohawk/riven_scripts.cpp b/engines/mohawk/riven_scripts.cpp
index 8d0743340c..789f42ed82 100644
--- a/engines/mohawk/riven_scripts.cpp
+++ b/engines/mohawk/riven_scripts.cpp
@@ -132,8 +132,8 @@ void RivenScript::setupOpcodes() {
OPCODE(empty), // Set movie rate (not used)
OPCODE(enableMovie),
// 0x20 (32 decimal)
+ OPCODE(playMovieBlocking),
OPCODE(playMovie),
- OPCODE(playMovieBg),
OPCODE(stopMovie),
OPCODE(empty), // Start a water effect (not used)
// 0x24 (36 decimal)
@@ -476,7 +476,7 @@ void RivenScript::changeStack(uint16 op, uint16 argc, uint16 *argv) {
// Command 28: disable a movie
void RivenScript::disableMovie(uint16 op, uint16 argc, uint16 *argv) {
- _vm->_video->disableMovie(argv[0]);
+ _vm->_video->disableMovieRiven(argv[0]);
}
// Command 29: disable all movies
@@ -486,24 +486,24 @@ void RivenScript::disableAllMovies(uint16 op, uint16 argc, uint16 *argv) {
// Command 31: enable a movie
void RivenScript::enableMovie(uint16 op, uint16 argc, uint16 *argv) {
- _vm->_video->enableMovie(argv[0]);
+ _vm->_video->enableMovieRiven(argv[0]);
}
// Command 32: play foreground movie - blocking (movie_id)
-void RivenScript::playMovie(uint16 op, uint16 argc, uint16 *argv) {
+void RivenScript::playMovieBlocking(uint16 op, uint16 argc, uint16 *argv) {
CursorMan.showMouse(false); // Hide the cursor before playing the video
- _vm->_video->playMovieBlocking(argv[0]);
+ _vm->_video->playMovieBlockingRiven(argv[0]);
CursorMan.showMouse(true); // Show the cursor again when we're done ;)
}
// Command 33: play background movie - nonblocking (movie_id)
-void RivenScript::playMovieBg(uint16 op, uint16 argc, uint16 *argv) {
- _vm->_video->playMovie(argv[0]);
+void RivenScript::playMovie(uint16 op, uint16 argc, uint16 *argv) {
+ _vm->_video->playMovieRiven(argv[0]);
}
// Command 34: stop a movie
void RivenScript::stopMovie(uint16 op, uint16 argc, uint16 *argv) {
- _vm->_video->stopMovie(argv[0]);
+ _vm->_video->stopMovieRiven(argv[0]);
}
// Command 36: unknown
@@ -553,7 +553,7 @@ void RivenScript::activateSLST(uint16 op, uint16 argc, uint16 *argv) {
// Command 41: activate MLST record and play
void RivenScript::activateMLSTAndPlay(uint16 op, uint16 argc, uint16 *argv) {
_vm->_video->activateMLST(argv[0], _vm->getCurCard());
- _vm->_video->playMovie(argv[0]);
+ _vm->_video->playMovieRiven(argv[0]);
}
// Command 43: activate BLST record (card hotspot enabling lists)
diff --git a/engines/mohawk/riven_scripts.h b/engines/mohawk/riven_scripts.h
index 57ffa67ca0..072821aa94 100644
--- a/engines/mohawk/riven_scripts.h
+++ b/engines/mohawk/riven_scripts.h
@@ -109,8 +109,8 @@ private:
DECLARE_OPCODE(disableMovie);
DECLARE_OPCODE(disableAllMovies);
DECLARE_OPCODE(enableMovie);
+ DECLARE_OPCODE(playMovieBlocking);
DECLARE_OPCODE(playMovie);
- DECLARE_OPCODE(playMovieBg);
DECLARE_OPCODE(stopMovie);
DECLARE_OPCODE(unk_36);
DECLARE_OPCODE(fadeAmbientSounds);
diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp
index 4e1a544730..b8fc0e7c39 100644
--- a/engines/mohawk/video.cpp
+++ b/engines/mohawk/video.cpp
@@ -74,7 +74,7 @@ void VideoManager::stopVideos() {
_videoStreams.clear();
}
-void VideoManager::playMovie(const Common::String &filename, uint16 x, uint16 y, bool clearScreen) {
+void VideoManager::playMovieBlocking(const Common::String &filename, uint16 x, uint16 y, bool clearScreen) {
VideoHandle videoHandle = createVideoHandle(filename, x, y, false);
if (videoHandle == NULL_VID_HANDLE)
return;
@@ -88,7 +88,7 @@ void VideoManager::playMovie(const Common::String &filename, uint16 x, uint16 y,
waitUntilMovieEnds(videoHandle);
}
-void VideoManager::playMovieCentered(const Common::String &filename, bool clearScreen) {
+void VideoManager::playMovieBlockingCentered(const Common::String &filename, bool clearScreen) {
VideoHandle videoHandle = createVideoHandle(filename, 0, 0, false);
if (videoHandle == NULL_VID_HANDLE)
return;
@@ -112,7 +112,7 @@ void VideoManager::waitUntilMovieEnds(VideoHandle videoHandle) {
bool continuePlaying = true;
while (!_videoStreams[videoHandle].endOfVideo() && !_vm->shouldQuit() && continuePlaying) {
- if (updateBackgroundMovies())
+ if (updateMovies())
_vm->_system->updateScreen();
Common::Event event;
@@ -150,7 +150,7 @@ void VideoManager::delayUntilMovieEnds(VideoHandle videoHandle) {
bool continuePlaying = true;
while (!_videoStreams[videoHandle].endOfVideo() && !_vm->shouldQuit() && continuePlaying) {
- if (updateBackgroundMovies())
+ if (updateMovies())
_vm->_system->updateScreen();
// Cut down on CPU usage
@@ -161,7 +161,7 @@ void VideoManager::delayUntilMovieEnds(VideoHandle videoHandle) {
_videoStreams[videoHandle].clear();
}
-VideoHandle VideoManager::playBackgroundMovie(const Common::String &filename, int16 x, int16 y, bool loop) {
+VideoHandle VideoManager::playMovie(const Common::String &filename, int16 x, int16 y, bool loop) {
VideoHandle videoHandle = createVideoHandle(filename, x, y, loop);
if (videoHandle == NULL_VID_HANDLE)
return NULL_VID_HANDLE;
@@ -177,7 +177,7 @@ VideoHandle VideoManager::playBackgroundMovie(const Common::String &filename, in
return videoHandle;
}
-VideoHandle VideoManager::playBackgroundMovie(uint16 id, int16 x, int16 y, bool loop) {
+VideoHandle VideoManager::playMovie(uint16 id, int16 x, int16 y, bool loop) {
VideoHandle videoHandle = createVideoHandle(id, x, y, loop);
if (videoHandle == NULL_VID_HANDLE)
return NULL_VID_HANDLE;
@@ -193,7 +193,7 @@ VideoHandle VideoManager::playBackgroundMovie(uint16 id, int16 x, int16 y, bool
return videoHandle;
}
-bool VideoManager::updateBackgroundMovies() {
+bool VideoManager::updateMovies() {
bool updateScreen = false;
for (uint32 i = 0; i < _videoStreams.size() && !_vm->shouldQuit(); i++) {
@@ -317,7 +317,7 @@ void VideoManager::clearMLST() {
_mlstRecords.clear();
}
-VideoHandle VideoManager::playMovie(uint16 id) {
+VideoHandle VideoManager::playMovieRiven(uint16 id) {
for (uint16 i = 0; i < _mlstRecords.size(); i++)
if (_mlstRecords[i].code == id) {
debug(1, "Play tMOV %d (non-blocking) at (%d, %d) %s", _mlstRecords[i].movieID, _mlstRecords[i].left, _mlstRecords[i].top, _mlstRecords[i].loop != 0 ? "looping" : "non-looping");
@@ -327,7 +327,7 @@ VideoHandle VideoManager::playMovie(uint16 id) {
return NULL_VID_HANDLE;
}
-void VideoManager::playMovieBlocking(uint16 id) {
+void VideoManager::playMovieBlockingRiven(uint16 id) {
for (uint16 i = 0; i < _mlstRecords.size(); i++)
if (_mlstRecords[i].code == id) {
debug(1, "Play tMOV %d (blocking) at (%d, %d)", _mlstRecords[i].movieID, _mlstRecords[i].left, _mlstRecords[i].top);
@@ -337,7 +337,7 @@ void VideoManager::playMovieBlocking(uint16 id) {
}
}
-void VideoManager::stopMovie(uint16 id) {
+void VideoManager::stopMovieRiven(uint16 id) {
debug(2, "Stopping movie %d", id);
for (uint16 i = 0; i < _mlstRecords.size(); i++)
if (_mlstRecords[i].code == id)
@@ -349,7 +349,7 @@ void VideoManager::stopMovie(uint16 id) {
}
}
-void VideoManager::enableMovie(uint16 id) {
+void VideoManager::enableMovieRiven(uint16 id) {
debug(2, "Enabling movie %d", id);
for (uint16 i = 0; i < _mlstRecords.size(); i++)
if (_mlstRecords[i].code == id)
@@ -360,7 +360,7 @@ void VideoManager::enableMovie(uint16 id) {
}
}
-void VideoManager::disableMovie(uint16 id) {
+void VideoManager::disableMovieRiven(uint16 id) {
debug(2, "Disabling movie %d", id);
for (uint16 i = 0; i < _mlstRecords.size(); i++)
if (_mlstRecords[i].code == id)
diff --git a/engines/mohawk/video.h b/engines/mohawk/video.h
index e0571431e6..43cffb6363 100644
--- a/engines/mohawk/video.h
+++ b/engines/mohawk/video.h
@@ -77,11 +77,11 @@ public:
~VideoManager();
// Generic movie functions
- void playMovie(const Common::String &filename, uint16 x = 0, uint16 y = 0, bool clearScreen = false);
- void playMovieCentered(const Common::String &filename, bool clearScreen = true);
- VideoHandle playBackgroundMovie(const Common::String &filename, int16 x = -1, int16 y = -1, bool loop = false);
- VideoHandle playBackgroundMovie(uint16 id, int16 x = -1, int16 y = -1, bool loop = false);
- bool updateBackgroundMovies();
+ void playMovieBlocking(const Common::String &filename, uint16 x = 0, uint16 y = 0, bool clearScreen = false);
+ void playMovieBlockingCentered(const Common::String &filename, bool clearScreen = true);
+ VideoHandle playMovie(const Common::String &filename, int16 x = -1, int16 y = -1, bool loop = false);
+ VideoHandle playMovie(uint16 id, int16 x = -1, int16 y = -1, bool loop = false);
+ bool updateMovies();
void pauseVideos();
void resumeVideos();
void stopVideos();
@@ -90,12 +90,12 @@ public:
// Riven-related functions
void activateMLST(uint16 mlstId, uint16 card);
void clearMLST();
- void enableMovie(uint16 id);
- void disableMovie(uint16 id);
+ void enableMovieRiven(uint16 id);
+ void disableMovieRiven(uint16 id);
void disableAllMovies();
- VideoHandle playMovie(uint16 id);
- void stopMovie(uint16 id);
- void playMovieBlocking(uint16 id);
+ VideoHandle playMovieRiven(uint16 id);
+ void stopMovieRiven(uint16 id);
+ void playMovieBlockingRiven(uint16 id);
VideoHandle findVideoHandleRiven(uint16 id);
// Handle functions