aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorFilippos Karapetis2011-10-29 18:31:53 +0300
committerFilippos Karapetis2011-10-29 18:32:52 +0300
commit4f6996777374c8547d918074a8a8d79a961fcee0 (patch)
tree6c5552f6187a397f1ec459fb967653202f3cd2de /engines/sci/engine
parentd87b4d88e0a6e0e815b6721bdf5ac16ff590aa8e (diff)
downloadscummvm-rg350-4f6996777374c8547d918074a8a8d79a961fcee0.tar.gz
scummvm-rg350-4f6996777374c8547d918074a8a8d79a961fcee0.tar.bz2
scummvm-rg350-4f6996777374c8547d918074a8a8d79a961fcee0.zip
SCI: Added a new debug flag, "DebugMode" for SCI32 games
This is used to enable the embedded debugger in several SCI32 games (PQ4, QFG4, GK1, GK2, KQ7, SQ6 and LSL7)
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/kfile.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index 9e9441847d..4d869c3f09 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -22,6 +22,7 @@
#include "common/archive.h"
#include "common/config-manager.h"
+#include "common/debug-channels.h"
#include "common/file.h"
#include "common/str.h"
#include "common/savefile.h"
@@ -1060,6 +1061,18 @@ reg_t kFileIOExists(EngineState *s, int argc, reg_t *argv) {
exists = !saveFileMan->listSavefiles(wrappedName).empty();
}
+ // SCI2+ debug mode
+ if (DebugMan.isDebugChannelEnabled(kDebugLevelDebugMode)) {
+ if (!exists && name == "1.scr") // PQ4
+ exists = true;
+ if (!exists && name == "18.scr") // QFG4
+ exists = true;
+ if (!exists && name == "99.scr") // GK1, KQ7
+ exists = true;
+ if (!exists && name == "classes") // GK2, SQ6, LSL7
+ exists = true;
+ }
+
// Special case for non-English versions of LSL5: The English version of
// LSL5 calls kFileIO(), case K_FILEIO_OPEN for reading to check if
// memory.drv exists (which is where the game's password is stored). If