From b0653e1c924650c86edd220a37786c82faaeb11e Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Wed, 5 Nov 2014 22:40:52 -0500 Subject: ACCESS: Fix redrawing during inventory item dragging --- engines/access/inventory.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/engines/access/inventory.cpp b/engines/access/inventory.cpp index f31379a2fa..86e73c1cec 100644 --- a/engines/access/inventory.cpp +++ b/engines/access/inventory.cpp @@ -394,7 +394,7 @@ void InventoryManager::combineItems() { int invItem = _items[_boxNum]; events.pollEvents(); - // Item drag handling loop + // Item drag handling loop if left button is held down while (!_vm->shouldQuit() && events._leftButton) { // Poll for events events.pollEvents(); @@ -408,9 +408,12 @@ void InventoryManager::combineItems() { Common::Rect lastRect(lastBox.x, lastBox.y, lastBox.x + 46, lastBox.y + 35); screen.copyBlock(&_vm->_buffer2, lastRect); - int xp = MAX(events._mousePos.x - tempMouse.x + tempBox.x, 0); - int yp = MAX(events._mousePos.y - tempMouse.y + tempBox.y, 0); - screen.plotImage(sprites, invItem, Common::Point(xp, yp)); + Common::Point newPt; + newPt.x = MAX(events._mousePos.x - tempMouse.x + tempBox.x, 0); + newPt.y = MAX(events._mousePos.y - tempMouse.y + tempBox.y, 0); + + screen.plotImage(sprites, invItem, newPt); + lastBox = newPt; } int destBox = events.checkMouseBox1(_invCoords); -- cgit v1.2.3