diff options
author | Eugene Sandulenko | 2004-02-23 05:38:20 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2004-02-23 05:38:20 +0000 |
commit | 1b82caa9126c2ce20bbb4f62af5d261ad12bab8a (patch) | |
tree | 0dad3b8ceda08c8a003333cd2874a8b616b7279e /scumm | |
parent | a2ea28b56fc69488b9d8705cb9e28c1b6a81af96 (diff) | |
download | scummvm-rg350-1b82caa9126c2ce20bbb4f62af5d261ad12bab8a.tar.gz scummvm-rg350-1b82caa9126c2ce20bbb4f62af5d261ad12bab8a.tar.bz2 scummvm-rg350-1b82caa9126c2ce20bbb4f62af5d261ad12bab8a.zip |
Add HE specific modifications to readArray and writeArray. That fixes
those crashes
svn-id: r13004
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/script_v6.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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) |