Skip to content

Commit

Permalink
CGE: Use WRITE_LE_UINT16 for unaligned writes.
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzzie authored and dreammaster committed Feb 24, 2012
1 parent eba8745 commit 0509027
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions engines/cge/bitmap.cpp
Expand Up @@ -198,7 +198,7 @@ BitmapPtr Bitmap::code() {
if ((pix == kPixelTransp) != skip || cnt >= 0x3FF0) { // end of block
cnt |= (skip) ? kBmpSKP : kBmpCPY;
if (_v)
*cp = TO_LE_16(cnt); // store block description uint16
WRITE_LE_UINT16(cp, cnt); // store block description uint16

cp = (uint16 *) im;
im += 2;
Expand All @@ -220,7 +220,7 @@ BitmapPtr Bitmap::code() {
} else {
cnt |= kBmpCPY;
if (_v)
*cp = TO_LE_16(cnt);
WRITE_LE_UINT16(cp, cnt);

cp = (uint16 *) im;
im += 2;
Expand All @@ -232,13 +232,13 @@ BitmapPtr Bitmap::code() {
if (cnt && ! skip) {
cnt |= kBmpCPY;
if (_v)
*cp = TO_LE_16(cnt);
WRITE_LE_UINT16(cp, cnt);

cp = (uint16 *) im;
im += 2;
}
if (_v)
*cp = TO_LE_16(kBmpEOI);
WRITE_LE_UINT16(cp, kBmpEOI);
cp = (uint16 *) im;
im += 2;
}
Expand Down

0 comments on commit 0509027

Please sign in to comment.