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
This commit is contained in:
Filippos Karapetis 2007-09-30 01:29:12 +00:00
parent 7ca277d252
commit 939948766b
4 changed files with 74 additions and 4 deletions

View File

@ -809,6 +809,44 @@ static const SAGAGameDescription gameDescriptions[] = {
0,
NULL,
},
// I Have No Mouth And I Must Scream - Italian fan CD translation
{
{
"ihnm",
"",
{
{"musicfm.res", GAME_MUSICFILE_FM, "0439083e3dfdc51b486071d45872ae52", -1},
{"musicgm.res", GAME_MUSICFILE_GM, "80f875a1fb384160d1f4b27166eef583", -1},
{"scream.res", GAME_RESOURCEFILE, "46bbdc65d164ba7e89836a0935eec8e6", -1},
{"patch.re_", GAME_PATCHFILE | GAME_RESOURCEFILE, "58b79e61594779513c7f2d35509fa89e", -1},
{"scripts.res", GAME_SCRIPTFILE, "be38bbc5a26be809dbf39f13befebd01", -1},
{"sfx.res", GAME_SOUNDFILE, "1c610d543f32ec8b525e3f652536f269", -1},
//{"voicess.res", GAME_VOICEFILE, "9df7cd3b18ddaa16b5291b3432567036", -1}, //order of voice bank file is important
//{"voices1.res", GAME_VOICEFILE, "d6100d2dc3b2b9f2e1ad247f613dce9b", -1},
//{"voices2.res", GAME_VOICEFILE, "84f6f48ecc2832841ea6417a9a379430", -1},
//{"voices3.res", GAME_VOICEFILE, "ebb9501283047f27a0f54e27b3c8ba1e", -1},
//{"voices4.res", GAME_VOICEFILE, "4c145da5fa6d1306162a7ca8ce5a4f2e", -1},
//{"voices5.res", GAME_VOICEFILE, "871a559644281917677eca4af1b05620", -1},
//{"voices6.res", GAME_VOICEFILE, "211be5c24f066d69a2f6cfa953acfba6", -1},
{ NULL, 0, NULL, 0}
},
Common::IT_ITA,
Common::kPlatformPC,
Common::ADGF_NO_FLAGS
},
GType_IHNM,
GID_IHNM_CD_ITA,
0,
IHNM_DEFAULT_SCENE,
&IHNM_Resources,
ARRAYSIZE(IHNMCD_GameFonts),
IHNMCD_GameFonts,
&IHNM_GameSound,
&IHNM_GameSound,
0,
NULL,
},
{ AD_TABLE_END_MARKER, 0, 0, 0, 0, NULL, 0, NULL, NULL, NULL, 0, NULL }
};

View File

@ -375,7 +375,27 @@ const char *ITEinterfaceTextStrings[][52] = {
"Ich wei$ nicht, wie ich das machen soll.",
"Text zeigen",
"Wie lautet die Antwort?"
}
},
// Italian fan translation of IHNM
{
"Walk to", "Look At", "Pick Up", "Talk to", "Open",
"Close", "Use", "Give", "Options", "Test",
"Demo", "Help", "Quit Game", "Fast", "Slow",
"On", "Off", "Continue Playing", "Load", "Save",
"Game Options", "Reading Speed", "Music", "Sound", "Cancel",
"Quit", "OK", "Mid", "Click", "10%",
"20%", "30%", "40%", "50%", "60%",
"70%", "80%", "90%", "Max", "Uscire?",
"Load Successful!", "Nome del salvataggio", "Dai %s a %s", "Usa %s con %s",
"[New Save Game]",
"I can't pick that up.",
"I see nothing special about it.",
"There's no place to open it.",
"There's no opening to close.",
"I don't know how to do that.",
"Show Dialog",
"What is Rif's reply?"
},
};
Point pieceOrigins[PUZZLE_PIECES] = {

View File

@ -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)

View File

@ -139,7 +139,8 @@ enum GameIds {
GID_IHNM_CD_DE, // reported by mld. German retail
GID_IHNM_CD_ES,
GID_IHNM_CD_RU,
GID_IHNM_CD_FR
GID_IHNM_CD_FR,
GID_IHNM_CD_ITA
};
enum GameFileTypes {