diff -ruN scummvm-20090214-orig/engines/sword1/objectman.cpp scummvm-20090214/engines/sword1/objectman.cpp
old
|
new
|
|
108 | 108 | } |
109 | 109 | uint32 offset = _resMan->readUint32(addr + ((textId & ITM_ID) + 1)* 4); |
110 | 110 | if (offset == 0) { |
| 111 | // Workaround bug for missing sentence in some langages in Syria (see bug #1977094). |
| 112 | // We use the hardcoded text in this case. |
| 113 | if (textId == 2950145) |
| 114 | return const_cast<char*>(_translationId2950145[lang]); |
| 115 | |
111 | 116 | warning("ObjectMan::lockText(%d): text number has no text lines", textId); |
112 | | return _errorStr; |
| 117 | return _missingSubTitleStr; |
113 | 118 | } |
114 | 119 | return addr + offset; |
115 | 120 | } |
… |
… |
|
161 | 166 | memcpy(dest, _liveList, TOTAL_SECTIONS * sizeof(uint16)); |
162 | 167 | } |
163 | 168 | |
164 | | char ObjectMan::_errorStr[] = "Error: Text not found."; |
| 169 | // String displayed when a subtitle sentence is missing in the cluster file. |
| 170 | // It happens with at least on sentence in Syria in some langages (see bug #1977094). |
| 171 | // Note: an empty string or a null pointer causes a crash. |
| 172 | char ObjectMan::_missingSubTitleStr[] = " "; |
| 173 | |
| 174 | // Missing translation for textId 2950145 (see bug #1977094). |
| 175 | // Currently text is missing for German, Spanish and Portuguese languages. |
| 176 | const char *ObjectMan::_translationId2950145[7] = |
| 177 | { |
| 178 | "Oh?", // English |
| 179 | "Quoi?", // French |
| 180 | " ", // German <= to replace with german sentence |
| 181 | "Eh?", // Italian |
| 182 | " ", // Spanish <= to replace with spanish sentence |
| 183 | "Ano?", // Czech |
| 184 | " " // Portuguese <= to replace with german sentence |
| 185 | }; |
| 186 | |
165 | 187 | |
166 | 188 | } // End of namespace Sword1 |
diff -ruN scummvm-20090214-orig/engines/sword1/objectman.h scummvm-20090214/engines/sword1/objectman.h
old
|
new
|
|
61 | 61 | static const uint32 _textList[TOTAL_SECTIONS][7]; //a table of pointers to text files |
62 | 62 | uint16 _liveList[TOTAL_SECTIONS]; //which sections are active |
63 | 63 | uint8 *_cptData[TOTAL_SECTIONS]; |
64 | | static char _errorStr[]; |
| 64 | static char _missingSubTitleStr[]; |
| 65 | static const char *_translationId2950145[7]; //translation for textId 2950145 (missing from cluster file for some langages) |
65 | 66 | }; |
66 | 67 | |
67 | 68 | } // End of namespace Sword1 |