diff options
author | johndoe123 | 2016-03-25 22:31:33 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2018-07-20 06:43:33 +0000 |
commit | ad558f8c684662e8dbfdf96dcf1e244d5a0b2451 (patch) | |
tree | 354f96a5f932551ff6d94f12a01d33bb139677e3 | |
parent | 41c7a99262d73658f86dec5fadbd01de7a4fa9bf (diff) | |
download | scummvm-rg350-ad558f8c684662e8dbfdf96dcf1e244d5a0b2451.tar.gz scummvm-rg350-ad558f8c684662e8dbfdf96dcf1e244d5a0b2451.tar.bz2 scummvm-rg350-ad558f8c684662e8dbfdf96dcf1e244d5a0b2451.zip |
ILLUSIONS: BBDOU: Rename more
-rw-r--r-- | engines/illusions/bbdou/bbdou_specialcode.cpp | 51 | ||||
-rw-r--r-- | engines/illusions/bbdou/bbdou_specialcode.h | 2 |
2 files changed, 26 insertions, 27 deletions
diff --git a/engines/illusions/bbdou/bbdou_specialcode.cpp b/engines/illusions/bbdou/bbdou_specialcode.cpp index ed1ce5cb95..bc6ed0338d 100644 --- a/engines/illusions/bbdou/bbdou_specialcode.cpp +++ b/engines/illusions/bbdou/bbdou_specialcode.cpp @@ -512,7 +512,7 @@ void BbdouSpecialCode::hideVerbBubble(uint32 objectId, VerbState *verbState) { _vm->_input->discardAllEvents(); } -bool BbdouSpecialCode::testValueRange(int value) { +bool BbdouSpecialCode::testInteractModeRange(int value) { return value >= 2 && value <= 7; } @@ -649,8 +649,8 @@ void BbdouSpecialCode::cursorInteractControlRoutine(Control *cursorControl, uint if (cursorData._verbState._isBubbleVisible) playSoundEffect(4); hideVerbBubble(cursorControl->_objectId, &cursorData._verbState); - int value = _objectInteractModeMap.getObjectInteractMode(overlappedControl->_objectId); - if (!testValueRange(value)) { + int interactMode = _objectInteractModeMap.getObjectInteractMode(overlappedControl->_objectId); + if (!testInteractModeRange(interactMode)) { if (cursorData._mode == 3) _cursor->restoreInfo(); _cursor->show(cursorControl); @@ -659,7 +659,7 @@ void BbdouSpecialCode::cursorInteractControlRoutine(Control *cursorControl, uint cursorData._overlappedObjectId = overlappedControl->_objectId; runCause(cursorControl, cursorData, 0x1B0009, 0, overlappedControl->_objectId, 0); } - if (value == 10) { + if (interactMode == 10) { if (cursorData._holdingObjectId) { cursorData._verbState._verbId = 0x1B0003; cursorData._currOverlappedObjectId = overlappedControl->_objectId; @@ -682,7 +682,7 @@ void BbdouSpecialCode::cursorInteractControlRoutine(Control *cursorControl, uint cursorData._verbState._verbId = 0x1B0006; cursorData._holdingObjectId = 0; } - cursorData._sequenceId = _cursor->getSequenceId1(value); + cursorData._sequenceId = _cursor->getSequenceId1(interactMode); _cursor->show(cursorControl); cursorData._currOverlappedObjectId = overlappedControl->_objectId; } @@ -820,15 +820,27 @@ void BbdouSpecialCode::cursorCrosshairControlRoutine(Control *cursorControl, uin if (foundOverlapped) { if (overlappedControl->_objectId != cursorData._currOverlappedObjectId) { hideVerbBubble(cursorControl->_objectId, &cursorData._verbState); - int value = _objectInteractModeMap.getObjectInteractMode(overlappedControl->_objectId); - if (value == 2 || value == 3 || value == 4 || value == 5 || value == 6 || value == 7) { + int interactMode = _objectInteractModeMap.getObjectInteractMode(overlappedControl->_objectId); + if (!testInteractModeRange(interactMode)) { + if (cursorData._mode == 3) + _cursor->restoreInfo(); + _cursor->show(cursorControl); + cursorControl->setActorIndexTo2(); + if (overlappedControl->_objectId) { + cursorData._verbState._verbId = 0x1B0003; + cursorData._currOverlappedObjectId = overlappedControl->_objectId; + } else { + cursorData._verbState._verbId = 0x1B0002; + cursorData._currOverlappedObjectId = overlappedControl->_objectId; + } + } else { if (cursorData._mode != 3) { _cursor->saveInfo(); cursorData._mode = 3; cursorData._verbState._verbId = 0x1B0006; cursorData._holdingObjectId = 0; } - switch (value) { + switch (interactMode) { case 2: cursorData._sequenceId = 0x60010; break; @@ -850,18 +862,6 @@ void BbdouSpecialCode::cursorCrosshairControlRoutine(Control *cursorControl, uin } _cursor->show(cursorControl); cursorData._currOverlappedObjectId = overlappedControl->_objectId; - } else { - if (cursorData._mode == 3) - _cursor->restoreInfo(); - _cursor->show(cursorControl); - cursorControl->setActorIndexTo2(); - if (overlappedControl->_objectId) { - cursorData._verbState._verbId = 0x1B0003; - cursorData._currOverlappedObjectId = overlappedControl->_objectId; - } else { - cursorData._verbState._verbId = 0x1B0002; - cursorData._currOverlappedObjectId = overlappedControl->_objectId; - } } } } else { @@ -956,19 +956,19 @@ bool BbdouSpecialCode::testVerbId(uint32 verbId, uint32 holdingObjectId, uint32 static const uint32 kVerbIdsH8[] = {0x001B0003, 0x001B0001, 0}; const uint32 *verbIds; - int value = _objectInteractModeMap.getObjectInteractMode(overlappedObjectId); + int interactMode = _objectInteractModeMap.getObjectInteractMode(overlappedObjectId); if (holdingObjectId) { - if (value == 9) + if (interactMode == 9) verbIds = kVerbIdsH9; - else if (value == 9) + else if (interactMode == 9) verbIds = kVerbIdsH8; else verbIds = kVerbIdsHE; } else { - if (value == 9) + if (interactMode == 9) verbIds = kVerbIdsE9; - else if (value == 8) + else if (interactMode == 8) verbIds = kVerbIdsE8; else verbIds = kVerbIdsEE; @@ -1030,7 +1030,6 @@ bool BbdouSpecialCode::runCause(Control *cursorControl, CursorData &cursorData, if (!success) return false; - _cursor->hide(cursorControl->_objectId); diff --git a/engines/illusions/bbdou/bbdou_specialcode.h b/engines/illusions/bbdou/bbdou_specialcode.h index ad9d3b7a1d..5d11e3b369 100644 --- a/engines/illusions/bbdou/bbdou_specialcode.h +++ b/engines/illusions/bbdou/bbdou_specialcode.h @@ -176,7 +176,7 @@ public: protected: // Internal functions - bool testValueRange(int value); + bool testInteractModeRange(int value); void setCursorControlRoutine(uint32 objectId, int num); Common::Point getBackgroundCursorPos(Common::Point cursorPos); void showBubble(uint32 objectId, uint32 overlappedObjectId, uint32 holdingObjectId, |