MYST3: Implement script driven camera movement
This commit is contained in:
parent
0ecc03f28f
commit
656c342af6
6 changed files with 79 additions and 0 deletions
|
@ -174,6 +174,8 @@ Script::Script(Myst3Engine *vm):
|
|||
OP_2(141, zipToRoomNode, kValue, kValue );
|
||||
OP_1(147, moviePlay, kEvalValue );
|
||||
OP_1(148, moviePlaySynchronized, kEvalValue );
|
||||
OP_2(153, lootAt, kValue, kValue );
|
||||
OP_3(154, lootAtInXFrames, kValue, kValue, kValue );
|
||||
OP_4(157, cameraLimitMovement, kValue, kValue, kValue, kValue );
|
||||
OP_0(158, cameraFreeMovement );
|
||||
OP_2(159, cameraLookAt, kValue, kValue );
|
||||
|
@ -1889,6 +1891,18 @@ void Script::runScriptWhileCondEachXFrames(Context &c, const Opcode &cmd) {
|
|||
_vm->drawFrame();
|
||||
}
|
||||
|
||||
void Script::lootAt(Context &c, const Opcode &cmd) {
|
||||
debugC(kDebugScript, "Opcode %d: Look at %d, %d", cmd.op, cmd.args[0], cmd.args[1]);
|
||||
|
||||
_vm->animateDirectionChange(cmd.args[0], cmd.args[1], 0);
|
||||
}
|
||||
|
||||
void Script::lootAtInXFrames(Context &c, const Opcode &cmd) {
|
||||
debugC(kDebugScript, "Opcode %d: Look at %d, %d in %d frames", cmd.op, cmd.args[0], cmd.args[1], cmd.args[2]);
|
||||
|
||||
_vm->animateDirectionChange(cmd.args[0], cmd.args[1], cmd.args[2]);
|
||||
}
|
||||
|
||||
void Script::runScriptForVarDrawFramesHelper(uint16 var, int32 startValue, int32 endValue, uint16 script, int32 numFrames) {
|
||||
if (numFrames < 0) {
|
||||
numFrames = -numFrames;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue