aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/illusions/actor.cpp20
-rw-r--r--engines/illusions/illusions.cpp2
-rw-r--r--engines/illusions/illusions_duckman.cpp187
-rw-r--r--engines/illusions/illusions_duckman.h30
-rw-r--r--engines/illusions/scriptopcodes_duckman.cpp28
-rw-r--r--engines/illusions/scriptopcodes_duckman.h3
-rw-r--r--engines/illusions/sequenceopcodes.cpp13
-rw-r--r--engines/illusions/sequenceopcodes.h2
8 files changed, 266 insertions, 19 deletions
diff --git a/engines/illusions/actor.cpp b/engines/illusions/actor.cpp
index a67f5b92a9..83fd748496 100644
--- a/engines/illusions/actor.cpp
+++ b/engines/illusions/actor.cpp
@@ -638,7 +638,8 @@ void Control::sequenceActor() {
if (_actor->_newFrameIndex != 0) {
debug(1, "New frame %d", _actor->_newFrameIndex);
setActorFrameIndex(_actor->_newFrameIndex);
- if (!(_actor->_flags & 1) && (_actor->_flags & 0x1000) && (_objectId != 0x40004)) {
+ if (_vm->getGameId() == kGameIdBBDOU &&
+ !(_actor->_flags & 1) && (_actor->_flags & 0x1000) && (_objectId != 0x40004)) {
appearActor();
_actor->_flags &= ~0x1000;
}
@@ -752,7 +753,13 @@ void Control::startMoveActor(uint32 sequenceId, Common::Point destPt, uint32 cal
_vm->notifyThreadId(_actor->_notifyId3C);
_actor->_notifyId3C = callerThreadId2;
_actor->_pathPointIndex = 0;
- _vm->_input->discardButtons(0x10);
+
+ if (_vm->getGameId() == kGameIdBBDOU) {
+ _vm->_input->discardButtons(0x10);
+ } else if (_vm->getGameId() == kGameIdDuckman) {
+ _vm->_input->discardButtons(0x20);
+ }
+
}
}
@@ -1071,11 +1078,16 @@ void Controls::placeActor(uint32 actorTypeId, Common::Point placePt, uint32 sequ
_controls.push_back(control);
_vm->_dict->setObjectControl(objectId, control);
+ if (_vm->getGameId() == kGameIdDuckman) {
+ control->appearActor();
+ } else if (_vm->getGameId() == kGameIdBBDOU) {
+ control->_flags |= 0x01;
+ actor->_flags |= 0x1000;
+ }
+
if (_vm->isCursorObject(actorTypeId, objectId))
_vm->placeCursorControl(control, sequenceId);
- control->_flags |= 0x01;
- actor->_flags |= 0x1000;
control->startSequenceActor(sequenceId, 2, notifyThreadId);
}
diff --git a/engines/illusions/illusions.cpp b/engines/illusions/illusions.cpp
index f4ba0cd131..8a350961e2 100644
--- a/engines/illusions/illusions.cpp
+++ b/engines/illusions/illusions.cpp
@@ -177,6 +177,8 @@ int IllusionsEngine::updateGraphics() {
*/
if (actor->_surfInfo._dimensions._width && actor->_surfInfo._dimensions._height) {
uint32 priority = control->getPriority();
+//if (control->_objectId == 0x0004001B) continue;
+//debug("objectId: %08X; priority: %d (%d)", control->_objectId, priority, control->_priority);
_screen->_drawQueue->insertSprite(&actor->_drawFlags, actor->_surface,
actor->_surfInfo._dimensions, drawPosition, control->_position,
priority, actor->_scale, actor->_spriteFlags);
diff --git a/engines/illusions/illusions_duckman.cpp b/engines/illusions/illusions_duckman.cpp
index 252483f4ad..e36cd354f6 100644
--- a/engines/illusions/illusions_duckman.cpp
+++ b/engines/illusions/illusions_duckman.cpp
@@ -121,6 +121,7 @@ Common::Error IllusionsEngine_Duckman::run() {
_globalSceneId = 0x00010003;
+ initInventory();
initSpecialCode();
setDefaultTextCoords();
initCursor();
@@ -391,6 +392,39 @@ void IllusionsEngine_Duckman::setCursorHandMode(int mode) {
setCursorActorIndex(_cursor._actorIndex, 1, 0);
}
+void IllusionsEngine_Duckman::setCursorInventoryMode(int mode, int value) {
+ _cursor._control = _cursor._control;
+ if (mode == 1) {
+ _savedInventoryActorIndex = _cursor._actorIndex;
+ if (_cursor._actorIndex == 3 || _cursor._actorIndex == 10 || _cursor._actorIndex == 11 || _cursor._actorIndex == 12 || _cursor._actorIndex == 13) {
+ _cursor._savedActorIndex = _cursor._savedActorIndex;
+ if (_cursor._savedActorIndex == 1 || _cursor._savedActorIndex == 2 || _cursor._savedActorIndex == 7)
+ _savedInventoryActorIndex = _cursor._savedActorIndex;
+ else
+ _savedInventoryActorIndex = 0;
+ }
+ if (value == 1 && _cursor._objectId && _savedInventoryActorIndex != 7) {
+ _cursor._actorIndex = 7;
+ stopCursorHoldingObject();
+ _cursor._actorIndex = _savedInventoryActorIndex;
+ }
+ } else if (mode == 2) {
+ if (_savedInventoryActorIndex)
+ _cursor._actorIndex = _savedInventoryActorIndex;
+ else
+ _cursor._actorIndex = 1;
+ if (_cursor._actorIndex == 7)
+ _cursor._control->startSequenceActor(_cursor._sequenceId2, 2, 0);
+ else
+ _cursor._control->startSequenceActor(_cursor._sequenceId1, 2, 0);
+ if (_cursor._currOverlappedControl)
+ setCursorActorIndex(_cursor._actorIndex, 2, 0);
+ else
+ setCursorActorIndex(_cursor._actorIndex, 1, 0);
+ _savedInventoryActorIndex = 0;
+ }
+}
+
void IllusionsEngine_Duckman::startCursorHoldingObject(uint32 objectId, uint32 sequenceId) {
_cursor._objectId = objectId;
_cursor._sequenceId2 = sequenceId;
@@ -427,7 +461,7 @@ void IllusionsEngine_Duckman::cursorControlRoutine(Control *control, uint32 delt
updateDialogState();
break;
case 4:
- // TODO ShellMgr_update(cursorControl);
+ // TODO ShellMgr_update(_cursor._control);
break;
}
}
@@ -924,6 +958,100 @@ void IllusionsEngine_Duckman::updateDialogState() {
}
+void IllusionsEngine_Duckman::initInventory() {
+ _inventorySlots.push_back(DMInventorySlot( 64, 52));
+ _inventorySlots.push_back(DMInventorySlot(112, 52));
+ _inventorySlots.push_back(DMInventorySlot(160, 52));
+ _inventorySlots.push_back(DMInventorySlot(208, 52));
+ _inventorySlots.push_back(DMInventorySlot(255, 52));
+ _inventorySlots.push_back(DMInventorySlot( 64, 84));
+ _inventorySlots.push_back(DMInventorySlot(112, 84));
+ _inventorySlots.push_back(DMInventorySlot(160, 84));
+ _inventorySlots.push_back(DMInventorySlot(208, 84));
+ _inventorySlots.push_back(DMInventorySlot(255, 84));
+ _inventorySlots.push_back(DMInventorySlot( 64, 116));
+ _inventorySlots.push_back(DMInventorySlot(112, 116));
+ _inventorySlots.push_back(DMInventorySlot(160, 116));
+ _inventorySlots.push_back(DMInventorySlot(208, 116));
+ _inventorySlots.push_back(DMInventorySlot(255, 116));
+ _inventorySlots.push_back(DMInventorySlot( 64, 148));
+ _inventorySlots.push_back(DMInventorySlot(112, 148));
+ _inventorySlots.push_back(DMInventorySlot(160, 148));
+ _inventorySlots.push_back(DMInventorySlot(208, 148));
+ _inventorySlots.push_back(DMInventorySlot(255, 148));
+ _inventoyItems.push_back(DMInventoryItem(0x40011, 0xE005B));
+ _inventoyItems.push_back(DMInventoryItem(0x40099, 0xE001B));
+ _inventoyItems.push_back(DMInventoryItem(0x4000F, 0xE000C));
+ _inventoyItems.push_back(DMInventoryItem(0x40042, 0xE0012));
+ _inventoyItems.push_back(DMInventoryItem(0x40044, 0xE000F));
+ _inventoyItems.push_back(DMInventoryItem(0x40029, 0xE000D));
+ _inventoyItems.push_back(DMInventoryItem(0x400A7, 0xE005D));
+ _inventoyItems.push_back(DMInventoryItem(0x40096, 0xE001C));
+ _inventoyItems.push_back(DMInventoryItem(0x40077, 0xE0010));
+ _inventoyItems.push_back(DMInventoryItem(0x4008A, 0xE0033));
+ _inventoyItems.push_back(DMInventoryItem(0x4004B, 0xE0045));
+ _inventoyItems.push_back(DMInventoryItem(0x40054, 0xE0021));
+ _inventoyItems.push_back(DMInventoryItem(0x400C6, 0xE005A));
+ _inventoyItems.push_back(DMInventoryItem(0x4000B, 0xE005E));
+ _inventoyItems.push_back(DMInventoryItem(0x4005F, 0xE0016));
+ _inventoyItems.push_back(DMInventoryItem(0x40072, 0xE0017));
+ _inventoyItems.push_back(DMInventoryItem(0x400AA, 0xE005F));
+ _inventoyItems.push_back(DMInventoryItem(0x400B8, 0xE0050));
+ _inventoyItems.push_back(DMInventoryItem(0x4001F, 0xE001A));
+ _inventoyItems.push_back(DMInventoryItem(0x40095, 0xE0060));
+ _inventoyItems.push_back(DMInventoryItem(0x40041, 0xE0053));
+ _savedInventoryActorIndex = 0;
+}
+
+void IllusionsEngine_Duckman::openInventory() {
+
+ for (uint i = 0; i < _inventorySlots.size(); ++i) {
+ DMInventorySlot *inventorySlot = &_inventorySlots[i];
+ if (inventorySlot->_objectId) {
+ DMInventoryItem *inventoryItem = findInventoryItem(inventorySlot->_objectId);
+ if (!_scriptResource->_properties.get(inventoryItem->_propertyId))
+ inventorySlot->_objectId = 0;
+ }
+ }
+
+ for (uint i = 0; i < _inventoyItems.size(); ++i) {
+ DMInventoryItem *inventoryItem = &_inventoyItems[i];
+ if (_scriptResource->_properties.get(inventoryItem->_propertyId)) {
+ DMInventorySlot *inventorySlot = findInventorySlot(inventoryItem->_objectId);
+ if (inventorySlot) {
+ Control *control = getObjectControl(inventoryItem->_objectId);
+ control->setActorPosition(inventorySlot->_position);
+ control->appearActor();
+ } else {
+ addInventoryItem(inventoryItem->_objectId);
+ }
+ }
+ }
+
+}
+
+void IllusionsEngine_Duckman::addInventoryItem(uint32 objectId) {
+ DMInventorySlot *DMInventorySlot = findInventorySlot(0);
+ DMInventorySlot->_objectId = objectId;
+ Control *control = getObjectControl(objectId);
+ control->setActorPosition(DMInventorySlot->_position);
+ control->appearActor();
+}
+
+DMInventorySlot *IllusionsEngine_Duckman::findInventorySlot(uint32 objectId) {
+ for (uint i = 0; i < _inventorySlots.size(); ++i)
+ if (_inventorySlots[i]._objectId == objectId)
+ return &_inventorySlots[i];
+ return 0;
+}
+
+DMInventoryItem *IllusionsEngine_Duckman::findInventoryItem(uint32 objectId) {
+ for (uint i = 0; i < _inventoyItems.size(); ++i)
+ if (_inventoyItems[i]._objectId == objectId)
+ return &_inventoyItems[i];
+ return 0;
+}
+
// Special code
typedef Common::Functor1Mem<OpCall&, void, IllusionsEngine_Duckman> SpecialCodeFunctionDM;
@@ -931,6 +1059,9 @@ typedef Common::Functor1Mem<OpCall&, void, IllusionsEngine_Duckman> SpecialCodeF
void IllusionsEngine_Duckman::initSpecialCode() {
SPECIAL(0x00160002, spcSetCursorHandMode);
+ SPECIAL(0x00160005, spcOpenInventory);
+ SPECIAL(0x00160014, spcUpdateObject272Sequence);
+ SPECIAL(0x0016001C, spcSetCursorInventoryMode);
}
void IllusionsEngine_Duckman::runSpecialCode(uint32 specialCodeId, OpCall &opCall) {
@@ -949,4 +1080,58 @@ void IllusionsEngine_Duckman::spcSetCursorHandMode(OpCall &opCall) {
notifyThreadId(opCall._threadId);
}
+void IllusionsEngine_Duckman::spcOpenInventory(OpCall &opCall) {
+ openInventory();
+ notifyThreadId(opCall._threadId);
+}
+
+void IllusionsEngine_Duckman::spcSetCursorInventoryMode(OpCall &opCall) {
+ ARG_BYTE(mode);
+ ARG_BYTE(value);
+ setCursorInventoryMode(mode, value);
+ notifyThreadId(opCall._threadId);
+}
+
+void IllusionsEngine_Duckman::spcUpdateObject272Sequence(OpCall &opCall) {
+ byte flags = 0;
+ uint32 sequenceId;
+ if (_scriptResource->_properties.get(0x000E0085))
+ flags |= 1;
+ if (_scriptResource->_properties.get(0x000E0083))
+ flags |= 2;
+ if (_scriptResource->_properties.get(0x000E0084))
+ flags |= 4;
+ switch (flags) {
+ case 0:
+ sequenceId = 0x603C1;
+ break;
+ case 1:
+ sequenceId = 0x603BF;
+ break;
+ case 2:
+ sequenceId = 0x603C2;
+ break;
+ case 3:
+ sequenceId = 0x603C0;
+ break;
+ case 4:
+ sequenceId = 0x603C3;
+ break;
+ case 5:
+ sequenceId = 0x603C5;
+ break;
+ case 6:
+ sequenceId = 0x603C4;
+ break;
+ case 7:
+ sequenceId = 0x603C6;
+ break;
+ default:
+ sequenceId = 0x603C1;
+ break;
+ }
+ Control *control = getObjectControl(0x40110);
+ control->startSequenceActor(sequenceId, 2, opCall._threadId);
+}
+
} // End of namespace Illusions
diff --git a/engines/illusions/illusions_duckman.h b/engines/illusions/illusions_duckman.h
index 7213e21fda..56e6b47a86 100644
--- a/engines/illusions/illusions_duckman.h
+++ b/engines/illusions/illusions_duckman.h
@@ -56,6 +56,21 @@ struct DialogItem {
uint32 _sequenceId;
};
+struct DMInventorySlot {
+ Common::Point _position;
+ uint32 _objectId;
+ DMInventorySlot() : _objectId(0) {}
+ DMInventorySlot(int16 x, int16 y) : _objectId(0), _position(x, y) {}
+};
+
+struct DMInventoryItem {
+ uint32 _objectId;
+ uint32 _propertyId;
+ DMInventoryItem() : _objectId(0) {}
+ DMInventoryItem(uint32 objectId, uint32 propertyId)
+ : _objectId(objectId), _propertyId(propertyId) {}
+};
+
struct OpCall;
typedef Common::Functor1<OpCall&, void> SpecialCodeFunction;
@@ -86,8 +101,13 @@ public:
uint32 _activeScenes[6];
Cursor_Duckman _cursor;
+
Common::Array<DialogItem> _dialogItems;
+ int _savedInventoryActorIndex;
+ Common::Array<DMInventorySlot> _inventorySlots;
+ Common::Array<DMInventoryItem> _inventoyItems;
+
SpecialCodeMap _specialCodeMap;
void setDefaultTextCoords();
@@ -114,6 +134,7 @@ public:
void enableCursorVerb(int verbNum);
void disableCursorVerb(int verbNum);
void setCursorHandMode(int mode);
+ void setCursorInventoryMode(int mode, int value);
void startCursorHoldingObject(uint32 objectId, uint32 sequenceId);
void stopCursorHoldingObject();
void cursorControlRoutine(Control *control, uint32 deltaTime);
@@ -162,10 +183,19 @@ public:
void startDialog(int16 *choiceOfsPtr, uint32 actorTypeId, uint32 callerThreadId);
void updateDialogState();
+ void initInventory();
+ void openInventory();
+ DMInventorySlot *findInventorySlot(uint32 objectId);
+ DMInventoryItem *findInventoryItem(uint32 objectId);
+ void addInventoryItem(uint32 objectId);
+
// Special code
void initSpecialCode();
void runSpecialCode(uint32 specialCodeId, OpCall &opCall);
void spcSetCursorHandMode(OpCall &opCall);
+ void spcOpenInventory(OpCall &opCall);
+ void spcSetCursorInventoryMode(OpCall &opCall);
+ void spcUpdateObject272Sequence(OpCall &opCall);
};
diff --git a/engines/illusions/scriptopcodes_duckman.cpp b/engines/illusions/scriptopcodes_duckman.cpp
index 63cdf65573..31da6924c0 100644
--- a/engines/illusions/scriptopcodes_duckman.cpp
+++ b/engines/illusions/scriptopcodes_duckman.cpp
@@ -74,6 +74,7 @@ void ScriptOpcodes_Duckman::initOpcodes() {
OPCODE(33, opPanTrackObject);
OPCODE(34, opPanToObject);
OPCODE(36, opPanToPoint);
+ OPCODE(37, opPanStop);
OPCODE(38, opStartFade);
OPCODE(39, opSetDisplay);
OPCODE(40, opSetCameraBounds);
@@ -99,6 +100,7 @@ void ScriptOpcodes_Duckman::initOpcodes() {
OPCODE(75, opStopSound);
OPCODE(76, opStartMidiMusic);
OPCODE(77, opStopMidiMusic);
+ OPCODE(78, opFadeMidiMusic);
OPCODE(80, opAddMenuChoice);
OPCODE(81, opDisplayMenu);
OPCODE(82, opSwitchMenuChoice);
@@ -133,7 +135,6 @@ void ScriptOpcodes_Duckman::initOpcodes() {
OPCODE(31, opExitCloseUpScene);
OPCODE(32, opPanCenterObject);
OPCODE(35, opPanToNamedPoint);
- OPCODE(37, opPanStop);
OPCODE(53, opSetActorToNamedPoint);
OPCODE(63, opSetSelectSfx);
OPCODE(64, opSetMoveSfx);
@@ -224,7 +225,6 @@ void ScriptOpcodes_Duckman::opSuspendThread(ScriptThread *scriptThread, OpCall &
void ScriptOpcodes_Duckman::opLoadResource(ScriptThread *scriptThread, OpCall &opCall) {
ARG_SKIP(2);
ARG_UINT32(resourceId);
- // NOTE Skipped checking for stalled resources
uint32 sceneId = _vm->getCurrentScene();
_vm->_resSys->loadResource(resourceId, sceneId, opCall._threadId);
_vm->notifyThreadId(opCall._threadId);
@@ -233,7 +233,6 @@ void ScriptOpcodes_Duckman::opLoadResource(ScriptThread *scriptThread, OpCall &o
void ScriptOpcodes_Duckman::opUnloadResource(ScriptThread *scriptThread, OpCall &opCall) {
ARG_SKIP(2);
ARG_UINT32(resourceId);
- // NOTE Skipped checking for stalled resources
_vm->_resSys->unloadResourceById(resourceId);
}
@@ -243,7 +242,7 @@ void ScriptOpcodes_Duckman::opEnterScene18(ScriptThread *scriptThread, OpCall &o
_vm->enterScene(sceneId, 0);
}
-//static uint dsceneId = 0, dthreadId = 0;
+static uint dsceneId = 0, dthreadId = 0;
//static uint dsceneId = 0x00010008, dthreadId = 0x00020029;//Beginning in Jac
//static uint dsceneId = 0x00010012, dthreadId = 0x0002009D;//Paramount
//static uint dsceneId = 0x00010039, dthreadId = 0x00020089;//Map
@@ -251,7 +250,8 @@ void ScriptOpcodes_Duckman::opEnterScene18(ScriptThread *scriptThread, OpCall &o
//static uint dsceneId = 0x00010020, dthreadId = 0x00020112;//Xmas
//static uint dsceneId = 0x00010039, dthreadId = 0x00020089;//Pizza
//static uint dsceneId = 0x0001002D, dthreadId = 0x00020141;
-static uint dsceneId = 0x0001004B, dthreadId = 0x0002029B;
+//static uint dsceneId = 0x0001004B, dthreadId = 0x0002029B;
+//static uint dsceneId = 0x00010021, dthreadId = 0x00020113;
void ScriptOpcodes_Duckman::opChangeScene(ScriptThread *scriptThread, OpCall &opCall) {
ARG_SKIP(2);
@@ -335,6 +335,10 @@ void ScriptOpcodes_Duckman::opPanToPoint(ScriptThread *scriptThread, OpCall &opC
_vm->_camera->panToPoint(Common::Point(x, y), speed, opCall._threadId);
}
+void ScriptOpcodes_Duckman::opPanStop(ScriptThread *scriptThread, OpCall &opCall) {
+ _vm->_camera->stopPan();
+}
+
void ScriptOpcodes_Duckman::opStartFade(ScriptThread *scriptThread, OpCall &opCall) {
ARG_INT16(arg1);
ARG_INT16(arg2);
@@ -401,7 +405,6 @@ void ScriptOpcodes_Duckman::opStartSequenceActor(ScriptThread *scriptThread, OpC
ARG_SKIP(2);
ARG_UINT32(objectId);
ARG_UINT32(sequenceId);
- // NOTE Skipped checking for stalled sequence, not sure if needed
Control *control = _vm->_dict->getObjectControl(objectId);
control->startSequenceActor(sequenceId, 2, opCall._threadId);
}
@@ -422,7 +425,6 @@ void ScriptOpcodes_Duckman::opStartMoveActor(ScriptThread *scriptThread, OpCall
ARG_UINT32(objectId);
ARG_UINT32(sequenceId);
ARG_UINT32(namedPointId);
- // NOTE Skipped checking for stalled sequence, not sure if needed
Control *control = _vm->_dict->getObjectControl(objectId);
Common::Point pos = _vm->getNamedPointPosition(namedPointId);
control->startMoveActor(sequenceId, pos, opCall._callerThreadId, opCall._threadId);
@@ -557,6 +559,12 @@ void ScriptOpcodes_Duckman::opStopMidiMusic(ScriptThread *scriptThread, OpCall &
// TODO _vm->stopMidiMusic();
}
+void ScriptOpcodes_Duckman::opFadeMidiMusic(ScriptThread *scriptThread, OpCall &opCall) {
+ ARG_INT16(duration);
+ ARG_INT16(finalVolume);
+ // TODO _vm->fadeMidiMusic(2, finalVolume, duration, opCall._threadId);
+}
+
void ScriptOpcodes_Duckman::opAddMenuChoice(ScriptThread *scriptThread, OpCall &opCall) {
ARG_SKIP(2);
ARG_INT16(jumpOffs);
@@ -767,7 +775,6 @@ void ScriptOpcodes_Duckman::opEnterScene(ScriptThread *scriptThread, OpCall &opC
void ScriptOpcodes_Duckman::opEnterCloseUpScene(ScriptThread *scriptThread, OpCall &opCall) {
ARG_SKIP(2);
ARG_UINT32(sceneId);
- // NOTE Skipped checking for stalled resources
_vm->_input->discardButtons(0xFFFF);
_vm->enterPause(opCall._callerThreadId);
_vm->enterScene(sceneId, opCall._callerThreadId);
@@ -792,10 +799,6 @@ void ScriptOpcodes_Duckman::opPanToNamedPoint(ScriptThread *scriptThread, OpCall
_vm->_camera->panToPoint(pos, speed, opCall._threadId);
}
-void ScriptOpcodes_Duckman::opPanStop(ScriptThread *scriptThread, OpCall &opCall) {
- _vm->_camera->stopPan();
-}
-
void ScriptOpcodes_Duckman::opSetActorToNamedPoint(ScriptThread *scriptThread, OpCall &opCall) {
ARG_SKIP(2);
ARG_UINT32(objectId);
@@ -933,7 +936,6 @@ void ScriptOpcodes_Duckman::opChangeSceneAll(ScriptThread *scriptThread, OpCall
ARG_SKIP(2);
ARG_UINT32(sceneId);
ARG_UINT32(threadId);
- // NOTE Skipped checking for stalled resources
_vm->_input->discardButtons(0xFFFF);
_vm->_prevSceneId = _vm->getCurrentScene();
_vm->dumpActiveScenes(_vm->_globalSceneId, opCall._callerThreadId);
diff --git a/engines/illusions/scriptopcodes_duckman.h b/engines/illusions/scriptopcodes_duckman.h
index 124564eaa1..be093c488a 100644
--- a/engines/illusions/scriptopcodes_duckman.h
+++ b/engines/illusions/scriptopcodes_duckman.h
@@ -61,6 +61,7 @@ protected:
void opPanTrackObject(ScriptThread *scriptThread, OpCall &opCall);
void opPanToObject(ScriptThread *scriptThread, OpCall &opCall);
void opPanToPoint(ScriptThread *scriptThread, OpCall &opCall);
+ void opPanStop(ScriptThread *scriptThread, OpCall &opCall);
void opStartFade(ScriptThread *scriptThread, OpCall &opCall);
void opSetDisplay(ScriptThread *scriptThread, OpCall &opCall);
void opSetCameraBounds(ScriptThread *scriptThread, OpCall &opCall);
@@ -86,6 +87,7 @@ protected:
void opStopSound(ScriptThread *scriptThread, OpCall &opCall);
void opStartMidiMusic(ScriptThread *scriptThread, OpCall &opCall);
void opStopMidiMusic(ScriptThread *scriptThread, OpCall &opCall);
+ void opFadeMidiMusic(ScriptThread *scriptThread, OpCall &opCall);
void opAddMenuChoice(ScriptThread *scriptThread, OpCall &opCall);
void opDisplayMenu(ScriptThread *scriptThread, OpCall &opCall);
void opSwitchMenuChoice(ScriptThread *scriptThread, OpCall &opCall);
@@ -120,7 +122,6 @@ protected:
void opExitCloseUpScene(ScriptThread *scriptThread, OpCall &opCall);
void opPanCenterObject(ScriptThread *scriptThread, OpCall &opCall);
void opPanToNamedPoint(ScriptThread *scriptThread, OpCall &opCall);
- void opPanStop(ScriptThread *scriptThread, OpCall &opCall);
void opSetActorToNamedPoint(ScriptThread *scriptThread, OpCall &opCall);
void opSetSelectSfx(ScriptThread *scriptThread, OpCall &opCall);
void opSetMoveSfx(ScriptThread *scriptThread, OpCall &opCall);
diff --git a/engines/illusions/sequenceopcodes.cpp b/engines/illusions/sequenceopcodes.cpp
index 83476ff629..7266f8b19f 100644
--- a/engines/illusions/sequenceopcodes.cpp
+++ b/engines/illusions/sequenceopcodes.cpp
@@ -86,6 +86,8 @@ void SequenceOpcodes::initOpcodes() {
OPCODE(38, opSetPathWalkRects);
OPCODE(39, opSetPriority);
OPCODE(40, opSetPriorityLayer);
+ OPCODE(41, opDisableAutoRegionLayer);
+ OPCODE(42, opSetRegionLayer);
OPCODE(50, opPlaySound);
OPCODE(51, opStopSound);
OPCODE(52, opStartScriptThread);
@@ -322,6 +324,17 @@ void SequenceOpcodes::opSetPriorityLayer(Control *control, OpCall &opCall) {
control->setPriority(priority);
}
+void SequenceOpcodes::opDisableAutoRegionLayer(Control *control, OpCall &opCall) {
+ control->_actor->_flags &= ~0x20;
+}
+
+void SequenceOpcodes::opSetRegionLayer(Control *control, OpCall &opCall) {
+ ARG_INT16(regionLayerIndex);
+ BackgroundResource *bgRes = _vm->_backgroundItems->getActiveBgResource();
+ control->_actor->_flags |= 0x20;
+//TODO control->_actor->_regionLayer = bgRes->getRegionLayer(regionLayerIndex - 1);
+}
+
void SequenceOpcodes::opPlaySound(Control *control, OpCall &opCall) {
ARG_INT16(flags);
ARG_INT16(volume);
diff --git a/engines/illusions/sequenceopcodes.h b/engines/illusions/sequenceopcodes.h
index db15658356..f423d07b10 100644
--- a/engines/illusions/sequenceopcodes.h
+++ b/engines/illusions/sequenceopcodes.h
@@ -75,6 +75,8 @@ protected:
void opSetPathWalkRects(Control *control, OpCall &opCall);
void opSetPriority(Control *control, OpCall &opCall);
void opSetPriorityLayer(Control *control, OpCall &opCall);
+ void opDisableAutoRegionLayer(Control *control, OpCall &opCall);
+ void opSetRegionLayer(Control *control, OpCall &opCall);
void opPlaySound(Control *control, OpCall &opCall);
void opStopSound(Control *control, OpCall &opCall);
void opStartScriptThread(Control *control, OpCall &opCall);