[Scummvm-git-logs] scummvm master -> b1b3c11a600cb62abeae3f0b2cd14e2ba7a51c28

dreammaster dreammaster at scummvm.org
Wed Nov 9 03:40:52 CET 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
b1b3c11a60 TITANIC: Fix drag and dropping the PET Rooms glyph


Commit: b1b3c11a600cb62abeae3f0b2cd14e2ba7a51c28
    https://github.com/scummvm/scummvm/commit/b1b3c11a600cb62abeae3f0b2cd14e2ba7a51c28
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-11-08T21:40:44-05:00

Commit Message:
TITANIC: Fix drag and dropping the PET Rooms glyph

Changed paths:
    engines/titanic/pet_control/pet_drag_chev.cpp
    engines/titanic/pet_control/pet_rooms_glyphs.cpp



diff --git a/engines/titanic/pet_control/pet_drag_chev.cpp b/engines/titanic/pet_control/pet_drag_chev.cpp
index 7816570..4fe6428 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 0f7a582..47457ba 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);
 		}
 	}
 





More information about the Scummvm-git-logs mailing list