[Scummvm-cvs-logs] SF.net SVN: scummvm: [26417] scummvm/trunk/engines/scumm/he
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Sun Apr 8 13:42:29 CEST 2007
Revision: 26417
http://scummvm.svn.sourceforge.net/scummvm/?rev=26417&view=rev
Author: kirben
Date: 2007-04-08 04:42:27 -0700 (Sun, 08 Apr 2007)
Log Message:
-----------
Set SaveGamePath INI setting to '*' in HE72+ games, to avoid warnings about no SaveGamePath path been set in Macintosh versions.
Modified Paths:
--------------
scummvm/trunk/engines/scumm/he/script_v60he.cpp
scummvm/trunk/engines/scumm/he/script_v72he.cpp
Modified: scummvm/trunk/engines/scumm/he/script_v60he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/script_v60he.cpp 2007-04-08 01:16:13 UTC (rev 26416)
+++ scummvm/trunk/engines/scumm/he/script_v60he.cpp 2007-04-08 11:42:27 UTC (rev 26417)
@@ -403,16 +403,12 @@
debug(1, "convertFilePath: original filePath is %s", dst);
int len = resStrLen(dst);
- if (dst[0] == ':') {
+ if (_game.platform == Common::kPlatformMacintosh) {
// Switch all : to / for portablity
- int j = 0;
- for (int i = 1; i < len; i++) {
+ for (int i = 0; i < len; i++) {
if (dst[i] == ':')
- dst[j++] = '/';
- else
- dst[j++] = dst[i];
+ dst[i] = '/';
}
- dst[j] = 0;
} else {
// Switch all \ to / for portablity
for (int i = 0; i < len; i++) {
@@ -423,9 +419,11 @@
// Strip path
int r = 0;
- if (dst[0] == '.' && dst[1] == '/') {
+ if (dst[0] == '.' && dst[1] == '/') { // Game Data Path
r = 2;
- } else if (dst[0] == 'c' && dst[1] == ':') {
+ } else if (dst[0] == '*' && dst[1] == '/') { // Save Game Path (HE72 - HE100)
+ r = 2;
+ } else if (dst[0] == 'c' && dst[1] == ':') { // Save Game Path (HE60 - HE71)
for (r = len; r != 0; r--) {
if (dst[r - 1] == '/')
break;
Modified: scummvm/trunk/engines/scumm/he/script_v72he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/script_v72he.cpp 2007-04-08 01:16:13 UTC (rev 26416)
+++ scummvm/trunk/engines/scumm/he/script_v72he.cpp 2007-04-08 11:42:27 UTC (rev 26417)
@@ -1049,6 +1049,8 @@
case 221:
copyScriptString(filename, sizeof(filename));
+ debug(1, "o72_roomOps: case 221: filename %s", filename);
+
_saveLoadFlag = pop();
_saveLoadSlot = 1;
_saveTemporaryState = true;
@@ -1721,14 +1723,6 @@
const char *filename = (char *)buffer + convertFilePath(buffer);
debug(1, "Final filename to %s", filename);
- // Work around for lost, to avoid debug code been triggered.
- // The 'TEST.FYL' file is always deleted after been created
- // but we currently don't support deleting files.
- if (!strcmp(filename, "TEST.FYL")) {
- push(-1);
- return;
- }
-
slot = -1;
for (i = 1; i < 17; i++) {
if (_hInFileTable[i] == 0 && _hOutFileTable[i] == 0) {
@@ -1870,6 +1864,7 @@
byte filename[256];
copyScriptString(filename, sizeof(filename));
+
debug(1, "stub o72_deleteFile(%s)", filename);
}
@@ -2108,8 +2103,6 @@
void ScummEngine_v72he::o72_readINI() {
byte option[128];
byte *data;
- const char *entry;
- int len;
copyScriptString(option, sizeof(option));
byte subOp = fetchScriptByte();
@@ -2117,8 +2110,10 @@
switch (subOp) {
case 43: // HE 100
case 6: // number
- if (!strcmp((char *)option, "NoPrinting")) {
+ if (!strcmp((char *)option, "NoFontsInstalled")) {
push(1);
+ } else if (!strcmp((char *)option, "NoPrinting")) {
+ push(1);
} else if (!strcmp((char *)option, "TextOn")) {
push(ConfMan.getBool("subtitles"));
} else {
@@ -2127,13 +2122,16 @@
break;
case 77: // HE 100
case 7: // string
- entry = (ConfMan.get((char *)option).c_str());
-
writeVar(0, 0);
- len = resStrLen((const byte *)entry);
- data = defineArray(0, kStringArray, 0, 0, 0, len);
- memcpy(data, entry, len);
-
+ if (!strcmp((char *)option, "SaveGamePath")) {
+ data = defineArray(0, kStringArray, 0, 0, 0, 1);
+ memcpy(data, (const char *)"*", 1);
+ } else {
+ const char *entry = (ConfMan.get((char *)option).c_str());
+ int len = resStrLen((const byte *)entry);
+ data = defineArray(0, kStringArray, 0, 0, 0, len);
+ memcpy(data, entry, len);
+ }
push(readVar(0));
break;
default:
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