mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-12 12:09:15 +00:00
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)
This commit is contained in:
parent
d87b4d88e0
commit
4f69967773
@ -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
|
||||
|
@ -114,6 +114,7 @@ SciEngine::SciEngine(OSystem *syst, const ADGameDescription *desc, SciGameId gam
|
||||
DebugMan.addDebugChannel(kDebugLevelGC, "GC", "Garbage Collector debugging");
|
||||
DebugMan.addDebugChannel(kDebugLevelResMan, "ResMan", "Resource manager debugging");
|
||||
DebugMan.addDebugChannel(kDebugLevelOnStartup, "OnStartup", "Enter debugger at start of game");
|
||||
DebugMan.addDebugChannel(kDebugLevelDebugMode, "DebugMode", "Enable game debug mode at start of game");
|
||||
|
||||
const Common::FSNode gameDataDir(ConfMan.get("path"));
|
||||
|
||||
|
@ -102,7 +102,8 @@ enum kDebugLevels {
|
||||
kDebugLevelScripts = 1 << 17,
|
||||
kDebugLevelGC = 1 << 18,
|
||||
kDebugLevelResMan = 1 << 19,
|
||||
kDebugLevelOnStartup = 1 << 20
|
||||
kDebugLevelOnStartup = 1 << 20,
|
||||
kDebugLevelDebugMode = 1 << 21
|
||||
};
|
||||
|
||||
enum SciGameId {
|
||||
|
Loading…
Reference in New Issue
Block a user