diff options
author | johndoe123 | 2014-03-27 18:55:41 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2018-07-20 06:43:33 +0000 |
commit | 33d28deb690c79a6aca190c5b1bc998c39d95662 (patch) | |
tree | faf3167dacc8c56a63e455af79cb8d7b2f16e2aa /engines/illusions/sequenceopcodes.cpp | |
parent | 22e898f7eb1bddc363900f4146696bf6e9d41e2f (diff) | |
download | scummvm-rg350-33d28deb690c79a6aca190c5b1bc998c39d95662.tar.gz scummvm-rg350-33d28deb690c79a6aca190c5b1bc998c39d95662.tar.bz2 scummvm-rg350-33d28deb690c79a6aca190c5b1bc998c39d95662.zip |
ILLUSIONS: Additions in various places
- Add NamedPoint and related code
- Remove some debug output
- Fix right mouse button input
- Add bubble code
- Add BBDOU inventory skeleton
Diffstat (limited to 'engines/illusions/sequenceopcodes.cpp')
-rw-r--r-- | engines/illusions/sequenceopcodes.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/engines/illusions/sequenceopcodes.cpp b/engines/illusions/sequenceopcodes.cpp index 2495bcac7f..409aa15816 100644 --- a/engines/illusions/sequenceopcodes.cpp +++ b/engines/illusions/sequenceopcodes.cpp @@ -24,6 +24,7 @@ #include "illusions/sequenceopcodes.h" #include "illusions/actor.h" #include "illusions/actorresource.h" +#include "illusions/dictionary.h" #include "illusions/scriptopcodes.h" namespace Illusions { @@ -59,7 +60,9 @@ void SequenceOpcodes::initOpcodes() { OPCODE(5, opSetRandomFrameDelay); OPCODE(6, opSetFrameSpeed); OPCODE(7, opJump); + OPCODE(8, opJumpRandom); OPCODE(9, opGotoSequence); + OPCODE(10, opStartForeignSequence); OPCODE(11, opBeginLoop); OPCODE(12, opNextLoop); OPCODE(14, opSwitchActorIndex); @@ -74,6 +77,7 @@ void SequenceOpcodes::initOpcodes() { OPCODE(40, opSetPriorityLayer); OPCODE(50, opPlaySound); OPCODE(51, opStopSound); + OPCODE(53, opPlaceSubActor); } #undef OPCODE @@ -142,6 +146,13 @@ void SequenceOpcodes::opJump(Control *control, OpCall &opCall) { opCall._deltaOfs += jumpOffs; } +void SequenceOpcodes::opJumpRandom(Control *control, OpCall &opCall) { + ARG_INT16(count); + ARG_SKIP(_vm->getRandom(count) * 2); + ARG_INT16(jumpOffs); + opCall._deltaOfs += jumpOffs; +} + void SequenceOpcodes::opGotoSequence(Control *control, OpCall &opCall) { ARG_SKIP(2); ARG_UINT32(nextSequenceId); @@ -155,6 +166,13 @@ void SequenceOpcodes::opGotoSequence(Control *control, OpCall &opCall) { opCall._deltaOfs = 0; } +void SequenceOpcodes::opStartForeignSequence(Control *control, OpCall &opCall) { + ARG_INT16(foreignObjectNum); + ARG_UINT32(sequenceId); + Control *foreignControl = _vm->_dict->getObjectControl(foreignObjectNum | 0x40000); + foreignControl->startSequenceActor(sequenceId, 2, 0); +} + void SequenceOpcodes::opBeginLoop(Control *control, OpCall &opCall) { ARG_INT16(loopCount); control->_actor->pushSequenceStack(loopCount); @@ -252,4 +270,11 @@ void SequenceOpcodes::opStopSound(Control *control, OpCall &opCall) { // TODO _vm->stopSound(soundEffectId); } +void SequenceOpcodes::opPlaceSubActor(Control *control, OpCall &opCall) { + ARG_INT16(linkIndex); + ARG_UINT32(actorTypeId); + ARG_UINT32(sequenceId); + _vm->_controls->placeSubActor(control->_objectId, linkIndex, actorTypeId, sequenceId); +} + } // End of namespace Illusions |