diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/scumm/charset.cpp | 11 | ||||
-rw-r--r-- | engines/scumm/string.cpp | 16 |
2 files changed, 25 insertions, 2 deletions
diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp index 3c910bd239..2271bf53a1 100644 --- a/engines/scumm/charset.cpp +++ b/engines/scumm/charset.cpp @@ -371,7 +371,7 @@ int CharsetRenderer::getStringWidth(int arg, const byte *text) { break; } } else { - if (chr == '@') + if (chr == '@' && _vm->_language != Common::ZH_TWN) continue; if (chr == 255 || (_vm->_game.version <= 6 && chr == 254)) { chr = text[pos++]; @@ -397,6 +397,15 @@ int CharsetRenderer::getStringWidth(int arg, const byte *text) { continue; } } + + // Some localizations may override colors + // See credits in Chinese COMI + if (chr == '^' && pos == 1) { + if (text[pos] == 'c') { + pos += 4; + chr = text[pos++]; + } + } } if ((chr & 0x80) && _vm->_useCJKMode) { pos++; diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp index 44e727b5d3..32fdf0e04e 100644 --- a/engines/scumm/string.cpp +++ b/engines/scumm/string.cpp @@ -172,6 +172,20 @@ void ScummEngine_v6::drawBlastTexts() { if (c == 0x0B) continue; + // Some localizations may override colors + // See credits in Chinese COMI + if (c == '^' && (buf == _blastTextQueue[i].text + 1)) { + int color; + switch (*buf) { + case 'c': + color = buf[3] - '0' + 10 *(buf[2] - '0'); + _charset->setColor(color); + + buf += 4; + c = *buf++; + } + } + if (c != 0 && c != 0xFF && c != '\n') { if (c & 0x80 && _useCJKMode) { if (_language == Common::JA_JPN && !checkSJISCode(c)) { @@ -1060,7 +1074,7 @@ int ScummEngine::convertMessageToString(const byte *msg, byte *dst, int dstSize) num += (_game.version == 8) ? 4 : 2; } } else { - if (!(chr == '@' && _game.heversion <= 71)) { + if (!(chr == '@' && _game.heversion <= 71) || _language == Common::ZH_TWN) { *dst++ = chr; } } |