diff options
Diffstat (limited to 'graphics/fonts')
-rw-r--r-- | graphics/fonts/scummfont.cpp | 4 | ||||
-rw-r--r-- | graphics/fonts/winfont.cpp | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/graphics/fonts/scummfont.cpp b/graphics/fonts/scummfont.cpp index ea1935cea5..3331b72c47 100644 --- a/graphics/fonts/scummfont.cpp +++ b/graphics/fonts/scummfont.cpp @@ -303,9 +303,9 @@ void ScummFont::drawChar(Surface *dst, byte chr, int tx, int ty, uint32 color) c } c = ((buffer & mask) != 0); if (c) { - if (dst->bytesPerPixel == 1) + if (dst->format.bytesPerPixel == 1) ptr[x] = color; - else if (dst->bytesPerPixel == 2) + else if (dst->format.bytesPerPixel == 2) ((uint16 *)ptr)[x] = color; } } diff --git a/graphics/fonts/winfont.cpp b/graphics/fonts/winfont.cpp index 18866b4f6f..7db9a233f6 100644 --- a/graphics/fonts/winfont.cpp +++ b/graphics/fonts/winfont.cpp @@ -323,7 +323,7 @@ bool WinFont::loadFromFNT(Common::SeekableReadStream &stream) { void WinFont::drawChar(Surface *dst, byte chr, int x, int y, uint32 color) const { assert(dst); - assert(dst->bytesPerPixel == 1 || dst->bytesPerPixel == 2 || dst->bytesPerPixel == 4); + assert(dst->format.bytesPerPixel == 1 || dst->format.bytesPerPixel == 2 || dst->format.bytesPerPixel == 4); assert(_glyphs); GlyphEntry &glyph = _glyphs[characterToIndex(chr)]; @@ -331,11 +331,11 @@ void WinFont::drawChar(Surface *dst, byte chr, int x, int y, uint32 color) const for (uint16 i = 0; i < _pixHeight; i++) { for (uint16 j = 0; j < glyph.charWidth; j++) { if (glyph.bitmap[j + i * glyph.charWidth]) { - if (dst->bytesPerPixel == 1) + if (dst->format.bytesPerPixel == 1) *((byte *)dst->getBasePtr(x + j, y + i)) = color; - else if (dst->bytesPerPixel == 2) + else if (dst->format.bytesPerPixel == 2) *((uint16 *)dst->getBasePtr(x + j, y + i)) = color; - else if (dst->bytesPerPixel == 4) + else if (dst->format.bytesPerPixel == 4) *((uint32 *)dst->getBasePtr(x + j, y + i)) = color; } } |