aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic
diff options
context:
space:
mode:
authorPaul Gilbert2016-11-08 21:40:44 -0500
committerPaul Gilbert2016-11-08 21:40:44 -0500
commitb1b3c11a600cb62abeae3f0b2cd14e2ba7a51c28 (patch)
treec907760fe84bfff5e6792970491640c662ac0b6a /engines/titanic
parentf1615d83d76ededc3966635c9dc15e6ab79cc6d4 (diff)
downloadscummvm-rg350-b1b3c11a600cb62abeae3f0b2cd14e2ba7a51c28.tar.gz
scummvm-rg350-b1b3c11a600cb62abeae3f0b2cd14e2ba7a51c28.tar.bz2
scummvm-rg350-b1b3c11a600cb62abeae3f0b2cd14e2ba7a51c28.zip
TITANIC: Fix drag and dropping the PET Rooms glyph
Diffstat (limited to 'engines/titanic')
-rw-r--r--engines/titanic/pet_control/pet_drag_chev.cpp22
-rw-r--r--engines/titanic/pet_control/pet_rooms_glyphs.cpp2
2 files changed, 11 insertions, 13 deletions
diff --git a/engines/titanic/pet_control/pet_drag_chev.cpp b/engines/titanic/pet_control/pet_drag_chev.cpp
index 7816570a23..4fe64283ff 100644
--- a/engines/titanic/pet_control/pet_drag_chev.cpp
+++ b/engines/titanic/pet_control/pet_drag_chev.cpp
@@ -54,20 +54,16 @@ bool CPetDragChev::MouseDragMoveMsg(CMouseDragMoveMsg *msg) {
}
bool CPetDragChev::MouseDragEndMsg(CMouseDragEndMsg *msg) {
- if (msg->_dropTarget) {
- CSuccUBus *succubus = dynamic_cast<CSuccUBus *>(msg->_dropTarget);
+ CSuccUBus *succubus = dynamic_cast<CSuccUBus *>(msg->_dropTarget);
- if (succubus) {
- CSetChevRoomBits chevMsg(_id);
- chevMsg.execute(succubus);
- } else {
- CPetControl *petControl = getPetControl();
- if (petControl && petControl->contains(msg->_mousePos)
- && msg->_mousePos.x < 528) {
- if (petControl->checkDragEnd(this))
- petMoveToHiddenRoom();
- }
- }
+ if (succubus) {
+ CSetChevRoomBits chevMsg(_id);
+ chevMsg.execute(succubus);
+ } else {
+ CPetControl *petControl = getPetControl();
+ if (!petControl || !petControl->contains(msg->_mousePos)
+ || msg->_mousePos.x >= 528 || !petControl->checkDragEnd(this))
+ petMoveToHiddenRoom();
}
return true;
diff --git a/engines/titanic/pet_control/pet_rooms_glyphs.cpp b/engines/titanic/pet_control/pet_rooms_glyphs.cpp
index 0f7a5828b3..47457bae4e 100644
--- a/engines/titanic/pet_control/pet_rooms_glyphs.cpp
+++ b/engines/titanic/pet_control/pet_rooms_glyphs.cpp
@@ -133,6 +133,8 @@ bool CPetRoomsGlyph::dragGlyph(const Point &topLeft, CMouseDragStartMsg *msg) {
if (msg->execute(chevron))
return true;
+
+ petControl->moveToHiddenRoom(chevron);
}
}