diff options
-rw-r--r-- | scumm/script_v6he.cpp | 19 | ||||
-rw-r--r-- | scumm/script_v72he.cpp | 2 |
2 files changed, 14 insertions, 7 deletions
diff --git a/scumm/script_v6he.cpp b/scumm/script_v6he.cpp index 28f0523e90..960524fd0a 100644 --- a/scumm/script_v6he.cpp +++ b/scumm/script_v6he.cpp @@ -24,6 +24,7 @@ #include "stdafx.h" #include "common/config-manager.h" +#include "common/savefile.h" #include "scumm/actor.h" #include "scumm/charset.h" @@ -1028,12 +1029,18 @@ void ScummEngine_v60he::o60_openFile() { } if (slot != -1) { - if (mode == 1) - _hFileTable[slot].open((char*)filename + r, File::kFileReadMode); - else if (mode == 2) - _hFileTable[slot].open((char*)filename + r, File::kFileWriteMode); - else - error("o60_openFile(): wrong open file mode"); + switch(mode) { + case 1: + _hFileTable[slot].open((char*)filename + r, File::kFileReadMode, _saveFileMan->getSavePath()); + if (_hFileTable[slot].isOpen() == false) + _hFileTable[slot].open((char*)filename + r, File::kFileReadMode); + break; + case 2: + _hFileTable[slot].open((char*)filename + r, File::kFileWriteMode, _saveFileMan->getSavePath()); + break; + default: + error("o60_openFile(): wrong open file mode %d", mode); + } if (_hFileTable[slot].isOpen() == false) slot = -1; diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp index 81be2616b2..36cf34b030 100644 --- a/scumm/script_v72he.cpp +++ b/scumm/script_v72he.cpp @@ -24,6 +24,7 @@ #include "stdafx.h" #include "common/config-manager.h" +#include "common/savefile.h" #include "common/system.h" #include "scumm/actor.h" @@ -32,7 +33,6 @@ #include "scumm/object.h" #include "scumm/resource.h" #include "scumm/resource_v7he.h" -#include "common/savefile.h" #include "scumm/scumm.h" #include "scumm/sound.h" #include "scumm/verbs.h" |