[Scummvm-git-logs] scummvm master -> 0e5ed5b502a01bee645edeb6bafba79a772aa0a8

dreammaster dreammaster at scummvm.org
Sun Jan 15 17:49:58 CET 2017


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:
0e5ed5b502 TITANIC: Figured out missing code in CGlass::MouseDragEndMsg


Commit: 0e5ed5b502a01bee645edeb6bafba79a772aa0a8
    https://github.com/scummvm/scummvm/commit/0e5ed5b502a01bee645edeb6bafba79a772aa0a8
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-01-15T11:49:49-05:00

Commit Message:
TITANIC: Figured out missing code in CGlass::MouseDragEndMsg

Changed paths:
    engines/titanic/carry/glass.cpp


diff --git a/engines/titanic/carry/glass.cpp b/engines/titanic/carry/glass.cpp
index 05c8d11..d57c63d 100644
--- a/engines/titanic/carry/glass.cpp
+++ b/engines/titanic/carry/glass.cpp
@@ -127,14 +127,17 @@ bool CGlass::ActMsg(CActMsg *msg) {
 bool CGlass::MouseDragEndMsg(CMouseDragEndMsg *msg) {
 	showMouse();
 	if (msg->_dropTarget) {
-		error("TODO: See what drop target is");
-		CCharacter *npc = dynamic_cast<CCharacter *>(msg->_dropTarget);
-		if (npc) {
-			CUseWithCharMsg useMsg(npc);
-			useMsg.execute(this);
+		if (msg->_dropTarget->isPet()) {
+			petAddToInventory();
 		} else {
-			CUseWithOtherMsg otherMsg(npc);
-			otherMsg.execute(this);
+			CCharacter *npc = dynamic_cast<CCharacter *>(msg->_dropTarget);
+			if (npc) {
+				CUseWithCharMsg useMsg(npc);
+				useMsg.execute(this);
+			} else {
+				CUseWithOtherMsg otherMsg(npc);
+				otherMsg.execute(this);
+			}
 		}
 	} else if (compareViewNameTo(_fullViewName) && msg->_mousePos.y < 360) {
 		setPosition(_origPos);





More information about the Scummvm-git-logs mailing list