aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2011-08-04 12:33:26 +0100
committerEugene Sandulenko2011-08-06 11:28:30 +0100
commitc451ae639f12fbe77dfde97743037aec72b3199a (patch)
treec587aa864897fcf16068ddc3c9f1778372ad26d2
parentc39245b771e89b1a0ac5b391afca099b1a463f2b (diff)
downloadscummvm-rg350-c451ae639f12fbe77dfde97743037aec72b3199a.tar.gz
scummvm-rg350-c451ae639f12fbe77dfde97743037aec72b3199a.tar.bz2
scummvm-rg350-c451ae639f12fbe77dfde97743037aec72b3199a.zip
SCUMM: Proper fix of Russian subtitles
Initial fix in 11a17b3 (r51211) led to chopped inventory items. No idea why it does not work with our code, as it seems to match the disassembly. Thus implementing this hackish workaround.
-rw-r--r--engines/scumm/string.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp
index 2d2209c155..61bb89328d 100644
--- a/engines/scumm/string.cpp
+++ b/engines/scumm/string.cpp
@@ -1127,8 +1127,6 @@ int ScummEngine::convertMessageToString(const byte *msg, byte *dst, int dstSize)
}
num += (_game.version == 8) ? 4 : 2;
}
- } else if (_game.id == GID_DIG && (chr == 1 || chr == 2 || chr == 3 || chr == 8)) {
- // Skip these characters
} else {
if ((chr != '@') || (_game.id == GID_CMI && _language == Common::ZH_TWN) ||
(_game.id == GID_LOOM && _game.platform == Common::kPlatformPCEngine && _language == Common::JA_JPN) ||
@@ -1142,6 +1140,14 @@ int ScummEngine::convertMessageToString(const byte *msg, byte *dst, int dstSize)
if (dst >= end)
error("convertMessageToString: buffer overflow");
}
+
+ // WORKAROUND: Russian The Dig pads messages with 03. No idea why
+ // it does not work as is with our rendering code, thus fixing it
+ // with a workaround.
+ if (_game.id == GID_DIG) {
+ while (*(dst - 1) == 0x03)
+ dst--;
+ }
*dst = 0;
return dstSize - (end - dst);