[Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.176,2.177 script_v6.cpp,1.377,1.378 script_v6he.cpp,2.83,2.84 script_v7he.cpp,2.32,2.33

Max Horn fingolfin at users.sourceforge.net
Sat Aug 14 08:15:00 CEST 2004


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28773

Modified Files:
	intern.h script_v6.cpp script_v6he.cpp script_v7he.cpp 
Log Message:
Renamed o6_unknownE1 to o6_getPixel; use vs->xstart instead of _screenLeft

Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/intern.h,v
retrieving revision 2.176
retrieving revision 2.177
diff -u -d -r2.176 -r2.177
--- intern.h	4 Jul 2004 12:06:17 -0000	2.176
+++ intern.h	14 Aug 2004 15:14:00 -0000	2.177
@@ -511,7 +511,7 @@
 	void o6_findAllObjects();
 	void o6_pickVarRandom();
 	void o6_getDateTime();
-	void o6_unknownE1();
+	void o6_getPixel();
 	void o6_setBoxSet();
 	void o6_shuffle();
 

Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.377
retrieving revision 1.378
diff -u -d -r1.377 -r1.378
--- script_v6.cpp	14 Aug 2004 07:04:31 -0000	1.377
+++ script_v6.cpp	14 Aug 2004 15:14:01 -0000	1.378
@@ -331,7 +331,7 @@
 		OPCODE(o6_invalid),
 		/* E0 */
 		OPCODE(o6_invalid),
-		OPCODE(o6_unknownE1),
+		OPCODE(o6_getPixel),
 		OPCODE(o6_invalid),
 		OPCODE(o6_pickVarRandom),
 		/* E4 */
@@ -3104,7 +3104,7 @@
 		VAR(VAR_TIMEDATE_SECOND) = t->tm_sec;
 }
 
-void ScummEngine_v6::o6_unknownE1() {
+void ScummEngine_v6::o6_getPixel() {
 	// this opcode check ground area in minigame "Asteroid Lander" in the dig
 	int x, y;
 
@@ -3116,28 +3116,14 @@
 		x = pop();
 	}
 
-	if (x > _screenWidth - 1) {
-		push(-1);
-		return;
-	}
-	if (x < 0) {
-		push(-1);
-		return;
-	}
-
-	if (y < 0) {
-		push(-1);
-		return;
-	}
-	
 	VirtScreen *vs = findVirtScreen(y);
 
-	if (vs == NULL) {
+	if (vs == NULL || x > _screenWidth - 1 || x < 0) {
 		push(-1);
 		return;
 	}
 
-	int offset = (y - vs->topline) * vs->width + x + _screenLeft;
+	int offset = (y - vs->topline) * vs->width + x + vs->xstart;
 
 	byte area = *(vs->screenPtr + offset);
 	push(area);

Index: script_v6he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6he.cpp,v
retrieving revision 2.83
retrieving revision 2.84
diff -u -d -r2.83 -r2.84
--- script_v6he.cpp	5 Aug 2004 11:03:22 -0000	2.83
+++ script_v6he.cpp	14 Aug 2004 15:14:01 -0000	2.84
@@ -333,7 +333,7 @@
 		OPCODE(o6_rename),
 		/* E0 */
 		OPCODE(o6_soundOps),
-		OPCODE(o6_unknownE1),
+		OPCODE(o6_getPixel),
 		OPCODE(o6_localizeArray),
 		OPCODE(o6_pickVarRandom),
 		/* E4 */

Index: script_v7he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v7he.cpp,v
retrieving revision 2.32
retrieving revision 2.33
diff -u -d -r2.32 -r2.33
--- script_v7he.cpp	1 Aug 2004 01:54:37 -0000	2.32
+++ script_v7he.cpp	14 Aug 2004 15:14:01 -0000	2.33
@@ -333,7 +333,7 @@
 		OPCODE(o6_rename),
 		/* E0 */
 		OPCODE(o6_soundOps),
-		OPCODE(o6_unknownE1),
+		OPCODE(o6_getPixel),
 		OPCODE(o6_localizeArray),
 		OPCODE(o6_pickVarRandom),
 		/* E4 */





More information about the Scummvm-git-logs mailing list