aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTravis Howell2006-03-12 09:27:56 +0000
committerTravis Howell2006-03-12 09:27:56 +0000
commit66730f3b6b8394d487308681b3115abb98c1716e (patch)
treee5dd97e0b1d1c246b33e9fee27ca43855c37e0ae /engines
parent8602fe7432f709fe84fc64fd6ec840a2c3888e7e (diff)
downloadscummvm-rg350-66730f3b6b8394d487308681b3115abb98c1716e.tar.gz
scummvm-rg350-66730f3b6b8394d487308681b3115abb98c1716e.tar.bz2
scummvm-rg350-66730f3b6b8394d487308681b3115abb98c1716e.zip
Use script support for Macintosh versions of HE80+ games
svn-id: r21227
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/he/script_v72he.cpp35
-rw-r--r--engines/scumm/vars.cpp2
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;
}