aboutsummaryrefslogtreecommitdiff
path: root/graphics/font.cpp
diff options
context:
space:
mode:
authorMax Horn2008-11-13 11:20:43 +0000
committerMax Horn2008-11-13 11:20:43 +0000
commiteb27307c12e476e7f765050bf002b0a01e5199d2 (patch)
tree239bd26b4774d1542e2d8af36628fef7b0c71fdf /graphics/font.cpp
parent8e3485f15876e913ddbb982f36ea089665c08eab (diff)
downloadscummvm-rg350-eb27307c12e476e7f765050bf002b0a01e5199d2.tar.gz
scummvm-rg350-eb27307c12e476e7f765050bf002b0a01e5199d2.tar.bz2
scummvm-rg350-eb27307c12e476e7f765050bf002b0a01e5199d2.zip
minor tweaks
svn-id: r35036
Diffstat (limited to 'graphics/font.cpp')
-rw-r--r--graphics/font.cpp3
1 files changed, 2 insertions, 1 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) {