aboutsummaryrefslogtreecommitdiff
path: root/simon/charset.cpp
diff options
context:
space:
mode:
authorNicolas Bacca2004-08-13 06:10:39 +0000
committerNicolas Bacca2004-08-13 06:10:39 +0000
commitc7843dc1a51f8c1417c823b475acaedcc3e9a925 (patch)
treed03c73599cf66f605c9a9c3880ae957b50b80fcb /simon/charset.cpp
parent47c04ea4f72f0c8429b9437828ac0a5934396923 (diff)
downloadscummvm-rg350-c7843dc1a51f8c1417c823b475acaedcc3e9a925.tar.gz
scummvm-rg350-c7843dc1a51f8c1417c823b475acaedcc3e9a925.tar.bz2
scummvm-rg350-c7843dc1a51f8c1417c823b475acaedcc3e9a925.zip
Alignment fix for WinCE (fix bug #934343)
svn-id: r14575
Diffstat (limited to 'simon/charset.cpp')
-rw-r--r--simon/charset.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/simon/charset.cpp b/simon/charset.cpp
index 5cf47802e0..4da8e63c11 100644
--- a/simon/charset.cpp
+++ b/simon/charset.cpp
@@ -79,8 +79,15 @@ void SimonEngine::render_string_amiga(uint vga_sprite_id, uint color, uint width
src += vga_sprite_id * 8;
dst += READ_BE_UINT32(src);
+#ifndef _WIN32_WCE
*(uint16 *)(dst + 4) = TO_BE_16(height);
*(uint16 *)(dst + 6) = TO_BE_16(width);
+#else
+ uint16 data = TO_BE_16(height);
+ memcpy(dst + 4, &data, 2);
+ data = TO_BE_16(width);
+ memcpy(dst + 6, &data, 2);
+#endif
uint charsize = width/8 * height;
memset(dst, 0, count);
@@ -170,8 +177,15 @@ void SimonEngine::render_string(uint vga_sprite_id, uint color, uint width, uint
p = dst + vga_sprite_id * 8;
+#ifndef _WIN32_WCE
*(uint16 *)(p + 4) = TO_BE_16(height);
*(uint16 *)(p + 6) = TO_BE_16(width);
+#else
+ uint16 data = TO_BE_16(height);
+ memcpy(p + 4, &data, 2);
+ data = TO_BE_16(width);
+ memcpy(p + 6, &data, 2);
+#endif
dst += READ_BE_UINT32(p);
memset(dst, 0, count);