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

dreammaster dreammaster at scummvm.org
Mon Dec 19 00:31:48 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:
ee80272416 TITANIC: Fix returning items to inventory if drop doesn't work


Commit: ee802724166c6cd8969493fac8660037fdd4774c
    https://github.com/scummvm/scummvm/commit/ee802724166c6cd8969493fac8660037fdd4774c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-12-18T18:31:46-05:00

Commit Message:
TITANIC: Fix returning items to inventory if drop doesn't work

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


diff --git a/engines/titanic/carry/carry.cpp b/engines/titanic/carry/carry.cpp
index 670c378..075b2b3 100644
--- a/engines/titanic/carry/carry.cpp
+++ b/engines/titanic/carry/carry.cpp
@@ -149,8 +149,7 @@ bool CCarry::MouseDragEndMsg(CMouseDragEndMsg *msg) {
 			return true;
 	}
 
-	CString viewName = getViewFullName();
-	if (viewName.empty() || msg->_mousePos.y >= 360) {
+	if (!compareViewNameTo(_fullViewName) || msg->_mousePos.y >= 360) {
 		sleep(250);
 		petAddToInventory();
 	} else {
@@ -184,8 +183,7 @@ bool CCarry::UseWithOtherMsg(CUseWithOtherMsg *msg) {
 	CShowTextMsg textMsg(_string3);
 	textMsg.execute("PET");
 
-	_fullViewName = getViewFullName();
-	if (_fullViewName.empty() || _bounds.top >= 360) {
+	if (!compareViewNameTo(_fullViewName) || _bounds.top >= 360) {
 		sleep(250);
 		petAddToInventory();
 	} else {
diff --git a/engines/titanic/input_handler.cpp b/engines/titanic/input_handler.cpp
index e2d1bd7..e4c60d2 100644
--- a/engines/titanic/input_handler.cpp
+++ b/engines/titanic/input_handler.cpp
@@ -155,7 +155,7 @@ CGameObject *CInputHandler::dragEnd(const Point &pt, CTreeItem *dragItem) {
 	if (!view)
 		return nullptr;
 
-	// Scan through the view items to find the item being dropped on
+	// Scan through the view items to find the element being dropped on
 	CGameObject *target = nullptr;
 	for (CTreeItem *treeItem = view->scan(view); treeItem; treeItem = treeItem->scan(view)) {
 		CGameObject *gameObject = dynamic_cast<CGameObject *>(treeItem);





More information about the Scummvm-git-logs mailing list