[Scummvm-cvs-logs] CVS: scummvm/simon sound.cpp,1.95,1.96 vga.cpp,1.157,1.158

kirben kirben at users.sourceforge.net
Mon Nov 14 20:55:02 CET 2005


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

Modified Files:
	sound.cpp vga.cpp 
Log Message:

Correction to pathfinding in FF.


Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/sound.cpp,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -d -r1.95 -r1.96
--- sound.cpp	14 Nov 2005 12:01:31 -0000	1.95
+++ sound.cpp	15 Nov 2005 04:54:18 -0000	1.96
@@ -462,8 +462,7 @@
 			return;
 	}
 
-	// TODO: Use sound offsets
-	soundData += 8;
+	soundData += READ_LE_UINT32(soundData + sound * 4);
 	int32 size = READ_LE_UINT32(soundData + 4);
 	Common::MemoryReadStream stream(soundData, size);
 	if (!loadWAVFromStream(stream, size, rate, flags)) {

Index: vga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/vga.cpp,v
retrieving revision 1.157
retrieving revision 1.158
diff -u -d -r1.157 -r1.158
--- vga.cpp	15 Nov 2005 04:07:05 -0000	1.157
+++ vga.cpp	15 Nov 2005 04:54:18 -0000	1.158
@@ -1563,20 +1563,21 @@
 
 	if (getGameType() == GType_FF) {
 		VgaSprite *vsp = find_cur_sprite();
-		int x, y, y1, y2, ydiff, count = 0;
+		int x, x2, y, y1, y2, ydiff, count = 0;
 
-		while(vsp->x > readUint16Wrapper(p + 2)) {
+		while(vsp->x < readUint16Wrapper(p + 2)) {
 			p += 2;
 			count++;
 		}
 
 		y1 = readUint16Wrapper(p + 1);
+		x2 = readUint16Wrapper(p + 2);
 		y2 = readUint16Wrapper(p + 3);
 
-		if (y2 != 9999) {
+		if (x2 != 9999) {
 			ydiff = y2 - y1;
 			if (ydiff < 0) {
-				ydiff = - ydiff;
+				ydiff = -ydiff;
 				x = vsp->x & 7;
 				ydiff *= x;
 				ydiff /= 8;





More information about the Scummvm-git-logs mailing list