diff options
author | Johannes Schickel | 2011-05-01 16:54:45 +0200 |
---|---|---|
committer | Johannes Schickel | 2011-05-01 16:54:45 +0200 |
commit | 71bdb86e028db9556611f88b3686ce93312a8131 (patch) | |
tree | 3c24233044a8e72bd8ecd73b981f50c725d5d282 /graphics/font.cpp | |
parent | 89b63e3adb4692c9659f8b133727ccc1e2af75b4 (diff) | |
parent | 8ff527ac4ef4237e63c0802a22eb0f942089e6c4 (diff) | |
download | scummvm-rg350-71bdb86e028db9556611f88b3686ce93312a8131.tar.gz scummvm-rg350-71bdb86e028db9556611f88b3686ce93312a8131.tar.bz2 scummvm-rg350-71bdb86e028db9556611f88b3686ce93312a8131.zip |
Merge pull request #16 "Add a PixelFormat to Graphics::Surface.".
For further discussion check here:
https://github.com/scummvm/scummvm/pull/16
Conflicts:
graphics/png.cpp
Diffstat (limited to 'graphics/font.cpp')
-rw-r--r-- | graphics/font.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/graphics/font.cpp b/graphics/font.cpp index 9d450e881c..7fa39d07db 100644 --- a/graphics/font.cpp +++ b/graphics/font.cpp @@ -78,7 +78,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) { @@ -110,9 +110,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); } |