diff --git a/engines/myst3/myst3.cpp b/engines/myst3/myst3.cpp index 00db14bd4f8..dee1bceb85f 100644 --- a/engines/myst3/myst3.cpp +++ b/engines/myst3/myst3.cpp @@ -915,9 +915,10 @@ void Myst3Engine::playMovieGoToNode(uint16 movie, uint16 node) { _state->setCameraSkipAnimation(0); } - playSimpleMovie(movie, true); loadNode(node, room, age); + playSimpleMovie(movie, true); + _state->setLocationNextNode(0); _state->setLocationNextRoom(0); _state->setLocationNextAge(0); @@ -929,4 +930,21 @@ void Myst3Engine::playMovieGoToNode(uint16 movie, uint16 node) { } } +void Myst3Engine::playMovieFullFrame(uint16 movie) { + if (_state->getViewType() == kCube && !_state->getCameraSkipAnimation()) { + float startPitch, startHeading; + getMovieLookAt(movie, true, startPitch, startHeading); + animateDirectionChange(startPitch, startHeading, 0); + _state->setCameraSkipAnimation(0); + } + + playSimpleMovie(movie, true); + + if (_state->getViewType() == kCube) { + float endPitch, endHeading; + getMovieLookAt(movie, false, endPitch, endHeading); + _state->lookAt(endPitch, endHeading); + } +} + } // end of namespace Myst3 diff --git a/engines/myst3/myst3.h b/engines/myst3/myst3.h index c0bef7dc852..4f5b86ff37d 100644 --- a/engines/myst3/myst3.h +++ b/engines/myst3/myst3.h @@ -106,6 +106,7 @@ public: void loadMovie(uint16 id, uint16 condition, bool resetCond, bool loop); void playMovieGoToNode(uint16 movie, uint16 node); + void playMovieFullFrame(uint16 movie); void playSimpleMovie(uint16 id, bool fullframe = false); void removeMovie(uint16 id); void setMovieLooping(uint16 id, bool loop); diff --git a/engines/myst3/script.cpp b/engines/myst3/script.cpp index 4060895a97a..ce190024d06 100644 --- a/engines/myst3/script.cpp +++ b/engines/myst3/script.cpp @@ -174,8 +174,10 @@ Script::Script(Myst3Engine *vm): OP_2(141, zipToRoomNode, kValue, kValue ); OP_1(147, moviePlay, kEvalValue ); OP_1(148, moviePlaySynchronized, kEvalValue ); + OP_1(149, moviePlayFullFrame, kEvalValue ); + OP_1(150, moviePlayFullFrameTrans, kEvalValue ); OP_2(151, moviePlayChangeNode, kEvalValue, kEvalValue ); - OP_2(152, moviePlayChangeNodeTrans, kEvalValue, kEvalValue ); + OP_2(152, moviePlayChangeNodeTrans, kEvalValue, kEvalValue ); OP_2(153, lootAt, kValue, kValue ); OP_3(154, lootAtInXFrames, kValue, kValue, kValue ); OP_4(157, cameraLimitMovement, kValue, kValue, kValue, kValue ); @@ -1893,6 +1895,22 @@ void Script::runScriptWhileCondEachXFrames(Context &c, const Opcode &cmd) { _vm->drawFrame(); } +void Script::moviePlayFullFrame(Context &c, const Opcode &cmd) { + debugC(kDebugScript, "Opcode %d: Play movie %d", cmd.op, cmd.args[0]); + + uint16 movieId = _vm->_state->valueOrVarValue(cmd.args[0]); + _vm->playMovieFullFrame(movieId); +} + +void Script::moviePlayFullFrameTrans(Context &c, const Opcode &cmd) { + debugC(kDebugScript, "Opcode %d: Play movie %d with transition", cmd.op, cmd.args[0]); + + uint16 movieId = _vm->_state->valueOrVarValue(cmd.args[0]); + _vm->playMovieFullFrame(movieId); + + // TODO: Transition +} + void Script::moviePlayChangeNode(Context &c, const Opcode &cmd) { debugC(kDebugScript, "Opcode %d: Play movie %d, go to node %d", cmd.op, cmd.args[1], cmd.args[0]); diff --git a/engines/myst3/script.h b/engines/myst3/script.h index 1f1dd3f0c7c..2fbcb067f2a 100644 --- a/engines/myst3/script.h +++ b/engines/myst3/script.h @@ -224,6 +224,8 @@ private: DECLARE_OPCODE(zipToRoomNode); DECLARE_OPCODE(moviePlay); DECLARE_OPCODE(moviePlaySynchronized); + DECLARE_OPCODE(moviePlayFullFrame); + DECLARE_OPCODE(moviePlayFullFrameTrans); DECLARE_OPCODE(moviePlayChangeNode); DECLARE_OPCODE(moviePlayChangeNodeTrans); DECLARE_OPCODE(lootAt);