aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/debugger.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2006-02-14 23:31:25 +0000
committerJohannes Schickel2006-02-14 23:31:25 +0000
commit0bea9cf47b027ad8936751f48779046ca0a48bf9 (patch)
tree3a1f55143f6aefa46367c93ecb97523d87c2c439 /engines/kyra/debugger.cpp
parentfc3cdbe5a9ff5feb4c765410d89b378fbf9daf68 (diff)
downloadscummvm-rg350-0bea9cf47b027ad8936751f48779046ca0a48bf9.tar.gz
scummvm-rg350-0bea9cf47b027ad8936751f48779046ca0a48bf9.tar.bz2
scummvm-rg350-0bea9cf47b027ad8936751f48779046ca0a48bf9.zip
Made the kyra debug extensions more generic, i.e. scumm engine could replace
their debugC calls now with the new introduced debugC calls. (A mail how to use it will follow shortly on -devel) Also now these special engine debug flags can be specified from the commandline. Also made the -c & --config parameter check more secure. svn-id: r20695
Diffstat (limited to 'engines/kyra/debugger.cpp')
-rw-r--r--engines/kyra/debugger.cpp59
1 files changed, 0 insertions, 59 deletions
diff --git a/engines/kyra/debugger.cpp b/engines/kyra/debugger.cpp
index 24b51976ee..7497a8f7aa 100644
--- a/engines/kyra/debugger.cpp
+++ b/engines/kyra/debugger.cpp
@@ -45,7 +45,6 @@ Debugger::Debugger(KyraEngine *vm)
DCmd_Register("timers", &Debugger::cmd_listTimers);
DCmd_Register("settimercountdown", &Debugger::cmd_setTimerCountdown);
DCmd_Register("give", &Debugger::cmd_giveItem);
- DCmd_Register("toggle_debug", &Debugger::cmd_toggleDebug);
}
void Debugger::preEnter() {
@@ -204,62 +203,4 @@ bool Debugger::cmd_giveItem(int argc, const char **argv) {
return true;
}
-
-bool Debugger::cmd_toggleDebug(int argc, const char **argv) {
- if (argc < 2) {
- DebugPrintf("Syntax: toggle_debug <level>\n");
- DebugPrintf("Where level is one of:\n");
- DebugPrintf("ScriptFuncs, Script, Sprites, Screen, Sound, Animator, Main, GUI, Sequence, Movie\n");
- DebugPrintf("or: EALL for enabling all and DALL for disabling all\n");
- return true;
- }
-
- struct ArgList {
- const char* param;
- int level;
- };
-
- static const ArgList argList[] = {
- { "ScriptFuncs", kDebugLevelScriptFuncs },
- { "Script", kDebugLevelScript },
- { "Sprites", kDebugLevelSprites },
- { "Screen", kDebugLevelScreen },
- { "Sound", kDebugLevelSound },
- { "Animator", kDebugLevelAnimator },
- { "Main", kDebugLevelMain },
- { "GUI", kDebugLevelGUI },
- { "Sequence", kDebugLevelSequence },
- { "Movie", kDebugLevelMovie },
- { 0, 0 },
- };
-
- for (int i = 0; argList[i].param != 0; ++i) {
- if (!scumm_stricmp(argList[i].param, argv[1])) {
- if (!(_vm->debugLevels() & argList[i].level)) {
- _vm->enableDebugLevel(argList[i].level);
- DebugPrintf("Enabled debug level: '%s'\n", argList[i].param);
- } else {
- _vm->disableDebugLevel(argList[i].level);
- DebugPrintf("Disabled debug level: '%s'\n", argList[i].param);
- }
- return true;
- }
- }
-
- if (!scumm_stricmp("EALL", argv[1])) {
- for (int i = 0; argList[i].param != 0; ++i) {
- _vm->enableDebugLevel(argList[i].level);
- }
- DebugPrintf("Enabled all debug levels!\n");
- } else if (!scumm_stricmp("DALL", argv[1])) {
- for (int i = 0; argList[i].param != 0; ++i) {
- _vm->disableDebugLevel(argList[i].level);
- }
- DebugPrintf("Disabled all debug levels!\n");
- } else {
- DebugPrintf("Unknown debug level: '%s'\n", argv[1]);
- }
-
- return true;
-}
} // End of namespace Kyra