[Scummvm-cvs-logs] scummvm master -> b74bc43a53e50439660edf01c7d40e69fef87a27

dreammaster dreammaster at scummvm.org
Mon Jun 29 03:16:50 CEST 2015


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:
b74bc43a53 SHERLOCK: RT: Fix display of inventory window


Commit: b74bc43a53e50439660edf01c7d40e69fef87a27
    https://github.com/scummvm/scummvm/commit/b74bc43a53e50439660edf01c7d40e69fef87a27
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-06-28T21:15:54-04:00

Commit Message:
SHERLOCK: RT: Fix display of inventory window

Changed paths:
    engines/sherlock/tattoo/tattoo_user_interface.cpp
    engines/sherlock/tattoo/widget_inventory.cpp



diff --git a/engines/sherlock/tattoo/tattoo_user_interface.cpp b/engines/sherlock/tattoo/tattoo_user_interface.cpp
index 5f9aec8..9f9b6f1 100644
--- a/engines/sherlock/tattoo/tattoo_user_interface.cpp
+++ b/engines/sherlock/tattoo/tattoo_user_interface.cpp
@@ -397,7 +397,7 @@ void TattooUserInterface::doStandardControl() {
 	case Common::KEYCODE_F3:
 		// Display inventory
 		freeMenu();
-		doInventory(2);
+		doInventory(3);
 		return;
 
 	case Common::KEYCODE_F4:
diff --git a/engines/sherlock/tattoo/widget_inventory.cpp b/engines/sherlock/tattoo/widget_inventory.cpp
index 2d5e0c3..c2379a5 100644
--- a/engines/sherlock/tattoo/widget_inventory.cpp
+++ b/engines/sherlock/tattoo/widget_inventory.cpp
@@ -57,6 +57,11 @@ void WidgetInventory::load(int mode) {
 	Inventory &inv = *_vm->_inventory;
 	Common::Point mousePos = events.mousePos();
 
+	if (mode == 3) {
+		mode = 2;
+		mousePos = Common::Point(SHERLOCK_SCREEN_WIDTH / 2, SHERLOCK_SCREEN_HEIGHT / 2);
+	}
+
 	if (mode != 0)
 		_invMode = mode;
 	_invVerbMode = 0;
@@ -94,7 +99,7 @@ void WidgetInventory::drawInventory() {
 	for (int idx = 0, itemId = inv._invIndex; idx < NUM_INVENTORY_SHOWN; ++idx, ++itemId) {
 		// Figure out the drawing position
 		Common::Point pt(3 + (INVENTORY_XSIZE + 3) * (idx % (NUM_INVENTORY_SHOWN / 2)),
-			3 + (INVENTORY_YSIZE + 3) * idx / (NUM_INVENTORY_SHOWN / 2));
+			3 + (INVENTORY_YSIZE + 3) * (idx / (NUM_INVENTORY_SHOWN / 2)));
 
 		// Draw the box to serve as the background for the item
 		_surface.hLine(pt.x + 1, pt.y, pt.x + INVENTORY_XSIZE - 2, TRANSPARENCY);






More information about the Scummvm-git-logs mailing list