[Scummvm-cvs-logs] CVS: scummvm/scumm script_v8.cpp,2.114,2.115

James Brown ender at users.sourceforge.net
Tue Jan 14 04:00:03 CET 2003


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

Modified Files:
	script_v8.cpp 
Log Message:
Fix inventory in vscroll'ing rooms


Index: script_v8.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v8.cpp,v
retrieving revision 2.114
retrieving revision 2.115
diff -u -d -r2.114 -r2.115
--- script_v8.cpp	13 Jan 2003 14:22:53 -0000	2.114
+++ script_v8.cpp	14 Jan 2003 11:59:39 -0000	2.115
@@ -1474,20 +1474,21 @@
 		warning("o8_kernelGetFunctions: default case 0x%x (len = %d)", args[0], len);
 		break;
 	case 0xD8: {		// findBlastObject
+		int x = args[1] + (camera._cur.x & 7);
+		int y = args[2] + (camera._cur.y - (_realHeight /2));;
 		BlastObject *eo;
-		int i;
 
-		for (i = _enqueuePos; i >= 0; i--) {
+		for (int i = _enqueuePos; i >= 0; i--) {
 			eo = &_enqueuedObjects[i];
-			if (eo->posX <= args[1] && eo->width + eo->posX > args[1] &&
-			    eo->posY <= args[2] && eo->height + eo->posY > args[2]) {
+
+			if (eo->posX <= x && eo->width + eo->posX > x &&
+			    eo->posY <= y && eo->height + eo->posY > y) {
                 		if (!getClass(eo->number, 32)) {
 					push(eo->number);
 					return;
 				}
 			}
 		}
-
 		push(0);
 		break;
 	}





More information about the Scummvm-git-logs mailing list