aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMax Horn2009-01-30 04:52:53 +0000
committerMax Horn2009-01-30 04:52:53 +0000
commit76deee02d6b2638cd04be6cfb50aaf217b6252ee (patch)
tree2662abc9deec308936693cbf7b95c19b30039b9c /common
parentde7c89e38143ccac34e5228d5591a2738f27a661 (diff)
downloadscummvm-rg350-76deee02d6b2638cd04be6cfb50aaf217b6252ee.tar.gz
scummvm-rg350-76deee02d6b2638cd04be6cfb50aaf217b6252ee.tar.bz2
scummvm-rg350-76deee02d6b2638cd04be6cfb50aaf217b6252ee.zip
Some more 'special debug levels' tweaks
svn-id: r36140
Diffstat (limited to 'common')
-rw-r--r--common/debug.cpp19
-rw-r--r--common/debug.h17
2 files changed, 5 insertions, 31 deletions
diff --git a/common/debug.cpp b/common/debug.cpp
index af3e6d8018..1c232c0662 100644
--- a/common/debug.cpp
+++ b/common/debug.cpp
@@ -57,8 +57,8 @@ namespace Common {
namespace {
-SpecialDebugLevelList gDebugLevels;
-uint32 gDebugLevelsEnabled = 0;
+static SpecialDebugLevelList gDebugLevels;
+static uint32 gDebugLevelsEnabled = 0;
struct DebugLevelSort {
bool operator()(const SpecialDebugLevel &l, const SpecialDebugLevel &r) {
@@ -110,17 +110,6 @@ bool enableSpecialDebugLevel(const String &name) {
}
}
-void enableSpecialDebugLevelList(const String &names) {
- StringTokenizer tokenizer(names, " ,");
- String token;
-
- while (!tokenizer.empty()) {
- token = tokenizer.nextToken();
- if (!enableSpecialDebugLevel(token))
- warning("Engine does not support debug level '%s'", token.c_str());
- }
-}
-
bool disableSpecialDebugLevel(const String &option) {
SpecialDebugLevelList::iterator i = find_if(gDebugLevels.begin(), gDebugLevels.end(), DebugLevelSearch(option));
@@ -138,10 +127,6 @@ const SpecialDebugLevelList &listSpecialDebugLevels() {
return gDebugLevels;
}
-uint32 getEnabledSpecialDebugLevels() {
- return gDebugLevelsEnabled;
-}
-
bool isSpecialDebugLevelEnabled(uint32 level) {
// FIXME: Seems gDebugLevel 11 has a special meaning? Document that!
if (gDebugLevel == 11)
diff --git a/common/debug.h b/common/debug.h
index 8d01cde539..5d58af03a6 100644
--- a/common/debug.h
+++ b/common/debug.h
@@ -49,7 +49,7 @@ struct SpecialDebugLevel {
* Adds a engine debug level.
* @param level the level flag (should be OR-able i.e. first one should be 1 than 2,4,...)
* @param name the option name which is used in the debugger/on the command line to enable
- * this special debug level, the option will be compared case !insentiv! later
+ * this special debug level (case will be ignored)
* @param description the description which shows up in the debugger
* @return true on success false on failure
*/
@@ -68,19 +68,14 @@ void clearAllSpecialDebugLevels();
bool enableSpecialDebugLevel(const String &name);
/**
- * Enables a list of engine debug levels, given as a comma-separated list
- * of level names.
- * @param name the list of names of debug levels to enable
- */
-void enableSpecialDebugLevelList(const String &names);
-
-/**
* Disables an engine debug level
* @param name the name of the debug level to disable
* @return true on success, false on failure
*/
bool disableSpecialDebugLevel(const String &name);
+
+
typedef List<SpecialDebugLevel> SpecialDebugLevelList;
/**
@@ -89,12 +84,6 @@ typedef List<SpecialDebugLevel> SpecialDebugLevelList;
*/
const SpecialDebugLevelList &listSpecialDebugLevels();
-/**
- * Return the active debug flag mask (i.e. all active debug flags ORed
- * together into a single uint32).
- */
-uint32 getEnabledSpecialDebugLevels();
-
/**
* Test whether the given debug level is enabled.