diff options
Diffstat (limited to 'engines/scumm/smush')
-rw-r--r-- | engines/scumm/smush/smush_font.cpp | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/engines/scumm/smush/smush_font.cpp b/engines/scumm/smush/smush_font.cpp index bad1b02d37..de9a183bce 100644 --- a/engines/scumm/smush/smush_font.cpp +++ b/engines/scumm/smush/smush_font.cpp @@ -191,16 +191,19 @@ void SmushFont::drawSubstring(const char *str, byte *buffer, int dst_width, int // to have to check for it. if (x < 0) x = 0; - - //for (int i = 0; str[i] != 0; i++) { - int len = strlen(str); - for (int i = len; i >= 0; i--) { - if ((byte)str[i] >= 0x80 && _vm->_useCJKMode) { - x += draw2byte(buffer, dst_width, x, y, (byte)str[i] + 256 * (byte)str[i+1]); - i++; - } else + if (_vm->_language == Common::HE_ISR || true) { + for (int i = strlen(str); i >= 0; i--) { x += drawChar(buffer, dst_width, x, y, str[i]); + } + } else { + for (int i = 0; str[i] != 0; i++) { + if ((byte)str[i] >= 0x80 && _vm->_useCJKMode) { + x += draw2byte(buffer, dst_width, x, y, (byte)str[i] + 256 * (byte)str[i+1]); + i++; + } else + x += drawChar(buffer, dst_width, x, y, str[i]); + } } } @@ -210,12 +213,6 @@ void SmushFont::drawSubstring(const char *str, byte *buffer, int dst_width, int void SmushFont::drawString(const char *str, byte *buffer, int dst_width, int dst_height, int x, int y, bool center) { debugC(DEBUG_SMUSH, "SmushFont::drawString(%s, %d, %d, %d)", str, x, y, center); - - //char rev[384] = {0}; - //int len = strlen(str); - //for (int l = 0; l < len; l++) { - // rev[l] = str[len - l - 1]; - //} while (str) { char line[256]; const char *pos = strchr(str, '\n'); |