[Scummvm-cvs-logs] CVS: scummvm/scumm verbs.cpp,1.69,1.70

Max Horn fingolfin at users.sourceforge.net
Sun Jul 27 10:34:09 CEST 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv2849

Modified Files:
	verbs.cpp 
Log Message:
fix inventory scrolling V1/V2 games (there were problems with an odd inventory count)

Index: verbs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/verbs.cpp,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- verbs.cpp	15 Jul 2003 21:30:53 -0000	1.69
+++ verbs.cpp	27 Jul 2003 17:33:28 -0000	1.70
@@ -212,15 +212,15 @@
 		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++) {





More information about the Scummvm-git-logs mailing list