[Scummvm-cvs-logs] CVS: scummvm/scumm script_v6.cpp,1.309,1.310

Eugene Sandulenko sev at users.sourceforge.net
Sun Feb 22 21:52:01 CET 2004


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

Modified Files:
	script_v6.cpp 
Log Message:
Add HE specific modifications to readArray and writeArray. That fixes
those crashes


Index: script_v6.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/script_v6.cpp,v
retrieving revision 1.309
retrieving revision 1.310
diff -u -d -r1.309 -r1.310
--- script_v6.cpp	23 Feb 2004 04:01:39 -0000	1.309
+++ script_v6.cpp	23 Feb 2004 05:38:20 -0000	1.310
@@ -506,7 +506,8 @@
 	// from the function, but don't just go on overwriting memory!
 	assert(base >= 0 && base < FROM_LE_16(ah->dim1) * FROM_LE_16(ah->dim2));
 
-	if (FROM_LE_16(ah->type) == 4) {
+	if (FROM_LE_16(ah->type) == 4 || (_features & GF_HUMONGOUS
+									&& FROM_LE_16(ah->type) == rtCostume)) {
 		return ah->data[base];
 	} else if (_version == 8) {
 		return (int32)READ_LE_UINT32(ah->data + base * 4);
@@ -523,7 +524,8 @@
 
 	assert(base >= 0 && base < FROM_LE_16(ah->dim1) * FROM_LE_16(ah->dim2));
 
-	if (FROM_LE_16(ah->type) == 4) {
+	if (FROM_LE_16(ah->type) == rtSound || (_features & GF_HUMONGOUS
+									&& FROM_LE_16(ah->type) == rtCostume)) {
 		ah->data[base] = value;
 	} else if (_version == 8) {
 #if defined(SCUMM_NEED_ALIGNMENT)





More information about the Scummvm-git-logs mailing list