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.
This commit is contained in:
Eugene Sandulenko 2011-08-04 12:33:26 +01:00
parent c39245b771
commit c451ae639f

View File

@ -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);