[Scummvm-cvs-logs] SF.net SVN: scummvm: [21227] scummvm/trunk/engines/scumm
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Sun Mar 12 01:29:01 CET 2006
Revision: 21227
Author: kirben
Date: 2006-03-12 01:27:56 -0800 (Sun, 12 Mar 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=21227&view=rev
Log Message:
-----------
Use script support for Macintosh versions of HE80+ games
Modified Paths:
--------------
scummvm/trunk/engines/scumm/he/script_v72he.cpp
scummvm/trunk/engines/scumm/vars.cpp
Modified: scummvm/trunk/engines/scumm/he/script_v72he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/script_v72he.cpp 2006-03-12 06:24:15 UTC (rev 21226)
+++ scummvm/trunk/engines/scumm/he/script_v72he.cpp 2006-03-12 09:27:56 UTC (rev 21227)
@@ -529,11 +529,22 @@
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 @@
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);
Modified: scummvm/trunk/engines/scumm/vars.cpp
===================================================================
--- scummvm/trunk/engines/scumm/vars.cpp 2006-03-12 06:24:15 UTC (rev 21226)
+++ scummvm/trunk/engines/scumm/vars.cpp 2006-03-12 09:27:56 UTC (rev 21227)
@@ -622,7 +622,7 @@
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;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list