aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/engine/kernel_tables.h2
-rw-r--r--engines/sci/engine/kfile.cpp9
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