From de6dc08463c199c062181bb0917314bef33bb3b6 Mon Sep 17 00:00:00 2001 From: Nicolas Bacca Date: Fri, 13 Aug 2004 16:40:54 +0000 Subject: Apply Max suggestion :) svn-id: r14585 --- simon/charset.cpp | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/simon/charset.cpp b/simon/charset.cpp index 4da8e63c11..0f8156445b 100644 --- a/simon/charset.cpp +++ b/simon/charset.cpp @@ -79,15 +79,8 @@ 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 + WRITE_BE_UINT16(dst + 4, height); + WRITE_BE_UINT16(dst + 6, width); uint charsize = width/8 * height; memset(dst, 0, count); @@ -177,15 +170,9 @@ 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 + WRITE_BE_UINT16(p + 4, height); + WRITE_BE_UINT16(p + 6, width); + dst += READ_BE_UINT32(p); memset(dst, 0, count); -- cgit v1.2.3