diff options
-rw-r--r-- | engines/scumm/string.cpp | 51 | ||||
-rw-r--r-- | engines/scumm/verbs.cpp | 20 |
2 files changed, 41 insertions, 30 deletions
diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp index baad9b6ff2..c8e7db2ab1 100644 --- a/engines/scumm/string.cpp +++ b/engines/scumm/string.cpp @@ -153,6 +153,17 @@ void ScummEngine_v6::drawBlastTexts() { _charset->_disableOffsX = _charset->_firstChar = true; _charset->setCurID(_blastTextQueue[i].charset); + if (_game.version >= 7 && (_language == Common::HE_ISR || true)) { + byte rev[384] = {0}; + int lens = strlen((const char *)buf); + + for (int l = 0; l < lens; l++) { + rev[l] = buf[lens - l - 1]; + } + rev[lens] = '\0'; + strcpy((char *)buf, (const char *)rev); + } + do { _charset->_left = _blastTextQueue[i].xpos; @@ -238,9 +249,9 @@ void ScummEngine_v7::addSubtitleToQueue(const byte *text, const Common::Point &p SubtitleText *st = &_subtitleQueue[_subtitleQueuePos]; int i = 0; - int len = strlen((const char *)text); + // int len = strlen((const char *)text); while (1) { - st->text[i] = text[len - i - 1]; + st->text[i] = text[i]; // text[len - i - 1]; if (!text[i]) break; ++i; @@ -1484,16 +1495,16 @@ int ScummEngine::convertNameMessage(byte *dst, int dstSize, int var) { if (ptr) { int retval = convertMessageToString(ptr, dst, dstSize); - if (_game.version >= 7 && (_language == Common::HE_ISR || true)) { - byte rev[384] = {0}; - int lens = strlen((const char *)dst); + // if (_game.version >= 7 && (_language == Common::HE_ISR || true)) { + // byte rev[384] = {0}; + // int lens = strlen((const char *)dst); - for (int l = 0; l < lens; l++) { - rev[l] = dst[lens - l - 1]; - } - rev[lens] = '\0'; - strcpy((char *)dst, (const char *)rev); - } + // for (int l = 0; l < lens; l++) { + // rev[l] = dst[lens - l - 1]; + // } + // rev[lens] = '\0'; + // strcpy((char *)dst, (const char *)rev); + // } return retval; } @@ -1525,16 +1536,16 @@ int ScummEngine::convertStringMessage(byte *dst, int dstSize, int var) { if (ptr) { int retval = convertMessageToString(ptr, dst, dstSize); - if (_game.version >= 7 && (_language == Common::HE_ISR || true)) { - byte rev[384] = {0}; - int lens = strlen((const char *)dst); + // if (_game.version >= 7 && (_language == Common::HE_ISR || true)) { + // byte rev[384] = {0}; + // int lens = strlen((const char *)dst); - for (int l = 0; l < lens; l++) { - rev[l] = dst[lens - l - 1]; - } - rev[lens] = '\0'; - strcpy((char *)dst, (const char *)rev); - } + // for (int l = 0; l < lens; l++) { + // rev[l] = dst[lens - l - 1]; + // } + // rev[lens] = '\0'; + // strcpy((char *)dst, (const char *)rev); + // } return retval; } } diff --git a/engines/scumm/verbs.cpp b/engines/scumm/verbs.cpp index 03b39f30a1..7e1809408a 100644 --- a/engines/scumm/verbs.cpp +++ b/engines/scumm/verbs.cpp @@ -1002,7 +1002,7 @@ void ScummEngine_v7::drawVerb(int verb, int mode) { // occur in FT; subtype 10, which is used for the speech associated // with the string). byte buf[384] = {0}; - byte rev[384] = {0}; + // byte rev[384] = {0}; convertMessageToString(msg, buf, sizeof(buf)); msg = buf; @@ -1013,17 +1013,17 @@ void ScummEngine_v7::drawVerb(int verb, int mode) { int oldID = _charset->getCurID(); _charset->setCurID(vs->charset_nr); - // reverse string for rtl support - if ((_language == Common::HE_ISR || true)/* && !(_game.id == GID_FT && (_charset->getCurID() == 6 || _charset->getCurID() == 7))*/) { + // // reverse string for rtl support + // if ((_language == Common::HE_ISR || true)/* && !(_game.id == GID_FT && (_charset->getCurID() == 6 || _charset->getCurID() == 7))*/) { - int lens = strlen((const char *)msg); + // int lens = strlen((const char *)msg); - for (int l = 0; l < lens; l++) { - rev[l] = msg[lens - l - 1]; - } - rev[lens] = '\0'; - msg = rev; - } + // for (int l = 0; l < lens; l++) { + // rev[l] = msg[lens - l - 1]; + // } + // rev[lens] = '\0'; + // msg = rev; + // } // char numt[10] ={0}; // sprintf(numt, "%d, %d\n", _charset->getCurID(), oldID); |