aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
authorMax Horn2005-04-23 13:52:27 +0000
committerMax Horn2005-04-23 13:52:27 +0000
commit8fddaada1dd6dad2302eb153892257d2020883fc (patch)
tree48f22984e2df39ad352d3306a591bff053e4df3e /scumm
parente70c98fa22c193dd5077a21729771aa440edd106 (diff)
downloadscummvm-rg350-8fddaada1dd6dad2302eb153892257d2020883fc.tar.gz
scummvm-rg350-8fddaada1dd6dad2302eb153892257d2020883fc.tar.bz2
scummvm-rg350-8fddaada1dd6dad2302eb153892257d2020883fc.zip
Simplified debuglevel handling:
- it's only honored in the global level of the config file - all checks for it go through gDebugLevel now, which is made global - the '-d' switch is handled in a slightly saner and consistent way - removed 'debuglevel' from the config format documentation; we do not want to encourage the avarage user to use it svn-id: r17769
Diffstat (limited to 'scumm')
-rw-r--r--scumm/debugger.cpp4
-rw-r--r--scumm/scumm.cpp2
2 files changed, 2 insertions, 4 deletions
diff --git a/scumm/debugger.cpp b/scumm/debugger.cpp
index a26d78e7da..11d85d5e3f 100644
--- a/scumm/debugger.cpp
+++ b/scumm/debugger.cpp
@@ -37,8 +37,6 @@
#include "common/debugger.cpp"
-extern int gDebugLevel;
-
namespace Scumm {
void CDECL debugC(int channel, const char *s, ...) {
@@ -595,7 +593,7 @@ bool ScummDebugger::Cmd_DebugLevel(int argc, const char **argv) {
if (_vm->_debugMode == false)
DebugPrintf("Debugging is not enabled at this time\n");
else
- DebugPrintf("Debugging is currently set at level %d\n", ConfMan.getInt("debuglevel"));
+ DebugPrintf("Debugging is currently set at level %d\n", gDebugLevel);
} else { // set level
gDebugLevel = atoi(argv[1]);
if (gDebugLevel > 0) {
diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp
index 93ff181070..ec1d47e0db 100644
--- a/scumm/scumm.cpp
+++ b/scumm/scumm.cpp
@@ -1058,7 +1058,7 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
g_scumm = this;
// Read settings from the detector & config manager
- _debugMode = ConfMan.hasKey("debuglevel");
+ _debugMode = (gDebugLevel > 0);
_dumpScripts = detector->_dumpScripts;
_bootParam = ConfMan.getInt("boot_param");