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 | |
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')
-rw-r--r-- | engines/scumm/smush/smush_font.cpp | 25 | ||||
-rw-r--r-- | engines/scumm/string.cpp | 2 |
2 files changed, 12 insertions, 15 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'); diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp index f50bcac697..8db9cd6da4 100644 --- a/engines/scumm/string.cpp +++ b/engines/scumm/string.cpp @@ -1265,7 +1265,7 @@ int ScummEngine::convertMessageToString(const byte *msg, byte *dst, int dstSize) } else { src = msg; } - + num = 0; while (1) { |