diff options
author | BLooperZ | 2019-08-17 20:28:57 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2020-01-01 00:31:21 +0100 |
commit | 8bcdaa6e455fd164f5fa3b8e230251eea7456016 (patch) | |
tree | a045857ddba89df62f793e16b1558ccd4d840609 /engines/scumm/smush | |
parent | 0625518e9f8ba094ddf90ae55a7bae3d236c0882 (diff) | |
download | scummvm-rg350-8bcdaa6e455fd164f5fa3b8e230251eea7456016.tar.gz scummvm-rg350-8bcdaa6e455fd164f5fa3b8e230251eea7456016.tar.bz2 scummvm-rg350-8bcdaa6e455fd164f5fa3b8e230251eea7456016.zip |
SCUMM: minimize changes required for rtl
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'); |