aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Snover2017-05-18 19:12:48 -0500
committerColin Snover2017-06-10 20:32:22 -0500
commitd6ff67e3c465d4a2ab0ab24eb8d95dba6ec83091 (patch)
tree0efc3045f1db4fa5e6d439dea0d5d521a7b87056
parent43440193f02078c4b4b014ded366d06655a53ae5 (diff)
downloadscummvm-rg350-d6ff67e3c465d4a2ab0ab24eb8d95dba6ec83091.tar.gz
scummvm-rg350-d6ff67e3c465d4a2ab0ab24eb8d95dba6ec83091.tar.bz2
scummvm-rg350-d6ff67e3c465d4a2ab0ab24eb8d95dba6ec83091.zip
SCI32: Fix detection and loading of localized resources in Torin
Italian still needs to be fixed, but nobody seems to have access to this version at the moment. Fixes Trac#9772.
-rw-r--r--engines/sci/detection.cpp13
-rw-r--r--engines/sci/detection_tables.h76
-rw-r--r--engines/sci/sci.cpp22
3 files changed, 91 insertions, 20 deletions
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index 93157b04c1..7f8424787b 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -506,10 +506,23 @@ static ADGameDescription s_fallbackDesc = {
static char s_fallbackGameIdBuf[256];
+static const char *directoryGlobs[] = {
+ "english",
+ "french",
+ "german",
+ "italian",
+ "msg",
+ "spanish",
+ 0
+};
+
class SciMetaEngine : public AdvancedMetaEngine {
public:
SciMetaEngine() : AdvancedMetaEngine(Sci::SciGameDescriptions, sizeof(ADGameDescription), s_sciGameTitles, optionsList) {
_singleId = "sci";
+ _maxScanDepth = 3;
+ _directoryGlobs = directoryGlobs;
+ _matchFullPaths = true;
}
virtual const char *getName() const {
diff --git a/engines/sci/detection_tables.h b/engines/sci/detection_tables.h
index de03a0e803..9187889793 100644
--- a/engines/sci/detection_tables.h
+++ b/engines/sci/detection_tables.h
@@ -4747,64 +4747,100 @@ static const struct ADGameDescription SciGameDescriptions[] = {
AD_LISTEND},
Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO | ADGF_TESTING | ADGF_CD, GUIO_TORIN_DEMO },
- // Torin's Passage (Multilingual) - English Windows CD
+ // Torin's Passage - Multilingual EN/FR/DE w/ English audio Windows CD
+ // Also matches GOG.com English-only release
+ // Also matches Spanish and Italian CD releases
// SCI interpreter version 2.100.002
{"torin", "", {
+ // Duplicate resmap is intentional; it gives the English version equal
+ // priority to localized versions that are detected with an additional
+ // file
+ {"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799},
{"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799},
{"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887},
AD_LISTEND},
Common::EN_ANY, Common::kPlatformWindows, ADGF_TESTING | ADGF_CD, GUIO_TORIN },
- // Torin's Passage (Multilingual) - Spanish Windows CD (from jvprat)
- // Executable scanning reports "2.100.002", VERSION file reports "1.0"
{"torin", "", {
{"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799},
{"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887},
- // TODO: depend on one of the patches?
+ {"french/msg/0.msg", 0, "cbf314308636380a96f20a76f2a26ce5", 5857},
AD_LISTEND},
- Common::ES_ESP, Common::kPlatformWindows, ADGF_TESTING | ADGF_CD, GUIO_TORIN },
+ Common::FR_FRA, Common::kPlatformWindows, ADGF_TESTING | ADGF_CD, GUIO_TORIN },
- // Torin's Passage (Multilingual) - French Windows CD
- // SCI interpreter version 2.100.002
{"torin", "", {
{"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799},
{"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887},
+ {"german/msg/0.msg", 0, "374ce3a7e540e1f4917d132f74f356b8", 5993},
AD_LISTEND},
- Common::FR_FRA, Common::kPlatformWindows, ADGF_TESTING | ADGF_CD, GUIO_TORIN },
+ Common::DE_DEU, Common::kPlatformWindows, ADGF_TESTING | ADGF_CD, GUIO_TORIN },
- // Torin's Passage - German Windows CD (from m_kiewitz)
+ // from jvprat and m_kiewitz
+ {"torin", "", {
+ {"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799},
+ {"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887},
+ {"spanish/msg/0.msg", 0, "3c468ee0a8595d64d93df68054b116d7", 5681},
+ AD_LISTEND},
+ Common::ES_ESP, Common::kPlatformWindows, ADGF_TESTING | ADGF_CD, GUIO_TORIN },
+
+ // from glorifindel
+ // TODO: Need to get ahold of italian/msg/0.msg from an Italian release
+// {"torin", "", {
+// {"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799},
+// {"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887},
+// // {"italian/msg/0.msg", 0, ?, ?},
+// AD_LISTEND},
+// Common::IT_ITA, Common::kPlatformWindows, ADGF_TESTING | ADGF_CD, GUIO_TORIN },
+
+ // ---
+
+ // Torin's Passage - Multilingual EN/FR/DE w/ German audio Windows CD (from m_kiewitz)
// SCI interpreter version 2.100.002
// VERSION file "1.0"
{"torin", "", {
{"resmap.000", 0, "e55c3097329b3c53752301e01c6af2fb", 9787},
{"ressci.000", 0, "118f9bec04bfe17c4f87bbb5ddb43c18", 56127540},
AD_LISTEND},
- Common::DE_DEU, Common::kPlatformWindows, ADGF_TESTING | ADGF_CD, GUIO_TORIN },
+ Common::EN_ANY, Common::kPlatformWindows, ADGF_TESTING | ADGF_CD, GUIO_TORIN },
- // Torin's Passage (Multilingual) - German Windows CD
- // SCI interpreter version 2.100.002
{"torin", "", {
- {"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799},
- {"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887},
+ {"resmap.000", 0, "e55c3097329b3c53752301e01c6af2fb", 9787},
+ {"ressci.000", 0, "118f9bec04bfe17c4f87bbb5ddb43c18", 56127540},
+ AD_LISTEND},
+ Common::FR_FRA, Common::kPlatformWindows, ADGF_TESTING | ADGF_CD, GUIO_TORIN },
+
+ {"torin", "", {
+ {"resmap.000", 0, "e55c3097329b3c53752301e01c6af2fb", 9787},
+ {"ressci.000", 0, "118f9bec04bfe17c4f87bbb5ddb43c18", 56127540},
AD_LISTEND},
Common::DE_DEU, Common::kPlatformWindows, ADGF_TESTING | ADGF_CD, GUIO_TORIN },
- // Torin's Passage (Multilingual) - Italian Windows CD (from glorifindel)
+ // ---
+
+ // Torin's Passage - Multilingual EN/FR/DE w/ French audio Windows CD (from LePhilousophe)
// SCI interpreter version 2.100.002
+ // NOTE: This version of Torin has an ITALIAN directory, but it contains
+ // English language data, not Italian
{"torin", "", {
- {"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799},
- {"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887},
+ {"resmap.000", 0, "66ed46e3e56f487e688d52f05b33d0ba", 9787},
+ {"ressci.000", 0, "118f9bec04bfe17c4f87bbb5ddb43c18", 56126981},
AD_LISTEND},
- Common::IT_ITA, Common::kPlatformWindows, ADGF_TESTING | ADGF_CD, GUIO_TORIN },
+ Common::EN_ANY, Common::kPlatformWindows, ADGF_TESTING | ADGF_CD, GUIO_TORIN },
- // Torin's Passage - French Windows (from LePhilousophe)
- // SCI interpreter version 2.100.002
{"torin", "", {
{"resmap.000", 0, "66ed46e3e56f487e688d52f05b33d0ba", 9787},
{"ressci.000", 0, "118f9bec04bfe17c4f87bbb5ddb43c18", 56126981},
AD_LISTEND},
Common::FR_FRA, Common::kPlatformWindows, ADGF_TESTING | ADGF_CD, GUIO_TORIN },
+ {"torin", "", {
+ {"resmap.000", 0, "66ed46e3e56f487e688d52f05b33d0ba", 9787},
+ {"ressci.000", 0, "118f9bec04bfe17c4f87bbb5ddb43c18", 56126981},
+ AD_LISTEND},
+ Common::DE_DEU, Common::kPlatformWindows, ADGF_TESTING | ADGF_CD, GUIO_TORIN },
+
+ // ---
+
// Torin's Passage - Russian Windows CD (SoftClub official translate)
// SCI interpreter version 2.100.002
// VERSION file "1.0"
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index c7b9bc7995..f200bf64a4 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -169,6 +169,28 @@ SciEngine::SciEngine(OSystem *syst, const ADGameDescription *desc, SciGameId gam
// Some releases (e.g. Pointsoft Torin) use a different patch directory name
SearchMan.addSubDirectoryMatching(gameDataDir, "patch"); // resource patches
+
+ switch (desc->language) {
+ case Common::DE_DEU:
+ SearchMan.addSubDirectoryMatching(gameDataDir, "german/msg");
+ break;
+ case Common::EN_ANY:
+ case Common::EN_GRB:
+ case Common::EN_USA:
+ SearchMan.addSubDirectoryMatching(gameDataDir, "english/msg");
+ break;
+ case Common::ES_ESP:
+ SearchMan.addSubDirectoryMatching(gameDataDir, "spanish/msg");
+ break;
+ case Common::FR_FRA:
+ SearchMan.addSubDirectoryMatching(gameDataDir, "french/msg");
+ break;
+ case Common::IT_ITA:
+ SearchMan.addSubDirectoryMatching(gameDataDir, "italian/msg");
+ break;
+ default:
+ break;
+ }
}
SciEngine::~SciEngine() {