diff options
author | Max Horn | 2005-01-06 21:15:52 +0000 |
---|---|---|
committer | Max Horn | 2005-01-06 21:15:52 +0000 |
commit | c6e0d31e76134fbdd3a1626aad9ed3e38f25afb3 (patch) | |
tree | 913925590e558d57670e21479d4853e6bb15447c /graphics/scummfont.cpp | |
parent | f3b7c27cbdeb7f1801fa5ed34d2aa0b65454b72f (diff) | |
download | scummvm-rg350-c6e0d31e76134fbdd3a1626aad9ed3e38f25afb3.tar.gz scummvm-rg350-c6e0d31e76134fbdd3a1626aad9ed3e38f25afb3.tar.bz2 scummvm-rg350-c6e0d31e76134fbdd3a1626aad9ed3e38f25afb3.zip |
Added a font manager (work in progress)
svn-id: r16460
Diffstat (limited to 'graphics/scummfont.cpp')
-rw-r--r-- | graphics/scummfont.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/graphics/scummfont.cpp b/graphics/scummfont.cpp index 6c66137e9f..7ec03edcb2 100644 --- a/graphics/scummfont.cpp +++ b/graphics/scummfont.cpp @@ -63,9 +63,8 @@ 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, bool scale) const { +void ScummFont::drawChar(const Surface *dst, byte chr, int tx, int ty, uint32 color, int scaleFactor) const { assert(dst != 0); - const int scaleFactor = scale ? g_gui.getScaleFactor() : 1; tx *= scaleFactor; ty *= scaleFactor; byte *ptr = (byte *)dst->getBasePtr(tx, ty); @@ -85,7 +84,7 @@ void ScummFont::drawChar(const Surface *dst, byte chr, int tx, int ty, uint32 co if (tx + x < 0 || tx + x >= dst->w) continue; - unsigned char c; + if (mask == 0) { if(scaleFactor != 1 && !(y % 2)) @@ -95,7 +94,7 @@ void ScummFont::drawChar(const Surface *dst, byte chr, int tx, int ty, uint32 co mask = 0x80; } - c = ((buffer & mask) != 0); + const byte c = ((buffer & mask) != 0); if (c) { if (dst->bytesPerPixel == 1) ptr[x] = color; @@ -107,8 +106,6 @@ void ScummFont::drawChar(const Surface *dst, byte chr, int tx, int ty, uint32 co } } -const ScummFont g_scummfont; - } // End of namespace Graphics #ifdef __PALM_OS__ |