diff options
author | Filippos Karapetis | 2007-09-30 01:29:12 +0000 |
---|---|---|
committer | Filippos Karapetis | 2007-09-30 01:29:12 +0000 |
commit | 939948766b1afbd6437eb5d77563eb3362f62c3c (patch) | |
tree | 471f4f7634c22ae172db61de8909c7d51bb46a0f /engines/saga/saga.cpp | |
parent | 7ca277d2525da7a28b8fe6949970ccbbfd28b1f4 (diff) | |
download | scummvm-rg350-939948766b1afbd6437eb5d77563eb3362f62c3c.tar.gz scummvm-rg350-939948766b1afbd6437eb5d77563eb3362f62c3c.tar.bz2 scummvm-rg350-939948766b1afbd6437eb5d77563eb3362f62c3c.zip |
Fixed bug #1804805 - "IHNM: crash/glitch with italian fan patch"
Added the Italian fan translation of IHNM, created a workaround for invalid string data in the Italian fan translation and added some hard coded strings which are changed in the original game executable with the Italian fan translation patch
svn-id: r29134
Diffstat (limited to 'engines/saga/saga.cpp')
-rw-r--r-- | engines/saga/saga.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp index 9601eee44c..df13f36f0a 100644 --- a/engines/saga/saga.cpp +++ b/engines/saga/saga.cpp @@ -343,7 +343,12 @@ void SagaEngine::loadStrings(StringsTable &stringsTable, const byte *stringsPoin break; } if (offset > stringsLength) { - error("SagaEngine::loadStrings wrong strings table"); + // This case should never occur, but apparently it does in the Italian fan + // translation of IHNM + warning("SagaEngine::loadStrings wrong strings table"); + stringsCount = i; + stringsTable.strings = (const char **)realloc(stringsTable.strings, stringsCount * sizeof(*stringsTable.strings)); + break; } stringsTable.strings[i] = (const char *)stringsTable.stringsPointer + offset; debug(9, "string[%i]=%s", i, stringsTable.strings[i]); @@ -384,7 +389,13 @@ const char *SagaEngine::getObjectName(uint16 objectId) { const char *SagaEngine::getTextString(int textStringId) { const char *string; - int lang = (getLanguage() == Common::DE_DEU) ? 1 : 0; + int lang = 0; + + if (getLanguage() == Common::DE_DEU) + lang = 1; + + if (getLanguage() == Common::IT_ITA) + lang = 2; string = ITEinterfaceTextStrings[lang][textStringId]; if (!string) |