[Scummvm-cvs-logs] SF.net SVN: scummvm: [21995] scummvm/trunk/engines/simon

kirben at users.sourceforge.net kirben at users.sourceforge.net
Mon Apr 17 17:16:22 CEST 2006


Revision: 21995
Author:   kirben
Date:     2006-04-17 17:15:25 -0700 (Mon, 17 Apr 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=21995&view=rev

Log Message:
-----------
Scrolling comparisons should always be signed, fixes scrolling issue in maze of FF

Modified Paths:
--------------
    scummvm/trunk/engines/simon/simon.cpp
    scummvm/trunk/engines/simon/simon.h
    scummvm/trunk/engines/simon/vga.cpp
Modified: scummvm/trunk/engines/simon/simon.cpp
===================================================================
--- scummvm/trunk/engines/simon/simon.cpp	2006-04-17 23:55:42 UTC (rev 21994)
+++ scummvm/trunk/engines/simon/simon.cpp	2006-04-18 00:15:25 UTC (rev 21995)
@@ -2330,6 +2330,7 @@
 		_scrollCount = 0;
 		_scrollFlag = 0;
 		_scrollHeight = 134;
+		_variableArrayPtr = _variableArray;
 		if (_variableArray[34] >= 0) {
 			if (getGameType() == GType_FF)
 				_variableArray[250] = 0;

Modified: scummvm/trunk/engines/simon/simon.h
===================================================================
--- scummvm/trunk/engines/simon/simon.h	2006-04-17 23:55:42 UTC (rev 21994)
+++ scummvm/trunk/engines/simon/simon.h	2006-04-18 00:15:25 UTC (rev 21995)
@@ -1014,8 +1014,8 @@
 	void vcSkipNextInstruction();
 
 	int getScale(int y, int x);
-	void checkScrollX(int x, int xpos);
-	void checkScrollY(int y, int ypos);
+	void checkScrollX(int16 x, int16 xpos);
+	void checkScrollY(int16 y, int16 ypos);
 	void centreScroll();
 
 	bool itemIsSiblingOf(uint16 val);

Modified: scummvm/trunk/engines/simon/vga.cpp
===================================================================
--- scummvm/trunk/engines/simon/vga.cpp	2006-04-17 23:55:42 UTC (rev 21994)
+++ scummvm/trunk/engines/simon/vga.cpp	2006-04-18 00:15:25 UTC (rev 21995)
@@ -2482,7 +2482,7 @@
 }
 
 // Scrolling functions for Feeble Files
-void SimonEngine::checkScrollX(int x, int xpos) {
+void SimonEngine::checkScrollX(int16 x, int16 xpos) {
 	if (_scrollXMax == 0 || getBitFlag(80) || getBitFlag(82) || x == 0)
 		return;
 
@@ -2513,7 +2513,7 @@
 				return;
 		}
 
-		if ((uint16)(xpos - _scrollX) < 161) {
+		if (xpos - _scrollX < 161) {
 			_scrollCount = -320;
 			if (_scrollX < 320)
 				_scrollCount = -_scrollX;
@@ -2521,7 +2521,7 @@
 	}
 }
 
-void SimonEngine::checkScrollY(int y, int ypos) {
+void SimonEngine::checkScrollY(int16 y, int16 ypos) {
 	if (_scrollYMax == 0 || getBitFlag(80))
 		return;
 
@@ -2550,7 +2550,7 @@
 				return;
 		}
 
-		if ((uint16)(ypos - _scrollY) < 100) {
+		if (ypos - _scrollY < 100) {
 			_scrollCount = -240;
 			if (_scrollY < 240)
 				_scrollCount = -_scrollY;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the Scummvm-git-logs mailing list