aboutsummaryrefslogtreecommitdiff
path: root/simon
diff options
context:
space:
mode:
authorMax Horn2005-04-23 13:52:27 +0000
committerMax Horn2005-04-23 13:52:27 +0000
commit8fddaada1dd6dad2302eb153892257d2020883fc (patch)
tree48f22984e2df39ad352d3306a591bff053e4df3e /simon
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 'simon')
-rw-r--r--simon/debugger.cpp4
-rw-r--r--simon/simon.cpp10
2 files changed, 6 insertions, 8 deletions
diff --git a/simon/debugger.cpp b/simon/debugger.cpp
index 4d1a1b6d64..8e59970a71 100644
--- a/simon/debugger.cpp
+++ b/simon/debugger.cpp
@@ -25,8 +25,6 @@
#include "simon/debugger.h"
#include "simon/simon.h"
-extern int gDebugLevel;
-
namespace Simon {
Debugger::Debugger(SimonEngine *vm)
@@ -89,7 +87,7 @@ bool Debugger::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 && gDebugLevel < 10) {
diff --git a/simon/simon.cpp b/simon/simon.cpp
index 51e89adea4..7455d39b5c 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -695,7 +695,7 @@ int SimonEngine::init(GameDetector &detector) {
warning ("MIDI Player init failed: \"%s\"", midi.getErrorName (ret));
midi.set_volume(ConfMan.getInt("music_volume"));
- _debugMode = ConfMan.hasKey("debuglevel");
+ _debugMode = (gDebugLevel > 0);
if (ConfMan.hasKey("music_mute") && ConfMan.getBool("music_mute") == 1)
midi.pause(_music_paused ^= 1);
@@ -4003,13 +4003,13 @@ int SimonEngine::go() {
_continous_vgascript = false;
_draw_images_debug=false;
- if (ConfMan.getInt("debuglevel") == 2)
+ if (gDebugLevel == 2)
_continous_mainscript = true;
- if (ConfMan.getInt("debuglevel") == 3)
+ if (gDebugLevel == 3)
_continous_vgascript = true;
- if (ConfMan.getInt("debuglevel") == 4)
+ if (gDebugLevel == 4)
_start_mainscript = true;
- if (ConfMan.getInt("debuglevel") == 5)
+ if (gDebugLevel == 5)
_start_vgascript = true;
if (_game & GF_TALKIE) {