diff options
author | johndoe123 | 2015-12-07 13:26:14 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2018-07-20 06:43:33 +0000 |
commit | 88e2b3fd9ee11ac724a676e8496e36691551e1c8 (patch) | |
tree | 2efea80a72daf8f78bbf8d109ef8a04feb53a926 /engines/illusions | |
parent | 823ba2f462ff75370d1091b5c59dc950b815eed9 (diff) | |
download | scummvm-rg350-88e2b3fd9ee11ac724a676e8496e36691551e1c8.tar.gz scummvm-rg350-88e2b3fd9ee11ac724a676e8496e36691551e1c8.tar.bz2 scummvm-rg350-88e2b3fd9ee11ac724a676e8496e36691551e1c8.zip |
ILLUSIONS: BBDOU: Implement special code 160030
Diffstat (limited to 'engines/illusions')
-rw-r--r-- | engines/illusions/bbdou/bbdou_cursor.cpp | 33 | ||||
-rw-r--r-- | engines/illusions/bbdou/bbdou_cursor.h | 1 | ||||
-rw-r--r-- | engines/illusions/bbdou/bbdou_specialcode.cpp | 8 | ||||
-rw-r--r-- | engines/illusions/bbdou/bbdou_specialcode.h | 1 |
4 files changed, 43 insertions, 0 deletions
diff --git a/engines/illusions/bbdou/bbdou_cursor.cpp b/engines/illusions/bbdou/bbdou_cursor.cpp index 4b9230b77b..61422a8e68 100644 --- a/engines/illusions/bbdou/bbdou_cursor.cpp +++ b/engines/illusions/bbdou/bbdou_cursor.cpp @@ -96,6 +96,39 @@ void BbdouCursor::disable(uint32 objectId) { hide(objectId); } +void BbdouCursor::reset(uint32 objectId) { + Control *control = _vm->_dict->getObjectControl(objectId); + + _data._item10._field0 = 1; + _data._mode = 1; + _data._mode2 = 0; + _data._verbId1 = 0x1B0000; + _data._currOverlappedObjectId = 0; + _data._overlappedObjectId = 0; + _data._sequenceId = 0x6000F; + _data._holdingObjectId = 0; + _data._holdingObjectId2 = 0; + _data._visibleCtr = 0; + _data._causeThreadId1 = 0; + _data._flags = 0; + _data._item10._field58 = 1; + _data._sequenceId98 = 0; + _data._idleCtr = 0; + _data._item10._verbId = 0x1B0000; + _data._item10._playSound48 = 0; + _data._item10._objectIds[0] = 0; + _data._item10._objectIds[1] = 0; + _data._item10._index = 0; + _data._item10._flag56 = 0; + clearCursorDataField14(); + control->setActorIndexTo1(); + control->startSequenceActor(0x60029, 2, 0); + + _bbdou->resetItem10(control->_objectId, &_data._item10); + // TODO? control->_actor->setControlRoutine(new Common::Functor2Mem<Control*, uint32, void, BbdouCursor>(this, &BbdouCursor::cursorInteractControlRoutine)); + +} + void BbdouCursor::addCursorSequence(uint32 objectId, uint32 sequenceId) { for (uint i = 0; i < kMaxCursorSequences; ++i) if (_cursorSequences[i]._objectId == 0) { diff --git a/engines/illusions/bbdou/bbdou_cursor.h b/engines/illusions/bbdou/bbdou_cursor.h index 7b42e4f307..8f454b76cc 100644 --- a/engines/illusions/bbdou/bbdou_cursor.h +++ b/engines/illusions/bbdou/bbdou_cursor.h @@ -90,6 +90,7 @@ public: void init(uint32 objectId, uint32 progResKeywordId); void enable(uint32 objectId); void disable(uint32 objectId); + void reset(uint32 objectId); void addCursorSequence(uint32 objectId, uint32 sequenceId); uint32 findCursorSequenceId(uint32 objectId); void setStruct8bsValue(uint32 objectId, int value); diff --git a/engines/illusions/bbdou/bbdou_specialcode.cpp b/engines/illusions/bbdou/bbdou_specialcode.cpp index 5257a48858..b10b8d287a 100644 --- a/engines/illusions/bbdou/bbdou_specialcode.cpp +++ b/engines/illusions/bbdou/bbdou_specialcode.cpp @@ -124,6 +124,7 @@ typedef Common::Functor1Mem<OpCall&, void, BbdouSpecialCode> SpecialCodeFunction void BbdouSpecialCode::init() { // TODO + // 0x00160001 only used for original debugging purposes SPECIAL(0x00160006, spcInitCursor); SPECIAL(0x00160008, spcEnableCursor); SPECIAL(0x00160009, spcDisableCursor); @@ -141,6 +142,7 @@ void BbdouSpecialCode::init() { SPECIAL(0x0016001E, spcRemoveInventoryItem); SPECIAL(0x0016001F, spcHasInventoryItem); SPECIAL(0x00160025, spcCloseInventory); + SPECIAL(0x00160030, spcResetCursor); SPECIAL(0x00160032, spcSetCursorField90); SPECIAL(0x00160037, spcIsCursorHoldingObjectId); SPECIAL(0x00160038, spcInitRadarMicrophone); @@ -266,6 +268,12 @@ void BbdouSpecialCode::spcCloseInventory(OpCall &opCall) { _inventory->close(); } +void BbdouSpecialCode::spcResetCursor(OpCall &opCall) { + ARG_UINT32(objectId); + _cursor->reset(objectId); + _vm->notifyThreadId(opCall._threadId); +} + void BbdouSpecialCode::spcSetCursorField90(OpCall &opCall) { ARG_SKIP(4); // objectId unused _cursor->_data._field90 = 1; diff --git a/engines/illusions/bbdou/bbdou_specialcode.h b/engines/illusions/bbdou/bbdou_specialcode.h index 2462c2b172..6ffde37072 100644 --- a/engines/illusions/bbdou/bbdou_specialcode.h +++ b/engines/illusions/bbdou/bbdou_specialcode.h @@ -119,6 +119,7 @@ public: void spcRemoveInventoryItem(OpCall &opCall); void spcHasInventoryItem(OpCall &opCall); void spcCloseInventory(OpCall &opCall); + void spcResetCursor(OpCall &opCall); void spcSetCursorField90(OpCall &opCall); void spcIsCursorHoldingObjectId(OpCall &opCall); void spcInitRadarMicrophone(OpCall &opCall); |