diff options
author | Johannes Schickel | 2009-09-20 12:44:35 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-09-20 12:44:35 +0000 |
commit | 59f72d111f4455fe9309980fed240619537344f8 (patch) | |
tree | 2282e0b72ac754ebbd3a0ec7f7654e5544cee11c | |
parent | 81bb484f01adaa586bd45d8c55b5e9d2c0a3a1a4 (diff) | |
download | scummvm-rg350-59f72d111f4455fe9309980fed240619537344f8.tar.gz scummvm-rg350-59f72d111f4455fe9309980fed240619537344f8.tar.bz2 scummvm-rg350-59f72d111f4455fe9309980fed240619537344f8.zip |
Add checks for half-width katakana, which are currently unsupported.
svn-id: r44204
-rw-r--r-- | engines/kyra/screen.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index 6542b15183..67f5aff5cb 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -1203,15 +1203,23 @@ void Screen::printText(const char *str, int x, int y, uint8 color1, uint8 color2 break; } - if (c <= 0x7F || !_useSJIS) { + if (!_useSJIS) { drawCharANSI(c, x, y); charHeight = charHeightFnt; } else { - c = READ_LE_UINT16(str - 1); - ++str; - charWidth = getCharWidth(c); - charHeight = _sjisFont->getFontHeight() >> 1; - drawCharSJIS(c, x, y); + if (c <= 0x7F) { + // draw ANSI chars through the setup font + drawCharANSI(c, x, y); + charHeight = charHeightFnt; + } else if (c >= 0xA1 && c <= 0xDF) { + warning("Use of unsupported half-width katakana %.2X", c); + } else { + c = READ_LE_UINT16(str - 1); + ++str; + charWidth = getCharWidth(c); + charHeight = _sjisFont->getFontHeight() >> 1; + drawCharSJIS(c, x, y); + } } x += charWidth; |