diff options
| author | Einar Johan Trøan Sømåen | 2012-07-18 13:01:17 +0200 |
|---|---|---|
| committer | Einar Johan Trøan Sømåen | 2012-07-18 13:01:17 +0200 |
| commit | 2cac6deb94186820de6cbabd6ceb058c8fc4e092 (patch) | |
| tree | 8e2d23f274081f7721177d8419904bd3527c3984 | |
| parent | 9a37c9805fb93ea6ef49b2af28eee80c1d281882 (diff) | |
| download | scummvm-rg350-2cac6deb94186820de6cbabd6ceb058c8fc4e092.tar.gz scummvm-rg350-2cac6deb94186820de6cbabd6ceb058c8fc4e092.tar.bz2 scummvm-rg350-2cac6deb94186820de6cbabd6ceb058c8fc4e092.zip | |
WINTERMUTE: Select PixelFormat for BFonTT depending on if we actually have a TTF, or a fallback.
| -rw-r--r-- | engines/wintermute/Base/font/BFontTT.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/wintermute/Base/font/BFontTT.cpp b/engines/wintermute/Base/font/BFontTT.cpp index bf59007e0e..c87a5b4a5f 100644 --- a/engines/wintermute/Base/font/BFontTT.cpp +++ b/engines/wintermute/Base/font/BFontTT.cpp @@ -260,8 +260,10 @@ CBSurface *CBFontTT::renderTextToTexture(const WideString &text, int width, TTex warning("%s %d %d %d %d", text.c_str(), RGBCOLGetR(_layers[0]->_color), RGBCOLGetG(_layers[0]->_color), RGBCOLGetB(_layers[0]->_color), RGBCOLGetA(_layers[0]->_color));
// void drawString(Surface *dst, const Common::String &str, int x, int y, int w, uint32 color, TextAlign align = kTextAlignLeft, int deltax = 0, bool useEllipsis = true) const;
Graphics::Surface *surface = new Graphics::Surface();
- surface->create((uint16)width, (uint16)(_lineHeight * lines.size()), Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0));
-
+ if (_deletableFont) // We actually have a TTF
+ surface->create((uint16)width, (uint16)(_lineHeight * lines.size()), Graphics::PixelFormat(4, 8, 8, 8, 8, 24, 16, 8, 0));
+ else // We are using a fallback, they can't do 32bpp
+ surface->create((uint16)width, (uint16)(_lineHeight * lines.size()), Graphics::PixelFormat(2, 5, 5, 5, 1, 11, 6, 1, 0));
uint32 useColor = 0xffffffff;
Common::Array<Common::String>::iterator it;
int heightOffset = 0;
|
