aboutsummaryrefslogtreecommitdiff
path: root/engines/saga
diff options
context:
space:
mode:
authorFilippos Karapetis2007-09-30 01:29:12 +0000
committerFilippos Karapetis2007-09-30 01:29:12 +0000
commit939948766b1afbd6437eb5d77563eb3362f62c3c (patch)
tree471f4f7634c22ae172db61de8909c7d51bb46a0f /engines/saga
parent7ca277d2525da7a28b8fe6949970ccbbfd28b1f4 (diff)
downloadscummvm-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')
-rw-r--r--engines/saga/detection_tables.h38
-rw-r--r--engines/saga/itedata.cpp22
-rw-r--r--engines/saga/saga.cpp15
-rw-r--r--engines/saga/saga.h3
4 files changed, 74 insertions, 4 deletions
diff --git a/engines/saga/detection_tables.h b/engines/saga/detection_tables.h
index 5bb408e947..981bf816ac 100644
--- a/engines/saga/detection_tables.h
+++ b/engines/saga/detection_tables.h
@@ -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 }
};
diff --git a/engines/saga/itedata.cpp b/engines/saga/itedata.cpp
index 60082561e2..ca4ff61606 100644
--- a/engines/saga/itedata.cpp
+++ b/engines/saga/itedata.cpp
@@ -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] = {
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)
diff --git a/engines/saga/saga.h b/engines/saga/saga.h
index 7a8b30b068..0879d15a0d 100644
--- a/engines/saga/saga.h
+++ b/engines/saga/saga.h
@@ -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 {