aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2017-01-15 11:49:49 -0500
committerPaul Gilbert2017-01-15 11:49:49 -0500
commit0e5ed5b502a01bee645edeb6bafba79a772aa0a8 (patch)
treecf248e968159669ebb0b05cd455be56ace85d993
parent3327b9ce8dd030e963d03a98de63def7344e1808 (diff)
downloadscummvm-rg350-0e5ed5b502a01bee645edeb6bafba79a772aa0a8.tar.gz
scummvm-rg350-0e5ed5b502a01bee645edeb6bafba79a772aa0a8.tar.bz2
scummvm-rg350-0e5ed5b502a01bee645edeb6bafba79a772aa0a8.zip
TITANIC: Figured out missing code in CGlass::MouseDragEndMsg
-rw-r--r--engines/titanic/carry/glass.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/engines/titanic/carry/glass.cpp b/engines/titanic/carry/glass.cpp
index 05c8d111b5..d57c63d0bb 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);