[Scummvm-cvs-logs] CVS: scummvm/base engine.cpp,1.10,1.11

Max Horn fingolfin at users.sourceforge.net
Sun Jan 4 06:02:29 CET 2004


Update of /cvsroot/scummvm/scummvm/base
In directory sc8-pr-cvs1:/tmp/cvs-serv2726/base

Modified Files:
	engine.cpp 
Log Message:
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

Index: engine.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/engine.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- engine.cpp	29 Nov 2003 12:10:23 -0000	1.10
+++ engine.cpp	4 Jan 2004 14:00:57 -0000	1.11
@@ -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 @@
 
 	// Set default file directory
 	File::setDefaultDirectory(_gameDataPath);
+
+	g_debugLevel = ConfMan.getInt("debuglevel");
 }
 
 Engine::~Engine() {
@@ -158,8 +162,6 @@
 #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 @@
 #endif
 	va_list va;
 
-	if (level > _debugLevel)
+	if (level > g_debugLevel)
 		return;
 
 	va_start(va, s);





More information about the Scummvm-git-logs mailing list