From 4ff0c2619b87658c762eac19afe85ac01530c5c1 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 23 Aug 2009 14:51:04 +0000 Subject: Fix Moonbase Commander startup. svn-id: r43670 --- engines/scumm/he/script_v100he.cpp | 1 + engines/scumm/he/script_v72he.cpp | 12 ++++++------ engines/scumm/vars.cpp | 1 + 3 files changed, 8 insertions(+), 6 deletions(-) (limited to 'engines/scumm') diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp index 49e490a8ec..29f611a58f 100644 --- a/engines/scumm/he/script_v100he.cpp +++ b/engines/scumm/he/script_v100he.cpp @@ -629,6 +629,7 @@ void ScummEngine_v100he::o100_arrayOps() { } break; case 132: + debug(0, "o100_arrayOps: case 132"); // TODO: Used by Moonbase Commander fetchScriptWord(); fetchScriptWord(); diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp index 0c2c01d419..3dd70a09c9 100644 --- a/engines/scumm/he/script_v72he.cpp +++ b/engines/scumm/he/script_v72he.cpp @@ -1398,11 +1398,6 @@ void ScummEngine_v72he::o72_openFile() { copyScriptString(buffer, sizeof(buffer)); debug(1, "Original filename %s", buffer); - // HACK: INI filename seems to get reset, corruption elsewhere? - if (_game.id == GID_MOONBASE && buffer[0] == 0) { - strcpy((char *)buffer, "moonbase.ini"); - } - const char *filename = (char *)buffer + convertFilePath(buffer, sizeof(buffer)); debug(1, "Final filename to %s", filename); @@ -1823,7 +1818,12 @@ void ScummEngine_v72he::o72_readINI() { case 77: // HE 100 case 7: // string writeVar(0, 0); - if (!strcmp((char *)option, "SaveGamePath")) { + if (!strcmp((char *)option, "HE3File")) { + Common::String fileName = generateFilename(-3); + int len = resStrLen((const byte *)fileName.c_str()); + data = defineArray(0, kStringArray, 0, 0, 0, len); + memcpy(data, fileName.c_str(), len); + } else if (!strcmp((char *)option, "SaveGamePath")) { // We set SaveGamePath in order to detect where it used // in convertFilePath and to avoid warning about invalid // path in Macintosh verisons. diff --git a/engines/scumm/vars.cpp b/engines/scumm/vars.cpp index 98e088365e..69da7f3e09 100644 --- a/engines/scumm/vars.cpp +++ b/engines/scumm/vars.cpp @@ -312,6 +312,7 @@ void ScummEngine_v80he::setupScummVars() { void ScummEngine_v90he::setupScummVars() { ScummEngine_v80he::setupScummVars(); + VAR_TIMER = 97; VAR_SCRIPT_CYCLE = 103; VAR_NUM_SCRIPT_CYCLES = 104; -- cgit v1.2.3