diff options
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/verbs.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/scumm/verbs.cpp b/scumm/verbs.cpp index d8d847cc56..7331358b0c 100644 --- a/scumm/verbs.cpp +++ b/scumm/verbs.cpp @@ -212,15 +212,15 @@ void Scumm::checkV2Inventory(int x, int y) { return; if (v2_mouseover_boxes[kInventoryUpArrow].rect.contains(x, y)) { - _inventoryOffset -= 2; - if (_inventoryOffset < 0) - _inventoryOffset = 0; - redrawV2Inventory(); + if (_inventoryOffset >= 2) { + _inventoryOffset -= 2; + redrawV2Inventory(); + } } else if (v2_mouseover_boxes[kInventoryDownArrow].rect.contains(x, y)) { - _inventoryOffset += 2; - if (_inventoryOffset > (getInventoryCount(_scummVars[VAR_EGO])-2)) - _inventoryOffset = (getInventoryCount(_scummVars[VAR_EGO])-2); - redrawV2Inventory(); + if (_inventoryOffset + 4 < getInventoryCount(_scummVars[VAR_EGO])) { + _inventoryOffset += 2; + redrawV2Inventory(); + } } for (object = 0; object < 4; object++) { |