aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2015-06-28 21:15:54 -0400
committerPaul Gilbert2015-06-28 21:15:54 -0400
commitb74bc43a53e50439660edf01c7d40e69fef87a27 (patch)
treec7c3d67d8cdf62477798fdce3a030b4049c4ab0d
parente8986239c5153d3956da115523a6095d6710be39 (diff)
downloadscummvm-rg350-b74bc43a53e50439660edf01c7d40e69fef87a27.tar.gz
scummvm-rg350-b74bc43a53e50439660edf01c7d40e69fef87a27.tar.bz2
scummvm-rg350-b74bc43a53e50439660edf01c7d40e69fef87a27.zip
SHERLOCK: RT: Fix display of inventory window
-rw-r--r--engines/sherlock/tattoo/tattoo_user_interface.cpp2
-rw-r--r--engines/sherlock/tattoo/widget_inventory.cpp7
2 files changed, 7 insertions, 2 deletions
diff --git a/engines/sherlock/tattoo/tattoo_user_interface.cpp b/engines/sherlock/tattoo/tattoo_user_interface.cpp
index 5f9aec89bf..9f9b6f1d82 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 2d5e0c3746..c2379a5430 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);