aboutsummaryrefslogtreecommitdiff
path: root/scumm/script_v6.cpp
diff options
context:
space:
mode:
authorNicolas Bacca2003-04-06 12:57:25 +0000
committerNicolas Bacca2003-04-06 12:57:25 +0000
commit9dba239af16413da63dfee4c7fb63d05be53322d (patch)
tree0dc6f3acd97512195eabcc8c1182d5c2c74b9239 /scumm/script_v6.cpp
parent5179aef28604c218214f4f27c636d117806fb538 (diff)
downloadscummvm-rg350-9dba239af16413da63dfee4c7fb63d05be53322d.tar.gz
scummvm-rg350-9dba239af16413da63dfee4c7fb63d05be53322d.tar.bz2
scummvm-rg350-9dba239af16413da63dfee4c7fb63d05be53322d.zip
Alignment fix
svn-id: r6918
Diffstat (limited to 'scumm/script_v6.cpp')
-rw-r--r--scumm/script_v6.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp
index 1480db83a5..76cd08582b 100644
--- a/scumm/script_v6.cpp
+++ b/scumm/script_v6.cpp
@@ -423,9 +423,18 @@ void Scumm::writeArray(int array, int idx, int base, int value) {
if (ah->type == 4) {
ah->data[base] = value;
} else if (_features & GF_AFTER_V8) {
+#if defined(SCUMM_NEED_ALIGNMENT)
+ memcpy(&ah->data[base], &TO_LE_32(value), 4);
+#else
((uint32 *)ah->data)[base] = TO_LE_32(value);
+#endif
+
} else {
+#if defined(SCUMM_NEED_ALIGNMENT)
+ memcpy(&ah->data[base], &TO_LE_16(value), 2);
+#else
((uint16 *)ah->data)[base] = TO_LE_16(value);
+#endif
}
}