diff options
author | Max Horn | 2005-01-08 18:11:29 +0000 |
---|---|---|
committer | Max Horn | 2005-01-08 18:11:29 +0000 |
commit | c257460bc5474da6ce87da2191ed77f4de76a764 (patch) | |
tree | 17fd8e1c19396d143b9776bef45b74de700e5ef0 /graphics/scummfont.cpp | |
parent | 123b4772eff2d5e75709e82f26a2aaa66a71aac8 (diff) | |
download | scummvm-rg350-c257460bc5474da6ce87da2191ed77f4de76a764.tar.gz scummvm-rg350-c257460bc5474da6ce87da2191ed77f4de76a764.tar.bz2 scummvm-rg350-c257460bc5474da6ce87da2191ed77f4de76a764.zip |
Fix bug #1098115 (GUI: Broken console font)
svn-id: r16488
Diffstat (limited to 'graphics/scummfont.cpp')
-rw-r--r-- | graphics/scummfont.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/graphics/scummfont.cpp b/graphics/scummfont.cpp index 32935be6f8..5a004a7b37 100644 --- a/graphics/scummfont.cpp +++ b/graphics/scummfont.cpp @@ -20,7 +20,6 @@ #include "stdafx.h" #include "graphics/font.h" -#include "gui/newgui.h" namespace Graphics { @@ -65,7 +64,6 @@ int ScummFont::getCharWidth(byte chr) const { //void ScummFont::drawChar(byte chr, int xx, int yy, OverlayColor color) { void ScummFont::drawChar(const Surface *dst, byte chr, int tx, int ty, uint32 color) const { assert(dst != 0); - byte *ptr = (byte *)dst->getBasePtr(tx, ty); const byte *tmp = guifont + 6 + guifont[4] + chr * 8; @@ -76,17 +74,15 @@ void ScummFont::drawChar(const Surface *dst, byte chr, int tx, int ty, uint32 co if (ty + y < 0 || ty + y >= dst->h) continue; for (int x = 0; x < 8; x++) { - mask >>= 1; - if (tx + x < 0 || tx + x >= dst->w) continue; - - + unsigned char c; + mask >>= 1; if (mask == 0) { buffer = *tmp++; mask = 0x80; } - const byte c = ((buffer & mask) != 0); + c = ((buffer & mask) != 0); if (c) { if (dst->bytesPerPixel == 1) ptr[x] = color; |