aboutsummaryrefslogtreecommitdiff
path: root/engines/illusions/sequenceopcodes.cpp
diff options
context:
space:
mode:
authorjohndoe1232014-03-28 21:53:21 +0100
committerEugene Sandulenko2018-07-20 06:43:33 +0000
commit3b3f84c764f8cab8f54b06bbafc607cfb6899fdd (patch)
tree8ef0d8e3af51b7e0a4f232e36c250aa89aeae655 /engines/illusions/sequenceopcodes.cpp
parent33d28deb690c79a6aca190c5b1bc998c39d95662 (diff)
downloadscummvm-rg350-3b3f84c764f8cab8f54b06bbafc607cfb6899fdd.tar.gz
scummvm-rg350-3b3f84c764f8cab8f54b06bbafc607cfb6899fdd.tar.bz2
scummvm-rg350-3b3f84c764f8cab8f54b06bbafc607cfb6899fdd.zip
ILLUSIONS: Implement inventory
- Implement cursor camera tracking - Various bugfixes
Diffstat (limited to 'engines/illusions/sequenceopcodes.cpp')
-rw-r--r--engines/illusions/sequenceopcodes.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/engines/illusions/sequenceopcodes.cpp b/engines/illusions/sequenceopcodes.cpp
index 409aa15816..7df968df3d 100644
--- a/engines/illusions/sequenceopcodes.cpp
+++ b/engines/illusions/sequenceopcodes.cpp
@@ -57,6 +57,7 @@ void SequenceOpcodes::initOpcodes() {
// Register opcodes
OPCODE(2, opSetFrameIndex);
OPCODE(3, opEndSequence);
+ OPCODE(4, opIncFrameDelay);
OPCODE(5, opSetRandomFrameDelay);
OPCODE(6, opSetFrameSpeed);
OPCODE(7, opJump);
@@ -67,6 +68,7 @@ void SequenceOpcodes::initOpcodes() {
OPCODE(12, opNextLoop);
OPCODE(14, opSwitchActorIndex);
OPCODE(15, opSwitchFacing);
+ OPCODE(16, opAppearActor);
OPCODE(17, opDisappearActor);
OPCODE(28, opNotifyThreadId1);
OPCODE(29, opSetPathCtrY);
@@ -130,10 +132,17 @@ void SequenceOpcodes::opEndSequence(Control *control, OpCall &opCall) {
opCall._result = 1;
}
+void SequenceOpcodes::opIncFrameDelay(Control *control, OpCall &opCall) {
+ ARG_INT16(frameDelayIncr);
+ control->_actor->_seqCodeValue3 += frameDelayIncr;
+ opCall._result = 2;
+}
+
void SequenceOpcodes::opSetRandomFrameDelay(Control *control, OpCall &opCall) {
ARG_INT16(minFrameDelay);
ARG_INT16(maxFrameDelay);
control->_actor->_seqCodeValue3 += 0;//DEBUG minFrameDelay + _vm->getRandom(maxFrameDelay);
+ opCall._result = 2;
}
void SequenceOpcodes::opSetFrameSpeed(Control *control, OpCall &opCall) {
@@ -201,6 +210,10 @@ void SequenceOpcodes::opSwitchFacing(Control *control, OpCall &opCall) {
opCall._deltaOfs += jumpOffs;
}
+void SequenceOpcodes::opAppearActor(Control *control, OpCall &opCall) {
+ control->appearActor();
+}
+
void SequenceOpcodes::opDisappearActor(Control *control, OpCall &opCall) {
control->disappearActor();
control->_actor->_newFrameIndex = 0;