diff options
author | Narek Mailian | 2013-07-07 18:58:25 +0200 |
---|---|---|
committer | Narek Mailian | 2013-08-08 08:27:11 +0200 |
commit | ece8b7fb65402238ab7df896361a9cefe28b8897 (patch) | |
tree | 6a5519ae874e7831d44604b1585bd2e86226aa17 | |
parent | 1d40dca7a0446aad81380c7c207461b18b79428d (diff) | |
download | scummvm-rg350-ece8b7fb65402238ab7df896361a9cefe28b8897.tar.gz scummvm-rg350-ece8b7fb65402238ab7df896361a9cefe28b8897.tar.bz2 scummvm-rg350-ece8b7fb65402238ab7df896361a9cefe28b8897.zip |
GRAPHICS: Fix fonts/bdf.cpp to allow for 32bpp to be used
-rw-r--r-- | graphics/fonts/bdf.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/graphics/fonts/bdf.cpp b/graphics/fonts/bdf.cpp index 6d4befa37c..e523a36ad5 100644 --- a/graphics/fonts/bdf.cpp +++ b/graphics/fonts/bdf.cpp @@ -102,7 +102,7 @@ void BdfFont::drawChar(Surface *dst, byte chr, const int tx, const int ty, const // equal to 50 and the decision of the theme designer? // asserting _data.maxAdvance <= 50: let the theme designer decide what looks best assert(_data.maxAdvance <= 50); - assert(dst->format.bytesPerPixel == 1 || dst->format.bytesPerPixel == 2); + assert(dst->format.bytesPerPixel == 1 || dst->format.bytesPerPixel == 2 || dst->format.bytesPerPixel == 4); const int idx = mapToIndex(chr); if (idx < 0) @@ -165,6 +165,8 @@ void BdfFont::drawChar(Surface *dst, byte chr, const int tx, const int ty, const drawCharIntern<byte>(ptr, dst->pitch, src, height, originalWidth, xStart, xEnd, color); else if (dst->format.bytesPerPixel == 2) drawCharIntern<uint16>(ptr, dst->pitch, src, height, originalWidth, xStart, xEnd, color); + else if (dst->format.bytesPerPixel == 4) + drawCharIntern<uint32>(ptr, dst->pitch, src, height, originalWidth, xStart, xEnd, color); } namespace { |