From 1b82caa9126c2ce20bbb4f62af5d261ad12bab8a Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 23 Feb 2004 05:38:20 +0000 Subject: Add HE specific modifications to readArray and writeArray. That fixes those crashes svn-id: r13004 --- scumm/script_v6.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'scumm') diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index fe0a1a2314..0904b2a0d1 100644 --- a/scumm/script_v6.cpp +++ b/scumm/script_v6.cpp @@ -506,7 +506,8 @@ int ScummEngine_v6::readArray(int array, int idx, int base) { // 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 @@ void ScummEngine_v6::writeArray(int array, int idx, int base, int value) { 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) -- cgit v1.2.3