aboutsummaryrefslogtreecommitdiff
path: root/scumm/scumm.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2005-09-17 00:24:51 +0000
committerEugene Sandulenko2005-09-17 00:24:51 +0000
commita35366276e8be05bb1a5900e3e62838033685013 (patch)
tree980117b59dc97fcac1e0d014a804152b21a94c85 /scumm/scumm.cpp
parentc01148b098558ae48de85515bbb5fa89ece5513f (diff)
downloadscummvm-rg350-a35366276e8be05bb1a5900e3e62838033685013.tar.gz
scummvm-rg350-a35366276e8be05bb1a5900e3e62838033685013.tar.bz2
scummvm-rg350-a35366276e8be05bb1a5900e3e62838033685013.zip
Make Mac DOTT demo runnable.
svn-id: r18834
Diffstat (limited to 'scumm/scumm.cpp')
-rw-r--r--scumm/scumm.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp
index 6490170cb4..cbcd0f3f82 100644
--- a/scumm/scumm.cpp
+++ b/scumm/scumm.cpp
@@ -825,6 +825,7 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
_features(gs.features),
_platform(gs.platform),
_substResFileNameIndex(substResFileNameIndex),
+ _substResFileNameIndexBundle(0),
gdi(this),
res(this),
_pauseDialog(0), _mainMenuDialog(0), _versionDialog(0),
@@ -917,7 +918,9 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
// The first step is to check whether one of them is present (we do that
// here); the rest is handled by the ScummFile class and code in
// openResourceFile() (and in the Sound class, for MONSTER.SOU handling).
- if (_version >= 6 && _heversion == 0 && _substResFileNameIndex) {
+ if (_version >= 6 && _heversion == 0 && _substResFileNameIndex &&
+ _platform == Common::kPlatformMacintosh &&
+ substResFileNameTable[_substResFileNameIndex].genMethod == kGenAsIs) {
if (_fileHandle->open(substResFileNameTable[_substResFileNameIndex].macName)) {
_containerFile = substResFileNameTable[_substResFileNameIndex].macName;
_substResFileNameIndex = 0;
@@ -2647,8 +2650,11 @@ void ScummEngine::errorString(const char *buf1, char *buf2) {
}
}
-int ScummEngine::generateSubstResFileName(const char *filename, char *buf, int bufsize) {
- return generateSubstResFileName_(filename, buf, bufsize, _substResFileNameIndex);
+int ScummEngine::generateSubstResFileName(const char *filename, char *buf, int bufsize, int index) {
+ if (index == -3)
+ index = _substResFileNameIndex;
+
+ return generateSubstResFileName_(filename, buf, bufsize, index);
}
@@ -3056,8 +3062,11 @@ Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) {
substLastIndex = generateSubstResFileName_(tempName, detectName, sizeof(detectName), substLastIndex + 1);
}
- if (found)
+ if (found) {
+ if (substLastIndex != 0)
+ debug(5, "Generated filename substitute: %s -> %s", tempName, detectName);
break;
+ }
}
// Unable to locate game data