aboutsummaryrefslogtreecommitdiff
path: root/simon
diff options
context:
space:
mode:
authorMax Horn2004-12-25 19:04:18 +0000
committerMax Horn2004-12-25 19:04:18 +0000
commitd6872dba6b6b4c4dafbd411bf4b0651b7d01edce (patch)
tree6ca2a72c16b2b298d89e708ddd049d2f9f352c17 /simon
parent2941d595bd18d9a64e33b20658e007709db9afda (diff)
downloadscummvm-rg350-d6872dba6b6b4c4dafbd411bf4b0651b7d01edce.tar.gz
scummvm-rg350-d6872dba6b6b4c4dafbd411bf4b0651b7d01edce.tar.bz2
scummvm-rg350-d6872dba6b6b4c4dafbd411bf4b0651b7d01edce.zip
Get rid of g_debugLevel (this fixes bug #1091142)
svn-id: r16318
Diffstat (limited to 'simon')
-rw-r--r--simon/debugger.cpp7
-rw-r--r--simon/simon.cpp10
2 files changed, 7 insertions, 10 deletions
diff --git a/simon/debugger.cpp b/simon/debugger.cpp
index 57b373e1db..d498daf171 100644
--- a/simon/debugger.cpp
+++ b/simon/debugger.cpp
@@ -20,12 +20,11 @@
*/
#include "stdafx.h"
+#include "common/config-manager.h"
#include "common/debugger.cpp"
#include "simon/debugger.h"
#include "simon/simon.h"
-extern uint16 g_debugLevel;
-
namespace Simon {
Debugger::Debugger(SimonEngine *vm)
@@ -88,10 +87,10 @@ 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", g_debugLevel);
+ DebugPrintf("Debugging is currently set at level %d\n", ConfMan.getInt("debuglevel"));
} else { // set level
int level = atoi(argv[1]);
- g_debugLevel = level;
+ ConfMan.set("debuglevel", level, Common::ConfigManager::kTransientDomain);
if (level > 0 && level < 10) {
_vm->_debugMode = true;
DebugPrintf("Debug level set to level %d\n", level);
diff --git a/simon/simon.cpp b/simon/simon.cpp
index 58cc7b9103..61feee10ba 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -45,8 +45,6 @@
#include "globals.h"
#endif
-extern uint16 g_debugLevel;
-
struct SimonGameSettings {
const char *name;
const char *description;
@@ -4004,13 +4002,13 @@ int SimonEngine::go() {
_continous_vgascript = false;
_draw_images_debug=false;
- if (g_debugLevel == 2)
+ if (ConfMan.getInt("debuglevel") == 2)
_continous_mainscript = true;
- if (g_debugLevel == 3)
+ if (ConfMan.getInt("debuglevel") == 3)
_continous_vgascript = true;
- if (g_debugLevel == 4)
+ if (ConfMan.getInt("debuglevel") == 4)
_start_mainscript = true;
- if (g_debugLevel == 5)
+ if (ConfMan.getInt("debuglevel") == 5)
_start_vgascript = true;
if (_game & GF_TALKIE) {