mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-04 16:26:53 +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;
|
return;
|
||||||
|
|
||||||
if (v2_mouseover_boxes[kInventoryUpArrow].rect.contains(x, y)) {
|
if (v2_mouseover_boxes[kInventoryUpArrow].rect.contains(x, y)) {
|
||||||
_inventoryOffset -= 2;
|
if (_inventoryOffset >= 2) {
|
||||||
if (_inventoryOffset < 0)
|
_inventoryOffset -= 2;
|
||||||
_inventoryOffset = 0;
|
redrawV2Inventory();
|
||||||
redrawV2Inventory();
|
}
|
||||||
} else if (v2_mouseover_boxes[kInventoryDownArrow].rect.contains(x, y)) {
|
} else if (v2_mouseover_boxes[kInventoryDownArrow].rect.contains(x, y)) {
|
||||||
_inventoryOffset += 2;
|
if (_inventoryOffset + 4 < getInventoryCount(_scummVars[VAR_EGO])) {
|
||||||
if (_inventoryOffset > (getInventoryCount(_scummVars[VAR_EGO])-2))
|
_inventoryOffset += 2;
|
||||||
_inventoryOffset = (getInventoryCount(_scummVars[VAR_EGO])-2);
|
redrawV2Inventory();
|
||||||
redrawV2Inventory();
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (object = 0; object < 4; object++) {
|
for (object = 0; object < 4; object++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user