aboutsummaryrefslogtreecommitdiff
path: root/scumm/string.cpp
diff options
context:
space:
mode:
authorMax Horn2005-04-06 18:57:58 +0000
committerMax Horn2005-04-06 18:57:58 +0000
commitfd6b2050abf3ef97fbd090dfdeb6e49b16f67746 (patch)
treee10eb75f6e42f12029b7594d14bb4997db7898ce /scumm/string.cpp
parent2911c2aeb88e5b8e080502afe336b9a2907c2efc (diff)
downloadscummvm-rg350-fd6b2050abf3ef97fbd090dfdeb6e49b16f67746.tar.gz
scummvm-rg350-fd6b2050abf3ef97fbd090dfdeb6e49b16f67746.tar.bz2
scummvm-rg350-fd6b2050abf3ef97fbd090dfdeb6e49b16f67746.zip
Fix for bug #1172655 (DIG: incorrect subtitles are shown in german version)
svn-id: r17422
Diffstat (limited to 'scumm/string.cpp')
-rw-r--r--scumm/string.cpp38
1 files changed, 33 insertions, 5 deletions
diff --git a/scumm/string.cpp b/scumm/string.cpp
index 5e18119d0a..34f46d98f5 100644
--- a/scumm/string.cpp
+++ b/scumm/string.cpp
@@ -304,8 +304,7 @@ void ScummEngine::CHARSET_1() {
warning("CHARSET_1: invalid code %d", c);
}
} else if (c == 0xFE || c == 0xFF) {
- //WORKAROUND
- //to avoid korean code 0xfe treated as charset message code.
+ // WORKAROUND to avoid korean code 0xfe treated as charset message code.
if(c == 0xFE && checkKSCode(*(buffer + 1), c) && _useCJKMode) {
goto loc_avoid_ks_fe;
}
@@ -974,6 +973,35 @@ void ScummEngine::translateText(const byte *text, byte *trans_buff) {
trans_buff[0] = 0;
_lastStringTag[0] = 0;
+
+ // WORKAROUND for bug #1172655.
+ if (_gameId == GID_DIG && text[0] != '/') {
+ if (!strcmp((const char *)text, "faint light"))
+ text = (const byte *)"/NEW.007/faint light";
+ else if (!strcmp((const char *)text, "glowing crystal"))
+ text = (const byte *)"/NEW.008/glowing crystal";
+ else if (!strcmp((const char *)text, "glowing crystals"))
+ text = (const byte *)"/NEW.009/glowing crystals";
+ else if (!strcmp((const char *)text, "pit"))
+ text = (const byte *)"/NEW.010/pit";
+ else if (!strcmp((const char *)text, "You wish."))
+ text = (const byte *)"/NEW.011/You wish.";
+ else if (!strcmp((const char *)text, "In your dreams."))
+ text = (const byte *)"/NEW.012/In your dreams";
+ else if (!strcmp((const char *)text, "left"))
+ text = (const byte *)"/CATHPLAT.068/left";
+ else if (!strcmp((const char *)text, "right"))
+ text = (const byte *)"/CATHPLAT.070/right";
+ else if (!strcmp((const char *)text, "right"))
+ text = (const byte *)"/CATHPLAT.067/top";
+ else if (!strcmp((const char *)text, "exit"))
+ text = (const byte *)"/SKY.008/exit";
+ else if (!strcmp((const char *)text, "unattached lens"))
+ text = (const byte *)"/NEW.013/unattached lens";
+ else if (!strcmp((const char *)text, "lens slot"))
+ text = (const byte *)"/NEW.014/lens slot";
+ }
+
if (_version >= 7 && text[0] == '/') {
// Extract the string tag from the text: /..../
@@ -985,14 +1013,14 @@ void ScummEngine::translateText(const byte *text, byte *trans_buff) {
// If a language file was loaded, try to find a translated version
// by doing a lookup on the string tag.
if (_existLanguageFile) {
- // HACK: These are used for the object line when
+ // HACK: These are used for the object line in COMI when
// using one object on another. I don't know if the
// text in the language file is a placeholder or if
// we're supposed to use it, but at least in the
// English version things will work so much better if
// we can't find translations for these.
-
- if (strcmp(target.tag, "PU_M001") != 0 && strcmp(target.tag, "PU_M002") != 0)
+
+ if (*text && strcmp(target.tag, "PU_M001") != 0 && strcmp(target.tag, "PU_M002") != 0)
found = (LangIndexNode *)bsearch(&target, _languageIndex, _languageIndexSize, sizeof(LangIndexNode), indexCompare);
}
}