aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorEugene Sandulenko2007-07-22 22:59:08 +0000
committerEugene Sandulenko2007-07-22 22:59:08 +0000
commitb6eedda8858eca9926619fec03dd3075ed4fa7ac (patch)
treec13f1c7e454aaf1ec521fab9522319ae6429867f /engines/scumm
parent8c21abc990c3130b2e76bb33b8642a74ce145574 (diff)
downloadscummvm-rg350-b6eedda8858eca9926619fec03dd3075ed4fa7ac.tar.gz
scummvm-rg350-b6eedda8858eca9926619fec03dd3075ed4fa7ac.tar.bz2
scummvm-rg350-b6eedda8858eca9926619fec03dd3075ed4fa7ac.zip
- Fix wrong languages in Chinese COMI
- Fix credits rendering in Chinese COMI svn-id: r28167
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/charset.cpp11
-rw-r--r--engines/scumm/string.cpp16
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;
}
}