aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTravis Howell2007-04-08 11:42:27 +0000
committerTravis Howell2007-04-08 11:42:27 +0000
commit65472233f209b81b44d3d0a50723d27a6a9c9db4 (patch)
treeed71a67f626ce78092365bda1b4e30163c99f971 /engines
parentf38de87e16e1293a184f3fafb946597d41df704e (diff)
downloadscummvm-rg350-65472233f209b81b44d3d0a50723d27a6a9c9db4.tar.gz
scummvm-rg350-65472233f209b81b44d3d0a50723d27a6a9c9db4.tar.bz2
scummvm-rg350-65472233f209b81b44d3d0a50723d27a6a9c9db4.zip
Set SaveGamePath INI setting to '*' in HE72+ games, to avoid warnings about no SaveGamePath path been set in Macintosh versions.
svn-id: r26417
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/he/script_v60he.cpp16
-rw-r--r--engines/scumm/he/script_v72he.cpp32
2 files changed, 22 insertions, 26 deletions
diff --git a/engines/scumm/he/script_v60he.cpp b/engines/scumm/he/script_v60he.cpp
index ba38509d99..c629ab64a1 100644
--- a/engines/scumm/he/script_v60he.cpp
+++ b/engines/scumm/he/script_v60he.cpp
@@ -403,16 +403,12 @@ int ScummEngine_v60he::convertFilePath(byte *dst) {
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 @@ int ScummEngine_v60he::convertFilePath(byte *dst) {
// Strip path
int r = 0;
- if (dst[0] == '.' && dst[1] == '/') {
+ if (dst[0] == '.' && dst[1] == '/') { // Game Data Path
+ r = 2;
+ } else if (dst[0] == '*' && dst[1] == '/') { // Save Game Path (HE72 - HE100)
r = 2;
- } else if (dst[0] == 'c' && dst[1] == ':') {
+ } else if (dst[0] == 'c' && dst[1] == ':') { // Save Game Path (HE60 - HE71)
for (r = len; r != 0; r--) {
if (dst[r - 1] == '/')
break;
diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp
index 2728f93855..2258ea58d6 100644
--- a/engines/scumm/he/script_v72he.cpp
+++ b/engines/scumm/he/script_v72he.cpp
@@ -1049,6 +1049,8 @@ void ScummEngine_v72he::o72_roomOps() {
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 @@ void ScummEngine_v72he::o72_openFile() {
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 @@ void ScummEngine_v72he::o72_deleteFile() {
byte filename[256];
copyScriptString(filename, sizeof(filename));
+
debug(1, "stub o72_deleteFile(%s)", filename);
}
@@ -2108,8 +2103,6 @@ void ScummEngine_v72he::copyArrayHelper(ArrayHeader *ah, int idx2, int idx1, int
void ScummEngine_v72he::o72_readINI() {
byte option[128];
byte *data;
- const char *entry;
- int len;
copyScriptString(option, sizeof(option));
byte subOp = fetchScriptByte();
@@ -2117,7 +2110,9 @@ void ScummEngine_v72he::o72_readINI() {
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"));
@@ -2127,13 +2122,16 @@ void ScummEngine_v72he::o72_readINI() {
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: