diff options
author | Torbjörn Andersson | 2009-02-27 05:20:37 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2009-02-27 05:20:37 +0000 |
commit | 349fce7454cf621b4481577d3d11b947d7239339 (patch) | |
tree | 89e54cdef96acc4c0893145aa20b7d315e4d9fae /engines/sword1 | |
parent | c053ef8c87d55d7e534c585c49abe075f27405ad (diff) | |
download | scummvm-rg350-349fce7454cf621b4481577d3d11b947d7239339.tar.gz scummvm-rg350-349fce7454cf621b4481577d3d11b947d7239339.tar.bz2 scummvm-rg350-349fce7454cf621b4481577d3d11b947d7239339.zip |
Committed a slightly updated patch #2602772 ("Patches for BS1 bug ID #1977094")
to replace some missing subtitles with hard-coded ones.
svn-id: r38923
Diffstat (limited to 'engines/sword1')
-rw-r--r-- | engines/sword1/objectman.cpp | 29 | ||||
-rw-r--r-- | engines/sword1/objectman.h | 3 |
2 files changed, 29 insertions, 3 deletions
diff --git a/engines/sword1/objectman.cpp b/engines/sword1/objectman.cpp index 0fff84b6cd..31b13d0e14 100644 --- a/engines/sword1/objectman.cpp +++ b/engines/sword1/objectman.cpp @@ -108,8 +108,13 @@ char *ObjectMan::lockText(uint32 textId) { } uint32 offset = _resMan->readUint32(addr + ((textId & ITM_ID) + 1)* 4); if (offset == 0) { + // Workaround bug for missing sentence in some langages in Syria (see bug #1977094). + // We use the hardcoded text in this case. + if (textId == 2950145) + return const_cast<char*>(_translationId2950145[lang]); + warning("ObjectMan::lockText(%d): text number has no text lines", textId); - return _errorStr; + return _missingSubTitleStr; } return addr + offset; } @@ -161,6 +166,26 @@ void ObjectMan::saveLiveList(uint16 *dest) { memcpy(dest, _liveList, TOTAL_SECTIONS * sizeof(uint16)); } -char ObjectMan::_errorStr[] = "Error: Text not found."; +// String displayed when a subtitle sentence is missing in the cluster file. +// It happens with at least one sentence in Syria in some langages (see bug +// #1977094). +// Note: an empty string or a null pointer causes a crash. + +char ObjectMan::_missingSubTitleStr[] = " "; + +// Missing translation for textId 2950145 (see bug #1977094). +// Currently text is missing for Portuguese languages. (It's possible that it +// is not needed. The English version of the game does not include Portuguese +// so I cannot check.) + +const char *ObjectMan::_translationId2950145[7] = { + "Oh?", // English (not needed) + "Quoi?", // French + "Oh?", // German + "Eh?", // Italian + "\277Eh?", // Spanish + "Ano?", // Czech + " " // Portuguese +}; } // End of namespace Sword1 diff --git a/engines/sword1/objectman.h b/engines/sword1/objectman.h index f0a5f3eb55..fdb26e2e68 100644 --- a/engines/sword1/objectman.h +++ b/engines/sword1/objectman.h @@ -61,7 +61,8 @@ private: static const uint32 _textList[TOTAL_SECTIONS][7]; //a table of pointers to text files uint16 _liveList[TOTAL_SECTIONS]; //which sections are active uint8 *_cptData[TOTAL_SECTIONS]; - static char _errorStr[]; + static char _missingSubTitleStr[]; + static const char *_translationId2950145[7]; //translation for textId 2950145 (missing from cluster file for some langages) }; } // End of namespace Sword1 |