diff options
-rw-r--r-- | engines/scumm/he/script_v72he.cpp | 35 | ||||
-rw-r--r-- | engines/scumm/vars.cpp | 2 |
2 files changed, 16 insertions, 21 deletions
diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp index 3639c1c85a..105ff8cb6b 100644 --- a/engines/scumm/he/script_v72he.cpp +++ b/engines/scumm/he/script_v72he.cpp @@ -529,11 +529,22 @@ void ScummEngine_v72he::readArrayFromIndexFile() { int ScummEngine_v72he::convertFilePath(byte *dst, bool setFilePath) { debug(1, "convertFilePath: original filePath is %s", dst); - // Switch all \ to / for portablity int len = resStrLen(dst) + 1; - for (int i = 0; i < len; i++) { - if (dst[i] == '\\') - dst[i] = '/'; + if (dst[0] == ':') { + // Switch all : to / for portablity + int j = 0; + for (int i = 1; i < len; i++) { + if (dst[i] == ':') + dst[j++] = '/'; + else + dst[j++] = dst[i]; + } + } else { + // Switch all \ to / for portablity + for (int i = 0; i < len; i++) { + if (dst[i] == '\\') + dst[i] = '/'; + } } // Strip path @@ -1748,22 +1759,6 @@ void ScummEngine_v72he::o72_openFile() { debug(1,"Original filename %s", filename); - // There are Macintosh specific versions of HE7.2 games. - if (_game.heversion >= 80 && _game.platform == Common::kPlatformMacintosh) { - // Work around for filename difference in HE7 file, needs to - // open 'Water (7)' instead of 'Water Worries (7)'. - if (_game.id == GID_WATER && _game.heversion == 99 && !strcmp((char *)filename, "Water.he7")) { - strcpy((char *)filename, "Water (7)"); - } else { - char buf1[128]; - buf1[0] = '\0'; - generateSubstResFileName((char *)filename, buf1, sizeof(buf1)); - if (buf1[0]) { - strcpy((char *)filename, buf1); - } - } - } - int r = convertFilePath(filename); debug(1,"Final filename to %s", filename + r); diff --git a/engines/scumm/vars.cpp b/engines/scumm/vars.cpp index 7514d737bc..3b4877decb 100644 --- a/engines/scumm/vars.cpp +++ b/engines/scumm/vars.cpp @@ -622,7 +622,7 @@ void ScummEngine_v72he::initScummVars() { void ScummEngine_v80he::initScummVars() { ScummEngine_v72he::initScummVars(); - VAR(VAR_PLATFORM) = 1; + VAR(VAR_PLATFORM) = (_game.platform == Common::kPlatformMacintosh) ? 2 : 1; VAR(VAR_WINDOWS_VERSION) = 40; VAR(VAR_COLOR_DEPTH) = 256; } |