mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-03 23:52:41 +00:00
fix inventory scrolling V1/V2 games (there were problems with an odd inventory count)
svn-id: r9201
This commit is contained in:
parent
80cbf90a9d
commit
7e54a2f569
@ -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++) {
|
||||
|
Loading…
Reference in New Issue
Block a user