diff options
author | D G Turner | 2014-01-17 04:32:13 +0000 |
---|---|---|
committer | D G Turner | 2014-01-17 04:32:13 +0000 |
commit | 3cf79e079256947c3c0c37046fce10d95f390bc2 (patch) | |
tree | f6904a88b3b2e2c189cab41fc52806a096d92f8f | |
parent | 9afeafd3fd1b3151c32afd6da2b5f36d3ae9a5a0 (diff) | |
download | scummvm-rg350-3cf79e079256947c3c0c37046fce10d95f390bc2.tar.gz scummvm-rg350-3cf79e079256947c3c0c37046fce10d95f390bc2.tar.bz2 scummvm-rg350-3cf79e079256947c3c0c37046fce10d95f390bc2.zip |
CGE: Further alignment fixes to Bitmap class.
This fixes bug #6476 - "DC: Soltys (CGE) crashes at start up".
-rw-r--r-- | engines/cge/bitmap.cpp | 6 |
1 files 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) |