aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorMax Horn2004-01-04 14:00:58 +0000
committerMax Horn2004-01-04 14:00:58 +0000
commitd1e6c6059ef41cc913ae6c80bebde1fdf044e500 (patch)
treefcf0310ea371e6c51a19bb06a8bb783ac8a30a7a /base
parentd16ac3e88f19dbfcad6937be2624f7983a906a5e (diff)
downloadscummvm-rg350-d1e6c6059ef41cc913ae6c80bebde1fdf044e500.tar.gz
scummvm-rg350-d1e6c6059ef41cc913ae6c80bebde1fdf044e500.tar.bz2
scummvm-rg350-d1e6c6059ef41cc913ae6c80bebde1fdf044e500.zip
renamed global var _debugLevel to g_debugLevel; let Engine constructor init it (this way all engines get it for free, allows further cleanup); removed some useless/duplicate member vars in SwordEngine
svn-id: r12134
Diffstat (limited to 'base')
-rw-r--r--base/engine.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/base/engine.cpp b/base/engine.cpp
index e86b9af4ef..d6349c58b3 100644
--- a/base/engine.cpp
+++ b/base/engine.cpp
@@ -32,6 +32,8 @@
/* FIXME - BIG HACK for MidiEmu */
Engine *g_engine = 0;
+uint16 g_debugLevel = 0;
+
Engine::Engine(OSystem *syst)
: _system(syst), _gameDataPath(ConfMan.get("path")) {
g_engine = this;
@@ -41,6 +43,8 @@ Engine::Engine(OSystem *syst)
// Set default file directory
File::setDefaultDirectory(_gameDataPath);
+
+ g_debugLevel = ConfMan.getInt("debuglevel");
}
Engine::~Engine() {
@@ -158,8 +162,6 @@ void CDECL warning(const char *s, ...) {
#endif
}
-uint16 _debugLevel = 0;
-
void CDECL debug(int level, const char *s, ...) {
#ifdef __PALM_OS__
char buf[256]; // 1024 is too big overflow the stack
@@ -168,7 +170,7 @@ void CDECL debug(int level, const char *s, ...) {
#endif
va_list va;
- if (level > _debugLevel)
+ if (level > g_debugLevel)
return;
va_start(va, s);