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

dreammaster dreammaster at scummvm.org
Mon May 26 18:12:37 CEST 2014


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:
c7efc76af6 MADS: Fix inventory scrolling when picking up items


Commit: c7efc76af65434d171caa94f6eca550cc484289b
    https://github.com/scummvm/scummvm/commit/c7efc76af65434d171caa94f6eca550cc484289b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2014-05-26T12:12:01-04:00

Commit Message:
MADS: Fix inventory scrolling when picking up items

Changed paths:
    engines/mads/inventory.cpp



diff --git a/engines/mads/inventory.cpp b/engines/mads/inventory.cpp
index 434d284..b7864bc 100644
--- a/engines/mads/inventory.cpp
+++ b/engines/mads/inventory.cpp
@@ -150,10 +150,10 @@ void InventoryObjects::addToInventory(int objectId) {
 		_inventoryList.push_back(objectId);
 		userInterface._selectedInvIndex = _inventoryList.size() - 1;
 		userInterface._inventoryTopIndex = CLIP(userInterface._inventoryTopIndex,
-			0, (int)_inventoryList.size() - 1);
+			0, userInterface._selectedInvIndex);
 
 		if ((userInterface._inventoryTopIndex + 5) <= (int)_inventoryList.size())
-			userInterface._inventoryTopIndex = size() - 4;
+			userInterface._inventoryTopIndex = _inventoryList.size() - 5;
 		userInterface._inventoryChanged = true;
 
 		(*this)[objectId]._roomNumber = PLAYER_INVENTORY;






More information about the Scummvm-git-logs mailing list