[Scummvm-cvs-logs] CVS: scummvm/simon debugger.cpp,1.16,1.17 simon.cpp,1.487,1.488
Max Horn
fingolfin at users.sourceforge.net
Sat Apr 23 06:53:09 CEST 2005
Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6576/simon
Modified Files:
debugger.cpp simon.cpp
Log Message:
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
Index: debugger.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/debugger.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- debugger.cpp 22 Apr 2005 20:04:25 -0000 1.16
+++ debugger.cpp 23 Apr 2005 13:52:27 -0000 1.17
@@ -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 @@
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) {
Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.487
retrieving revision 1.488
diff -u -d -r1.487 -r1.488
--- simon.cpp 7 Apr 2005 12:11:35 -0000 1.487
+++ simon.cpp 23 Apr 2005 13:52:27 -0000 1.488
@@ -695,7 +695,7 @@
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 @@
_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) {
More information about the Scummvm-git-logs
mailing list