MYST3: Movies are now loaded by the scripts

This commit is contained in:
Bastien Bouclet 2011-09-18 13:05:49 +02:00
parent 44c5e1103f
commit ed9269ae4a
8 changed files with 45 additions and 28 deletions

View file

@ -37,6 +37,8 @@ Script::Script(Myst3Engine *vm):
OPCODE(8, nodeFrameInitCond);
OPCODE(9, nodeFrameInitIndex);
OPCODE(11, stopWholeScript);
OPCODE(19, movieInitCond);
OPCODE(22, movieInitCondPreload);
OPCODE(35, sunspotAdd);
OPCODE(49, varSetZero);
OPCODE(50, varSetOne);
@ -221,6 +223,17 @@ void Script::stopWholeScript(Context &c, const Opcode &cmd) {
c.endScript = true;
}
void Script::movieInitCond(Context &c, const Opcode &cmd) {
debugC(kDebugScript, "Opcode %d: Init movie %d with condition %d", cmd.op, cmd.args[0], cmd.args[1]);
_vm->loadMovie(cmd.args[0], false, cmd.args[1]);
}
void Script::movieInitCondPreload(Context &c, const Opcode &cmd) {
debugC(kDebugScript, "Opcode %d: Preload movie %d with condition %d", cmd.op, cmd.args[0], cmd.args[1]);
_vm->loadMovie(cmd.args[0], true, cmd.args[1]);
}
void Script::sunspotAdd(Context &c, const Opcode &cmd) {
debugC(kDebugScript, "Opcode %d: Add sunspot: pitch %d heading %d", cmd.op, cmd.args[0], cmd.args[1]);