[Scummvm-git-logs] scummvm master -> 63ad8fbbed7465d75eed16f92c01e17febafa21a
csnover
csnover at users.noreply.github.com
Sun Jun 11 03:42:03 CEST 2017
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
d6ff67e3c4 SCI32: Fix detection and loading of localized resources in Torin
63ad8fbbed SCI: Tidy Script errors & ensure script number exists in all of them
Commit: d6ff67e3c465d4a2ab0ab24eb8d95dba6ec83091
https://github.com/scummvm/scummvm/commit/d6ff67e3c465d4a2ab0ab24eb8d95dba6ec83091
Author: Colin Snover (github.com at zetafleet.com)
Date: 2017-06-10T20:32:22-05:00
Commit Message:
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.
Changed paths:
engines/sci/detection.cpp
engines/sci/detection_tables.h
engines/sci/sci.cpp
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index 93157b0..7f84247 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 de03a0e..9187889 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 c7b9bc7..f200bf6 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() {
Commit: 63ad8fbbed7465d75eed16f92c01e17febafa21a
https://github.com/scummvm/scummvm/commit/63ad8fbbed7465d75eed16f92c01e17febafa21a
Author: Colin Snover (github.com at zetafleet.com)
Date: 2017-06-10T20:34:55-05:00
Commit Message:
SCI: Tidy Script errors & ensure script number exists in all of them
Changed paths:
engines/sci/engine/script.cpp
diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp
index 5191c1a..47acad2 100644
--- a/engines/sci/engine/script.cpp
+++ b/engines/sci/engine/script.cpp
@@ -112,9 +112,9 @@ void Script::load(int script_nr, ResourceManager *resMan, ScriptPatcher *scriptP
// As mentioned above, the script and the heap together should not exceed 64KB
if (script->size() + heap->size() > 65535)
- error("Script and heap sizes combined exceed 64K. This means a fundamental "
+ error("Script and heap %d sizes combined exceed 64K. This means a fundamental "
"design bug was made regarding SCI1.1 and newer games.\n"
- "Please report this error to the ScummVM team");
+ "Please report this error to the ScummVM team", script_nr);
} else if (getSciVersion() == SCI_VERSION_3 && script->size() > 0x3FFFF) {
error("Script %d size exceeds 256K (it is %u bytes).\n"
"Please report this error to the ScummVM team", script_nr, script->size());
@@ -218,7 +218,7 @@ void Script::load(int script_nr, ResourceManager *resMan, ScriptPatcher *scriptP
_localsOffset = 0;
if (_localsOffset + _localsCount * 2 + 1 >= (int)_buf->size()) {
- error("Locals extend beyond end of script: offset %04x, count %d vs size %d", _localsOffset, _localsCount, (int)_buf->size());
+ error("Locals extend beyond end of script %d: offset %04x, count %u vs size %u", _nr, _localsOffset, _localsCount, _buf->size());
}
}
@@ -653,7 +653,7 @@ Object *Script::scriptObjInit(reg_t obj_pos, bool fullObjectInit) {
obj_pos.incOffset(8); // magic offset (SCRIPT_OBJECT_MAGIC_OFFSET)
if (obj_pos.getOffset() >= _buf->size())
- error("Attempt to initialize object beyond end of script");
+ error("Attempt to initialize object beyond end of script %d (%u >= %u)", _nr, obj_pos.getOffset(), _buf->size());
// Get the object at the specified position and init it. This will
// automatically "allocate" space for it in the _objects map if necessary.
@@ -744,7 +744,7 @@ const SciSpan<const uint16> Script::getRelocationTableSci0Sci21() const {
}
if (relocationBlock != findBlockSCI0(SCI_OBJ_POINTERS, true)) {
- warning("script.%u has multiple relocation tables", _nr);
+ warning("Script %d has multiple relocation tables", _nr);
}
numEntries = relocationBlock.getUint16SEAt(4);
@@ -783,13 +783,13 @@ const SciSpan<const uint16> Script::getRelocationTableSci0Sci21() const {
dataOffset = 2;
} else {
- error("Invalid engine version called Script::getRelocationTableSci0Sci21");
+ error("Invalid engine version called Script::getRelocationTableSci0Sci21 on script %d", _nr);
}
// This check should work correctly even with SCI1.1+ because the relocation
// table is always at the very end of the heap in these games
if (dataOffset + numEntries * sizeof(uint16) != relocationBlock.size()) {
- warning("script.%u unexpected relocation table size %u", _nr, relocationBlock.size());
+ warning("Script %d unexpected relocation table size %u", _nr, relocationBlock.size());
}
return relocationBlock.subspan<const uint16>(dataOffset, numEntries * sizeof(uint16));
@@ -860,7 +860,7 @@ uint32 Script::validateExportFunc(int pubfunct, bool relocSci3) {
bool exportsAreWide = (g_sci->_features->detectLofsType() == SCI_VERSION_1_MIDDLE);
if (_numExports <= (uint)pubfunct) {
- error("script.%d validateExportFunc(): pubfunct %d is invalid", _nr, pubfunct);
+ error("Script %d validateExportFunc(): pubfunct %d is invalid", _nr, pubfunct);
}
if (exportsAreWide)
@@ -890,7 +890,7 @@ uint32 Script::validateExportFunc(int pubfunct, bool relocSci3) {
}
if (offset == -1 || offset >= (int)_buf->size())
- error("Invalid export %d function pointer (%d) in script.%d", pubfunct, offset, _nr);
+ error("Invalid export %d function pointer (%d) in script %d", pubfunct, offset, _nr);
return offset;
}
@@ -936,8 +936,8 @@ bool Script::isValidOffset(uint32 offset) const {
SegmentRef Script::dereference(reg_t pointer) {
if (pointer.getOffset() > _buf->size()) {
- error("Script::dereference(): Attempt to dereference invalid pointer %04x:%04x into script segment (script size=%u)",
- PRINT_REG(pointer), _buf->size());
+ error("Script::dereference(): Attempt to dereference invalid pointer %04x:%04x into script %d segment (script size=%u)",
+ PRINT_REG(pointer), _nr, _buf->size());
return SegmentRef();
}
@@ -957,7 +957,7 @@ LocalVariables *Script::allocLocalsSegment(SegManager *segMan) {
if (_localsSegment) {
locals = (LocalVariables *)segMan->getSegment(_localsSegment, SEG_TYPE_LOCALS);
if (!locals || locals->getType() != SEG_TYPE_LOCALS || locals->script_id != getScriptNumber())
- error("Invalid script locals segment while allocating locals");
+ error("Invalid script %d locals segment while allocating locals", _nr);
} else
locals = (LocalVariables *)segMan->allocSegment(new LocalVariables(), &_localsSegment);
@@ -1057,7 +1057,7 @@ void Script::initializeClasses(SegManager *segMan) {
}
if (species < 0 || species >= (int)segMan->classTableSize())
- error("Invalid species %d(0x%x) unknown max %d(0x%x) while instantiating script %d\n",
+ error("Invalid species %d(0x%x) unknown max %d(0x%x) while instantiating script %d",
species, species, segMan->classTableSize(), segMan->classTableSize(), _nr);
SegmentId segmentId = segMan->getScriptSegment(_nr);
@@ -1103,7 +1103,7 @@ void Script::initializeObjectsSci0(SegManager *segMan, SegmentId segmentId) {
// contain junk towards its end.
_objects.erase(addr.toUint16() - SCRIPT_OBJECT_MAGIC_OFFSET);
} else {
- error("Failed to locate base object for object at %04X:%04X", PRINT_REG(addr));
+ error("Failed to locate base object for object at %04x:%04x in script %d", PRINT_REG(addr), _nr);
}
}
}
@@ -1253,7 +1253,7 @@ Common::Array<reg_t> Script::listAllOutgoingReferences(reg_t addr) const {
for (uint i = 0; i < obj->getVarCount(); i++)
tmp.push_back(obj->getVariable(i));
} else {
- error("Request for outgoing script-object reference at %04x:%04x failed", PRINT_REG(addr));
+ error("Request for outgoing script-object reference at %04x:%04x failed in script %d", PRINT_REG(addr), _nr);
}
} else {
/* warning("Unexpected request for outgoing script-object references at %04x:%04x", PRINT_REG(addr));*/
More information about the Scummvm-git-logs
mailing list