[Scummvm-git-logs] scummvm master -> 033d8e008e632f2880b6f52c643c33f389a0aa5f
dreammaster
dreammaster at scummvm.org
Sat Dec 3 01:46:56 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:
033d8e008e TITANIC: Fix dragging inventory items onto the view
Commit: 033d8e008e632f2880b6f52c643c33f389a0aa5f
https://github.com/scummvm/scummvm/commit/033d8e008e632f2880b6f52c643c33f389a0aa5f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-12-02T19:46:47-05:00
Commit Message:
TITANIC: Fix dragging inventory items onto the view
Changed paths:
engines/titanic/pet_control/pet_inventory_glyphs.cpp
diff --git a/engines/titanic/pet_control/pet_inventory_glyphs.cpp b/engines/titanic/pet_control/pet_inventory_glyphs.cpp
index e6087b5..d7918cf 100644
--- a/engines/titanic/pet_control/pet_inventory_glyphs.cpp
+++ b/engines/titanic/pet_control/pet_inventory_glyphs.cpp
@@ -112,6 +112,7 @@ bool CPetInventoryGlyph::dragGlyph(const Point &topLeft, CMouseDragStartMsg *msg
return false;
CGameObject *carryParcel = petControl->getHiddenObject("CarryParcel");
+ CGameObject *item = _item;
if (petControl->isSuccUBusActive() && carryParcel) {
petControl->removeFromInventory(_item, carryParcel, false, true);
@@ -119,17 +120,18 @@ bool CPetInventoryGlyph::dragGlyph(const Point &topLeft, CMouseDragStartMsg *msg
carryParcel->setPosition(Point(msg->_mousePos.x - carryParcel->getBounds().width() / 2,
msg->_mousePos.y - carryParcel->getBounds().height() / 2));
- _item->setPosition(Point(SCREEN_WIDTH, SCREEN_HEIGHT));
+ carryParcel->setPosition(Point(SCREEN_WIDTH, SCREEN_HEIGHT));
+ item = carryParcel;
} else {
petControl->removeFromInventory(_item, false, true);
- _item->setPosition(Point(msg->_mousePos.x - carryParcel->getBounds().width() / 2,
- msg->_mousePos.y - carryParcel->getBounds().height() / 2));
+ _item->setPosition(Point(msg->_mousePos.x - _item->getBounds().width() / 2,
+ msg->_mousePos.y - _item->getBounds().height() / 2));
_item->setVisible(true);
}
msg->_handled = true;
- if (msg->execute(carryParcel)) {
+ if (msg->execute(item)) {
_item = nullptr;
_background = nullptr;
_field34 = 0;
More information about the Scummvm-git-logs
mailing list