aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk
diff options
context:
space:
mode:
authorBastien Bouclet2010-11-29 21:02:25 +0000
committerBastien Bouclet2010-11-29 21:02:25 +0000
commit278b8a142952ce041e5fdf9513b18f0e0549ce27 (patch)
tree52928814617633210ba2166db12956e2100aee9e /engines/mohawk
parenta526bdb839ec09523715846904ff6a194578e1e3 (diff)
downloadscummvm-rg350-278b8a142952ce041e5fdf9513b18f0e0549ce27.tar.gz
scummvm-rg350-278b8a142952ce041e5fdf9513b18f0e0549ce27.tar.bz2
scummvm-rg350-278b8a142952ce041e5fdf9513b18f0e0549ce27.zip
MOHAWK: Play videos when the maze runner moves.
svn-id: r54643
Diffstat (limited to 'engines/mohawk')
-rw-r--r--engines/mohawk/myst_scripts_selenitic.cpp136
-rw-r--r--engines/mohawk/myst_scripts_selenitic.h1
2 files changed, 136 insertions, 1 deletions
diff --git a/engines/mohawk/myst_scripts_selenitic.cpp b/engines/mohawk/myst_scripts_selenitic.cpp
index 85a170c08f..be9adf17ef 100644
--- a/engines/mohawk/myst_scripts_selenitic.cpp
+++ b/engines/mohawk/myst_scripts_selenitic.cpp
@@ -353,7 +353,7 @@ bool MystScriptParser_Selenitic::setVarValue(uint16 var, uint16 value) {
}
void MystScriptParser_Selenitic::o_100_mazeRunnerMove(uint16 op, uint16 var, uint16 argc, uint16 *argv) {
- // uint16 oldPosition = _maze_runner_position;
+ uint16 oldPosition = _maze_runner_position;
uint16 move = var;
uint16 videoToNext = _mazeRunnerVideos[_maze_runner_position][move];
@@ -361,6 +361,8 @@ void MystScriptParser_Selenitic::o_100_mazeRunnerMove(uint16 op, uint16 var, uin
if (videoToNext) {
_maze_runner_compass->drawConditionalDataToScreen(8);
+
+ mazeRunnerPlayVideo(videoToNext, oldPosition);
mazeRunnerUpdateCompass();
if (move == 0 || move == 3)
@@ -368,6 +370,138 @@ void MystScriptParser_Selenitic::o_100_mazeRunnerMove(uint16 op, uint16 var, uin
}
}
+void MystScriptParser_Selenitic::mazeRunnerPlayVideo(uint16 video, uint16 pos) {
+ Common::String file;
+
+ switch (video) {
+ case 1:
+ file = _vm->wrapMovieFilename("forwa1", kSeleniticStack);
+ break;
+ case 2:
+ file = _vm->wrapMovieFilename("forwe0", kSeleniticStack);
+ break;
+ case 3:
+ if (mazeRunnerForwardAllowed(_maze_runner_position)) {
+ file = _vm->wrapMovieFilename("forwf1", kSeleniticStack);
+ } else {
+ file = _vm->wrapMovieFilename("forwf0", kSeleniticStack);
+ }
+ break;
+ case 4:
+ file = _vm->wrapMovieFilename("left00", kSeleniticStack);
+ break;
+ case 5:
+ file = _vm->wrapMovieFilename("left01", kSeleniticStack);
+ break;
+ case 6:
+ file = _vm->wrapMovieFilename("left10", kSeleniticStack);
+ break;
+ case 7:
+ file = _vm->wrapMovieFilename("left11", kSeleniticStack);
+ break;
+ case 8:
+ file = _vm->wrapMovieFilename("right00", kSeleniticStack);
+ break;
+ case 9:
+ file = _vm->wrapMovieFilename("right01", kSeleniticStack);
+ break;
+ case 10:
+ file = _vm->wrapMovieFilename("right10", kSeleniticStack);
+ break;
+ case 11:
+ file = _vm->wrapMovieFilename("right11", kSeleniticStack);
+ break;
+ case 12:
+ if (mazeRunnerForwardAllowed(_maze_runner_position)) {
+ file = _vm->wrapMovieFilename("forwo1", kSeleniticStack);
+ } else {
+ file = _vm->wrapMovieFilename("forwo0", kSeleniticStack);
+ }
+ break;
+ case 13:
+ if (mazeRunnerForwardAllowed(_maze_runner_position)) {
+ file = _vm->wrapMovieFilename("forwp1", kSeleniticStack);
+ } else {
+ file = _vm->wrapMovieFilename("forwp0", kSeleniticStack);
+ }
+ break;
+ case 14:
+ if (mazeRunnerForwardAllowed(_maze_runner_position)) {
+ file = _vm->wrapMovieFilename("forws1", kSeleniticStack);
+ } else {
+ file = _vm->wrapMovieFilename("forws0", kSeleniticStack);
+ }
+ break;
+ case 15:
+ if (mazeRunnerForwardAllowed(_maze_runner_position)) {
+ file = _vm->wrapMovieFilename("forwr1", kSeleniticStack);
+ } else {
+ file = _vm->wrapMovieFilename("forwr0", kSeleniticStack);
+ }
+ break;
+ case 16:
+ if (mazeRunnerForwardAllowed(_maze_runner_position)) {
+ file = _vm->wrapMovieFilename("forwl1", kSeleniticStack);
+ } else {
+ file = _vm->wrapMovieFilename("forwl0", kSeleniticStack);
+ }
+ break;
+ case 17:
+ file = _vm->wrapMovieFilename("backa1", kSeleniticStack);
+ break;
+ case 18:
+ file = _vm->wrapMovieFilename("backe1", kSeleniticStack);
+ break;
+ case 19:
+ if (mazeRunnerForwardAllowed(pos)) {
+ file = _vm->wrapMovieFilename("backf1", kSeleniticStack);
+ } else {
+ file = _vm->wrapMovieFilename("backf0", kSeleniticStack);
+ }
+ break;
+ case 20:
+ if (mazeRunnerForwardAllowed(pos)) {
+ file = _vm->wrapMovieFilename("backo1", kSeleniticStack);
+ } else {
+ file = _vm->wrapMovieFilename("backo0", kSeleniticStack);
+ }
+ break;
+ case 21:
+ if (mazeRunnerForwardAllowed(pos)) {
+ file = _vm->wrapMovieFilename("backp1", kSeleniticStack);
+ } else {
+ file = _vm->wrapMovieFilename("backp0", kSeleniticStack);
+ }
+ break;
+ case 22:
+ if (mazeRunnerForwardAllowed(pos)) {
+ file = _vm->wrapMovieFilename("backs1", kSeleniticStack);
+ } else {
+ file = _vm->wrapMovieFilename("backs0", kSeleniticStack);
+ }
+ break;
+ case 23:
+ if (mazeRunnerForwardAllowed(pos)) {
+ file = _vm->wrapMovieFilename("backr1", kSeleniticStack);
+ } else {
+ file = _vm->wrapMovieFilename("backr0", kSeleniticStack);
+ }
+ break;
+ case 24:
+ if (mazeRunnerForwardAllowed(pos)) {
+ file = _vm->wrapMovieFilename("backl1", kSeleniticStack);
+ } else {
+ file = _vm->wrapMovieFilename("backl0", kSeleniticStack);
+ }
+ break;
+ }
+
+ if (file != "") {
+ const Common::Rect &dest = _maze_runner_window->getRect();
+ _vm->_video->playMovie(file, dest.left, dest.top, false);
+ }
+}
+
void MystScriptParser_Selenitic::mazeRunnerUpdateCompass() {
if (_maze_runner_position == 288 || _maze_runner_position == 289) {
_maze_runner_direction = 8;
diff --git a/engines/mohawk/myst_scripts_selenitic.h b/engines/mohawk/myst_scripts_selenitic.h
index d9676f05e9..d09603ec56 100644
--- a/engines/mohawk/myst_scripts_selenitic.h
+++ b/engines/mohawk/myst_scripts_selenitic.h
@@ -129,6 +129,7 @@ private:
bool mazeRunnerForwardAllowed(uint16 position);
void mazeRunnerUpdateCompass();
void mazeRunnerPlaySoundHelp();
+ void mazeRunnerPlayVideo(uint16 video, uint16 pos);
};
}