diff options
author | Gregory Montoir | 2003-10-17 08:41:31 +0000 |
---|---|---|
committer | Gregory Montoir | 2003-10-17 08:41:31 +0000 |
commit | 6980358f4d9fd38d34f98cc1ff6900416c96863b (patch) | |
tree | 526929655e2730a8f0daefeab828005f9564682a /queen | |
parent | 40b231e6fedd344ee98337749b930c2d68d5463b (diff) | |
download | scummvm-rg350-6980358f4d9fd38d34f98cc1ff6900416c96863b.tar.gz scummvm-rg350-6980358f4d9fd38d34f98cc1ff6900416c96863b.tar.bz2 scummvm-rg350-6980358f4d9fd38d34f98cc1ff6900416c96863b.zip |
fix french characters display (and maybe german and italian too)
svn-id: r10846
Diffstat (limited to 'queen')
-rw-r--r-- | queen/display.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/queen/display.cpp b/queen/display.cpp index 603bb5b0ae..ef3b366fe9 100644 --- a/queen/display.cpp +++ b/queen/display.cpp @@ -46,15 +46,16 @@ void TextRenderer::init() { } charWidth[i] += 2; } - charWidth[(int)' '] = 4; - --charWidth[(int)'^']; + charWidth[(uint8)' '] = 4; + --charWidth[(uint8)'^']; } void TextRenderer::drawString(uint8 *dstBuf, uint16 dstPitch, uint16 x, uint16 y, uint8 color, const char *text, bool outlined) { - while (*text && x < dstPitch) { - const uint8 *pchr = FONT + (*text) * 8; + const uint8 *str = (const uint8*)text; + while (*str && x < dstPitch) { + const uint8 *pchr = FONT + (*str) * 8; // FIXME: handle 0x96 character in french version (replace with 0xFB) @@ -70,8 +71,8 @@ void TextRenderer::drawString(uint8 *dstBuf, uint16 dstPitch, uint16 x, uint16 y } drawChar(dstBuf, dstPitch, x, y, color, pchr); - x += charWidth[ (int)*text ]; - ++text; + x += charWidth[ *str ]; + ++str; } } @@ -409,7 +410,7 @@ uint16 Display::textWidth(const char *text) const { uint16 len = 0; while (*text) { - len += _textRenderer.charWidth[ (int)*text ]; + len += _textRenderer.charWidth[ (uint8)*text ]; ++text; } return len; |