From 3cf79e079256947c3c0c37046fce10d95f390bc2 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Fri, 17 Jan 2014 04:32:13 +0000 Subject: CGE: Further alignment fixes to Bitmap class. This fixes bug #6476 - "DC: Soltys (CGE) crashes at start up". --- engines/cge/bitmap.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/cge/bitmap.cpp b/engines/cge/bitmap.cpp index 989d2bbe99..5acd111c97 100644 --- a/engines/cge/bitmap.cpp +++ b/engines/cge/bitmap.cpp @@ -72,16 +72,16 @@ Bitmap::Bitmap(CGEEngine *vm, uint16 w, uint16 h, uint8 fill) // + room for wash table assert(v != NULL); - *(uint16 *) v = TO_LE_16(kBmpCPY | dsiz); // data chunk hader + WRITE_LE_UINT16(v, (kBmpCPY | dsiz)); // data chunk hader memset(v + 2, fill, dsiz); // data bytes - *(uint16 *)(v + lsiz - 2) = TO_LE_16(kBmpSKP | ((kScrWidth / 4) - dsiz)); // gap + WRITE_LE_UINT16(v + lsiz - 2, (kBmpSKP | ((kScrWidth / 4) - dsiz))); // gap // Replicate lines byte *destP; for (destP = v + lsiz; destP < (v + psiz); destP += lsiz) Common::copy(v, v + lsiz, destP); - *(uint16 *)(v + psiz - 2) = TO_LE_16(kBmpEOI); // plane trailer uint16 + WRITE_LE_UINT16(v + psiz - 2, kBmpEOI); // plane trailer uint16 // Replicate planes for (destP = v + psiz; destP < (v + 4 * psiz); destP += psiz) -- cgit v1.2.3