aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/kfile.cpp
diff options
context:
space:
mode:
authorMatthew Hoops2012-08-26 15:49:45 -0400
committerMatthew Hoops2012-08-26 16:12:25 -0400
commitbb1e60e8b2f3bba06ae3b089097f94ea82a70c8a (patch)
treea434233367725fbb6dc7072776c312f52254d57f /engines/sci/engine/kfile.cpp
parent7a49b3669a0e18210a2f5409cb35da735f549b11 (diff)
parent857b92f8ffececa9c1f990d21a6a8d1630199a62 (diff)
downloadscummvm-rg350-bb1e60e8b2f3bba06ae3b089097f94ea82a70c8a.tar.gz
scummvm-rg350-bb1e60e8b2f3bba06ae3b089097f94ea82a70c8a.tar.bz2
scummvm-rg350-bb1e60e8b2f3bba06ae3b089097f94ea82a70c8a.zip
Merge remote branch 'upstream/master' into pegasus
Conflicts: AUTHORS devtools/credits.pl gui/credits.h
Diffstat (limited to 'engines/sci/engine/kfile.cpp')
-rw-r--r--engines/sci/engine/kfile.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index a21e19802d..f7cc4f44b5 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -197,8 +197,15 @@ reg_t kCD(EngineState *s, int argc, reg_t *argv) {
// TODO: Stub
switch (argv[0].toUint16()) {
case 0:
- // Return whether the contents of disc argv[1] is available.
- return TRUE_REG;
+ if (argc == 1) {
+ // Check if a disc is in the drive
+ return TRUE_REG;
+ } else {
+ // Check if the specified disc is in the drive
+ // and return the current disc number. We just
+ // return the requested disc number.
+ return argv[1];
+ }
case 1:
// Return the current CD number
return make_reg(0, 1);
@@ -688,6 +695,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 +1016,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