aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Fry2018-06-04 08:03:35 +1000
committerEugene Sandulenko2018-07-20 06:43:33 +0000
commit88ef19056915b30d5e4b5d5e0e59ec6c17053d59 (patch)
treecab1d48b74119240629e8871e3397771ffb0a738
parent7b88bd8efe25fe3092e190d5fed16990c69e2849 (diff)
downloadscummvm-rg350-88ef19056915b30d5e4b5d5e0e59ec6c17053d59.tar.gz
scummvm-rg350-88ef19056915b30d5e4b5d5e0e59ec6c17053d59.tar.bz2
scummvm-rg350-88ef19056915b30d5e4b5d5e0e59ec6c17053d59.zip
ILLUSIONS: Add logic to enable palette cycling sequence
-rw-r--r--engines/illusions/resources/actorresource.cpp4
-rw-r--r--engines/illusions/resources/backgroundresource.cpp1
-rw-r--r--engines/illusions/sequenceopcodes.cpp16
-rw-r--r--engines/illusions/sequenceopcodes.h4
4 files changed, 15 insertions, 10 deletions
diff --git a/engines/illusions/resources/actorresource.cpp b/engines/illusions/resources/actorresource.cpp
index 59e2294c6e..c38a467ed9 100644
--- a/engines/illusions/resources/actorresource.cpp
+++ b/engines/illusions/resources/actorresource.cpp
@@ -20,6 +20,7 @@
*
*/
+#include "illusions/actor.h"
#include "illusions/illusions.h"
#include "illusions/resources/actorresource.h"
#include "illusions/dictionary.h"
@@ -223,6 +224,9 @@ void ActorInstance::initActorTypes() {
for (uint i = 0; i < _actorResource->_sequences.size(); ++i) {
Sequence *sequence = &_actorResource->_sequences[i];
_vm->_dict->addSequence(sequence->_sequenceId, sequence);
+ if (sequence->_sequenceId == 0x60101) {
+ _vm->_controls->placeActor(0x50023, Common::Point(0,0), sequence->_sequenceId, 0x400d7, 0);
+ }
}
}
diff --git a/engines/illusions/resources/backgroundresource.cpp b/engines/illusions/resources/backgroundresource.cpp
index fc1332649a..3ad7085bee 100644
--- a/engines/illusions/resources/backgroundresource.cpp
+++ b/engines/illusions/resources/backgroundresource.cpp
@@ -27,6 +27,7 @@
#include "illusions/dictionary.h"
#include "illusions/resources/actorresource.h"
#include "illusions/screen.h"
+#include "illusions/sequenceopcodes.h"
#include "common/str.h"
namespace Illusions {
diff --git a/engines/illusions/sequenceopcodes.cpp b/engines/illusions/sequenceopcodes.cpp
index 53c72b9a28..f2de9f2b2d 100644
--- a/engines/illusions/sequenceopcodes.cpp
+++ b/engines/illusions/sequenceopcodes.cpp
@@ -253,7 +253,7 @@ void SequenceOpcodes::opAppearForeignActor(Control *control, OpCall &opCall) {
ARG_INT16(foreignObjectNum);
Control *foreignControl = _vm->_dict->getObjectControl(foreignObjectNum | 0x40000);
if (!foreignControl) {
- Common::Point pos = _vm->getNamedPointPosition(0x00070023); // TODO Eric check this. duckman looks to be using 0x70001
+ Common::Point pos = _vm->getNamedPointPosition(_vm->getGameId() == kGameIdDuckman ? 0x00070001 : 0x00070023);
_vm->_controls->placeActor(0x00050001, pos, 0x00060001, foreignObjectNum | 0x40000, 0);
foreignControl = _vm->_dict->getObjectControl(foreignObjectNum | 0x40000);
}
@@ -396,20 +396,20 @@ void SequenceOpcodes::opStartScriptThread(Control *control, OpCall &opCall) {
}
void SequenceOpcodes::opPlaceSubActor(Control *control, OpCall &opCall) {
- ARG_INT16(linkIndex);
- ARG_UINT32(actorTypeId);
- ARG_UINT32(sequenceId);
- _vm->_controls->placeSubActor(control->_objectId, linkIndex, actorTypeId, sequenceId);
+ ARG_INT16(linkIndex);
+ ARG_UINT32(actorTypeId);
+ ARG_UINT32(sequenceId);
+ _vm->_controls->placeSubActor(control->_objectId, linkIndex, actorTypeId, sequenceId);
}
void SequenceOpcodes::opStartSubSequence(Control *control, OpCall &opCall) {
- ARG_INT16(linkIndex);
- ARG_UINT32(sequenceId);
+ ARG_INT16(linkIndex);
+ ARG_UINT32(sequenceId);
control->startSubSequence(linkIndex, sequenceId);
}
void SequenceOpcodes::opStopSubSequence(Control *control, OpCall &opCall) {
- ARG_INT16(linkIndex);
+ ARG_INT16(linkIndex);
control->stopSubSequence(linkIndex);
}
diff --git a/engines/illusions/sequenceopcodes.h b/engines/illusions/sequenceopcodes.h
index 8432512372..6c5b3ca41d 100644
--- a/engines/illusions/sequenceopcodes.h
+++ b/engines/illusions/sequenceopcodes.h
@@ -87,8 +87,8 @@ protected:
void opStartScriptThread(Control *control, OpCall &opCall);
void opPlaceSubActor(Control *control, OpCall &opCall);
void opStartSubSequence(Control *control, OpCall &opCall);
- void opStopSubSequence(Control *control, OpCall &opCall);
-
+ void opStopSubSequence(Control *control, OpCall &opCall);
+
};
} // End of namespace Illusions