diff options
author | Max Horn | 2003-04-07 16:04:30 +0000 |
---|---|---|
committer | Max Horn | 2003-04-07 16:04:30 +0000 |
commit | ca7c8081a1c35d90a9f1743fbccf57b4304d96e5 (patch) | |
tree | 22785ca28c7eca3ee8c99f78dab68dca0e927d5a /scumm/string.cpp | |
parent | df9ccab93590894f546e5fee86cad513016bc49e (diff) | |
download | scummvm-rg350-ca7c8081a1c35d90a9f1743fbccf57b4304d96e5.tar.gz scummvm-rg350-ca7c8081a1c35d90a9f1743fbccf57b4304d96e5.tar.bz2 scummvm-rg350-ca7c8081a1c35d90a9f1743fbccf57b4304d96e5.zip |
Patch #712493: CMI: Object line
svn-id: r6930
Diffstat (limited to 'scumm/string.cpp')
-rw-r--r-- | scumm/string.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/scumm/string.cpp b/scumm/string.cpp index a5bc387f3d..7a5369272a 100644 --- a/scumm/string.cpp +++ b/scumm/string.cpp @@ -857,15 +857,22 @@ void Scumm::translateText(byte *text, byte *trans_buff) { if (_gameId == GID_CMI) { if ((text[0] == '/') && (_existLanguageFile == true)) { struct langIndexNode target; - struct langIndexNode *found; + struct langIndexNode *found = NULL; // copy name from text /..../ for (l = 0; (l < 8) && (text[l + 1] != '/'); l++) target.tag[l] = toupper(text[l + 1]); target.tag[l] = 0; - found = (struct langIndexNode *)bsearch(&target, _languageIndex, _languageStrCount, sizeof(struct langIndexNode), indexCompare); + // HACK: These are used for the object line 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) + found = (struct langIndexNode *)bsearch(&target, _languageIndex, _languageStrCount, sizeof(struct langIndexNode), indexCompare); if (found != NULL) { File file; |