[Scummvm-cvs-logs] CVS: scummvm/scumm script_v6.cpp,1.396,1.397 script_v72he.cpp,2.62,2.63

Travis Howell kirben at users.sourceforge.net
Wed Sep 8 05:16:03 CEST 2004


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

Modified Files:
	script_v6.cpp script_v72he.cpp 
Log Message:

Should be reading array id resource.


Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.396
retrieving revision 1.397
diff -u -d -r1.396 -r1.397
--- script_v6.cpp	5 Sep 2004 09:36:50 -0000	1.396
+++ script_v6.cpp	8 Sep 2004 12:14:55 -0000	1.397
@@ -3018,7 +3018,7 @@
 
 	num = readArray(value, 0, 0);
 
-	byte *ptr = getResourceAddress(rtString, num);
+	byte *ptr = getResourceAddress(rtString, readVar(value));
 	if (_version >= 7 || _heversion >= 72) {
 		var_A = READ_LE_UINT32(ptr + 4);
 		var_C = READ_LE_UINT32(ptr + 8);

Index: script_v72he.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v72he.cpp,v
retrieving revision 2.62
retrieving revision 2.63
diff -u -d -r2.62 -r2.63
--- script_v72he.cpp	8 Sep 2004 10:36:05 -0000	2.62
+++ script_v72he.cpp	8 Sep 2004 12:14:56 -0000	2.63
@@ -1565,12 +1565,8 @@
 
 	num = readArray(value, 0, 0);
 
-	ArrayHeader *ah = (ArrayHeader *)getResourceAddress(rtString, num);
-	// FIXME
-	if (!ah)
-		var_A = 0;
-	else
-		var_A = FROM_LE_32(ah->dim1end);
+	ArrayHeader *ah = (ArrayHeader *)getResourceAddress(rtString, readVar(value));
+	var_A = FROM_LE_32(ah->dim1end);
 
 	if (var_A-1 <= num) {
 		int16 var_2 = readArray(value, 0, num - 1);





More information about the Scummvm-git-logs mailing list