From c6f2c6ba4eb013119597399e04b58435fe70bfab Mon Sep 17 00:00:00 2001 From: johndoe123 Date: Mon, 7 Dec 2015 13:37:43 +0100 Subject: ILLUSIONS: BBDOU: Implement special code 16000F --- engines/illusions/bbdou/bbdou_cursor.cpp | 2 +- engines/illusions/bbdou/bbdou_specialcode.cpp | 14 ++++++++++++++ engines/illusions/bbdou/bbdou_specialcode.h | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) (limited to 'engines/illusions') diff --git a/engines/illusions/bbdou/bbdou_cursor.cpp b/engines/illusions/bbdou/bbdou_cursor.cpp index 61422a8e68..090c80946b 100644 --- a/engines/illusions/bbdou/bbdou_cursor.cpp +++ b/engines/illusions/bbdou/bbdou_cursor.cpp @@ -46,7 +46,7 @@ void BbdouCursor::init(uint32 objectId, uint32 progResKeywordId) { _vm->_controls->placeActor(0x50001, pos, 0x6000C, objectId, 0); Control *control = _vm->_dict->getObjectControl(objectId); - //control->_actor->setControlRoutine(new Common::Functor2Mem(this, &BbdouCursor::actorControlRoutine1)); + // TODO? control->_actor->setControlRoutine(new Common::Functor2Mem(this, &BbdouCursor::actorControlRoutine1)); control->_flags |= 8; _data._mode = 1; diff --git a/engines/illusions/bbdou/bbdou_specialcode.cpp b/engines/illusions/bbdou/bbdou_specialcode.cpp index b10b8d287a..db03cb8eb4 100644 --- a/engines/illusions/bbdou/bbdou_specialcode.cpp +++ b/engines/illusions/bbdou/bbdou_specialcode.cpp @@ -131,6 +131,7 @@ void BbdouSpecialCode::init() { SPECIAL(0x0016000A, spcAddCursorSequence); SPECIAL(0x0016000B, spcCursorStartHoldingObjectId); SPECIAL(0x0016000C, spcCursorStopHoldingObjectId); + SPECIAL(0x0016000F, spcSetCursorState); SPECIAL(0x00160013, spcInitBubble); SPECIAL(0x00160014, spcSetupBubble); SPECIAL(0x00160015, spcSetObjectInteractMode); @@ -205,6 +206,18 @@ void BbdouSpecialCode::spcCursorStopHoldingObjectId(OpCall &opCall) { _vm->notifyThreadId(opCall._threadId); } +void BbdouSpecialCode::spcSetCursorState(OpCall &opCall) { + ARG_UINT32(objectId); + ARG_UINT32(newState); + _cursor->_data._item10._field0 = newState; + _cursor->clearCursorDataField14(); + if (newState == 5) + setCursorControlRoutine(objectId, 1); + else + setCursorControlRoutine(objectId, 0); + _vm->notifyThreadId(opCall._threadId); +} + void BbdouSpecialCode::spcInitBubble(OpCall &opCall) { _bubble->init(); _vm->notifyThreadId(opCall._threadId); @@ -271,6 +284,7 @@ void BbdouSpecialCode::spcCloseInventory(OpCall &opCall) { void BbdouSpecialCode::spcResetCursor(OpCall &opCall) { ARG_UINT32(objectId); _cursor->reset(objectId); + setCursorControlRoutine(objectId, 0); _vm->notifyThreadId(opCall._threadId); } diff --git a/engines/illusions/bbdou/bbdou_specialcode.h b/engines/illusions/bbdou/bbdou_specialcode.h index 6ffde37072..762aff1de0 100644 --- a/engines/illusions/bbdou/bbdou_specialcode.h +++ b/engines/illusions/bbdou/bbdou_specialcode.h @@ -108,6 +108,7 @@ public: void spcAddCursorSequence(OpCall &opCall); void spcCursorStartHoldingObjectId(OpCall &opCall); void spcCursorStopHoldingObjectId(OpCall &opCall); + void spcSetCursorState(OpCall &opCall); void spcInitBubble(OpCall &opCall); void spcSetupBubble(OpCall &opCall); void spcSetObjectInteractMode(OpCall &opCall); -- cgit v1.2.3