aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
Diffstat (limited to 'scumm')
-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
}
}