diff options
author | Filippos Karapetis | 2012-07-04 00:59:55 +0300 |
---|---|---|
committer | Filippos Karapetis | 2012-07-04 01:02:17 +0300 |
commit | e0a3cfd21c607afd0fe9781b5d0a7d8407393d3f (patch) | |
tree | a21a076ca378ce9ce47cc81589808f7885b47d6d /engines/sci/engine | |
parent | 72c59baf247e09c7b40afd1c48221827ef1d64df (diff) | |
download | scummvm-rg350-e0a3cfd21c607afd0fe9781b5d0a7d8407393d3f.tar.gz scummvm-rg350-e0a3cfd21c607afd0fe9781b5d0a7d8407393d3f.tar.bz2 scummvm-rg350-e0a3cfd21c607afd0fe9781b5d0a7d8407393d3f.zip |
SCI: FileIO subop 19 checks for directory validity
This is used in Torin's Passage and LSL7 when autosaving
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kernel_tables.h | 2 | ||||
-rw-r--r-- | engines/sci/engine/kfile.cpp | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/engines/sci/engine/kernel_tables.h b/engines/sci/engine/kernel_tables.h index 322d82ea08..69baa1cf47 100644 --- a/engines/sci/engine/kernel_tables.h +++ b/engines/sci/engine/kernel_tables.h @@ -240,7 +240,7 @@ static const SciKernelMapSubEntry kFileIO_subops[] = { { SIG_SCI32, 16, MAP_CALL(FileIOWriteWord), "ii", NULL }, { SIG_SCI32, 17, MAP_CALL(FileIOCreateSaveSlot), "ir", NULL }, { SIG_SCI32, 18, MAP_EMPTY(FileIOChangeDirectory), "r", NULL }, // for SQ6, when changing the savegame directory in the save/load dialog - { SIG_SCI32, 19, MAP_CALL(Stub), "r", NULL }, // for Torin / Torin demo + { SIG_SCI32, 19, MAP_CALL(FileIOIsValidDirectory), "r", NULL }, // for Torin / Torin demo #endif SCI_SUBOPENTRY_TERMINATOR }; diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index a21e19802d..786276221c 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -688,6 +688,13 @@ reg_t kFileIOCreateSaveSlot(EngineState *s, int argc, reg_t *argv) { return TRUE_REG; // slot creation was successful } +reg_t kFileIOIsValidDirectory(EngineState *s, int argc, reg_t *argv) { + // Used in Torin's Passage and LSL7 to determine if the directory passed as + // a parameter (usually the save directory) is valid. We always return true + // here. + return TRUE_REG; +} + #endif // ---- Save operations ------------------------------------------------------- @@ -1002,7 +1009,7 @@ reg_t kAutoSave(EngineState *s, int argc, reg_t *argv) { // the elapsed time from the timer object) // This function has to return something other than 0 to proceed - return s->r_acc; + return TRUE_REG; } #endif |