aboutsummaryrefslogtreecommitdiff
path: root/graphics/font.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2011-04-17 17:30:44 +0200
committerJohannes Schickel2011-04-17 20:58:08 +0200
commit3fd919060ca6bbf896680f3548bfaac020900d42 (patch)
treeb8d96772e727cb8932c54987d296a4baf93fe087 /graphics/font.cpp
parent41586398abb45c6e0551da729471c4215299d131 (diff)
downloadscummvm-rg350-3fd919060ca6bbf896680f3548bfaac020900d42.tar.gz
scummvm-rg350-3fd919060ca6bbf896680f3548bfaac020900d42.tar.bz2
scummvm-rg350-3fd919060ca6bbf896680f3548bfaac020900d42.zip
GRPAHICS: Do not access Surface::bytesPerPixel anymore.
Diffstat (limited to 'graphics/font.cpp')
-rw-r--r--graphics/font.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/graphics/font.cpp b/graphics/font.cpp
index 359374436c..6a03c486ae 100644
--- a/graphics/font.cpp
+++ b/graphics/font.cpp
@@ -74,7 +74,7 @@ void NewFont::drawChar(Surface *dst, byte chr, const int tx, const int ty, const
assert(dst != 0);
assert(desc.bits != 0 && desc.maxwidth <= 16);
- assert(dst->bytesPerPixel == 1 || dst->bytesPerPixel == 2);
+ assert(dst->format.bytesPerPixel == 1 || dst->format.bytesPerPixel == 2);
// If this character is not included in the font, use the default char.
if (chr < desc.firstchar || chr >= desc.firstchar + desc.size) {
@@ -106,9 +106,9 @@ void NewFont::drawChar(Surface *dst, byte chr, const int tx, const int ty, const
tmp += bbh - y;
y -= MAX(0, ty + desc.ascent - bby - dst->h);
- if (dst->bytesPerPixel == 1)
+ if (dst->format.bytesPerPixel == 1)
drawCharIntern<byte>(ptr, dst->pitch, tmp, y, MAX(0, -(tx + bbx)), MIN(bbw, dst->w - tx - bbx), color);
- else if (dst->bytesPerPixel == 2)
+ else if (dst->format.bytesPerPixel == 2)
drawCharIntern<uint16>(ptr, dst->pitch, tmp, y, MAX(0, -(tx + bbx)), MIN(bbw, dst->w - tx - bbx), color);
}