diff options
author | johndoe123 | 2014-03-20 13:24:33 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2018-07-20 06:43:33 +0000 |
commit | f47575ca906682bab942d19a36cc33ea7465a4b2 (patch) | |
tree | 982764727aab8fde9a46ca15f917685135b6d703 /engines/illusions/sequenceopcodes.cpp | |
parent | c99f40c13d945060f489693d3f533b6ce0b54adb (diff) | |
download | scummvm-rg350-f47575ca906682bab942d19a36cc33ea7465a4b2.tar.gz scummvm-rg350-f47575ca906682bab942d19a36cc33ea7465a4b2.tar.bz2 scummvm-rg350-f47575ca906682bab942d19a36cc33ea7465a4b2.zip |
ILLUSIONS: Add more script opcodes and related
Diffstat (limited to 'engines/illusions/sequenceopcodes.cpp')
-rw-r--r-- | engines/illusions/sequenceopcodes.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/engines/illusions/sequenceopcodes.cpp b/engines/illusions/sequenceopcodes.cpp index e19d8cdf7d..4eaa7a9c38 100644 --- a/engines/illusions/sequenceopcodes.cpp +++ b/engines/illusions/sequenceopcodes.cpp @@ -62,7 +62,8 @@ void SequenceOpcodes::initOpcodes() { OPCODE(9, opGotoSequence); OPCODE(11, opBeginLoop); OPCODE(12, opNextLoop); - OPCODE(15, opJumpIfNotFacing); + OPCODE(14, opSwitchActorIndex); + OPCODE(15, opSwitchFacing); OPCODE(28, opNotifyThreadId1); OPCODE(29, opSetPathCtrY); OPCODE(33, opSetPathWalkPoints); @@ -176,7 +177,15 @@ void SequenceOpcodes::opNextLoop(Control *control, OpCall &opCall) { } } -void SequenceOpcodes::opJumpIfNotFacing(Control *control, OpCall &opCall) { +void SequenceOpcodes::opSwitchActorIndex(Control *control, OpCall &opCall) { + ARG_INT16(actorIndex); + ARG_INT16(jumpOffs); + debug("control->_objectId = %08X", control->_objectId); + if (control->_actor->_actorIndex != actorIndex) + opCall._deltaOfs += jumpOffs; +} + +void SequenceOpcodes::opSwitchFacing(Control *control, OpCall &opCall) { ARG_INT16(facing); ARG_INT16(jumpOffs); if (!(control->_actor->_facing & facing)) |