diff options
author | Max Horn | 2008-11-13 11:20:43 +0000 |
---|---|---|
committer | Max Horn | 2008-11-13 11:20:43 +0000 |
commit | eb27307c12e476e7f765050bf002b0a01e5199d2 (patch) | |
tree | 239bd26b4774d1542e2d8af36628fef7b0c71fdf /graphics | |
parent | 8e3485f15876e913ddbb982f36ea089665c08eab (diff) | |
download | scummvm-rg350-eb27307c12e476e7f765050bf002b0a01e5199d2.tar.gz scummvm-rg350-eb27307c12e476e7f765050bf002b0a01e5199d2.tar.bz2 scummvm-rg350-eb27307c12e476e7f765050bf002b0a01e5199d2.zip |
minor tweaks
svn-id: r35036
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/font.cpp | 3 | ||||
-rw-r--r-- | graphics/font.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/graphics/font.cpp b/graphics/font.cpp index 908c79c9a2..34b1b13581 100644 --- a/graphics/font.cpp +++ b/graphics/font.cpp @@ -51,11 +51,12 @@ int NewFont::getCharWidth(byte chr) const { template <typename PixelType> void drawCharIntern(byte *ptr, uint pitch, const bitmap_t *src, int h, int minX, int maxX, const PixelType color) { + const bitmap_t maxXMask = ~((1 << (16-maxX)) - 1); while (h-- > 0) { bitmap_t buffer = READ_UINT16(src); src++; - buffer &= ~((1 << (16-maxX)) - 1); + buffer &= maxXMask; buffer <<= minX; PixelType *tmp = (PixelType *)ptr; while (buffer != 0) { diff --git a/graphics/font.h b/graphics/font.h index 5667fcd8f3..f68a6dd7a6 100644 --- a/graphics/font.h +++ b/graphics/font.h @@ -90,7 +90,7 @@ public: virtual void drawChar(Surface *dst, byte chr, int x, int y, uint32 color) const; }; -typedef unsigned short bitmap_t; /* bitmap image unit size*/ +typedef uint16 bitmap_t; /* bitmap image unit size*/ struct BBX { int8 w; |