aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorMax Horn2010-04-27 21:40:52 +0000
committerMax Horn2010-04-27 21:40:52 +0000
commit460d69e8855f849e2200c49b198936b1201e0c91 (patch)
tree31bfcaf8c2603d01c9d971fb3b40390e0798ec02 /engines/scumm
parent445dccd59bc77e760e649bae982d78f0c3ca6b04 (diff)
downloadscummvm-rg350-460d69e8855f849e2200c49b198936b1201e0c91.tar.gz
scummvm-rg350-460d69e8855f849e2200c49b198936b1201e0c91.tar.bz2
scummvm-rg350-460d69e8855f849e2200c49b198936b1201e0c91.zip
COMMON: Move DebugChannel stuff into a new DebugMan singleton
svn-id: r48821
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/debugger.cpp10
-rw-r--r--engines/scumm/scumm.cpp4
2 files changed, 7 insertions, 7 deletions
diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp
index 0adc05d662..035f97350f 100644
--- a/engines/scumm/debugger.cpp
+++ b/engines/scumm/debugger.cpp
@@ -47,7 +47,7 @@ void debugC(int channel, const char *s, ...) {
// FIXME: Still spew all debug at -d9, for crashes in startup etc.
// Add setting from commandline ( / abstract channel interface)
- if (!Common::isDebugChannelEnabled(channel) && (gDebugLevel < 9))
+ if (!DebugMan.isDebugChannelEnabled(channel) && (gDebugLevel < 9))
return;
va_start(va, s);
@@ -505,12 +505,12 @@ bool ScummDebugger::Cmd_Object(int argc, const char **argv) {
}
bool ScummDebugger::Cmd_Debug(int argc, const char **argv) {
- const Common::DebugChannelList &lvls = Common::listDebugChannels();
+ const Common::DebugManager::DebugChannelList &lvls = DebugMan.listDebugChannels();
// No parameters given: Print out a list of all channels and their status
if (argc <= 1) {
DebugPrintf("Available debug channels:\n");
- for (Common::DebugChannelList::const_iterator i = lvls.begin(); i != lvls.end(); ++i) {
+ for (Common::DebugManager::DebugChannelList::const_iterator i = lvls.begin(); i != lvls.end(); ++i) {
DebugPrintf("%c%s - %s (%s)\n", i->enabled ? '+' : ' ',
i->name.c_str(), i->description.c_str(),
i->enabled ? "enabled" : "disabled");
@@ -521,9 +521,9 @@ bool ScummDebugger::Cmd_Debug(int argc, const char **argv) {
// Enable or disable channel?
bool result = false;
if (argv[1][0] == '+') {
- result = Common::enableDebugChannel(argv[1] + 1);
+ result = DebugMan.enableDebugChannel(argv[1] + 1);
} else if (argv[1][0] == '-') {
- result = Common::disableDebugChannel(argv[1] + 1);
+ result = DebugMan.disableDebugChannel(argv[1] + 1);
}
if (result) {
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 5555d961b2..d858b6c1e5 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -547,14 +547,14 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
// Add debug levels
for (int i = 0; i < ARRAYSIZE(debugChannels); ++i)
- Common::addDebugChannel(debugChannels[i].flag, debugChannels[i].channel, debugChannels[i].desc);
+ DebugMan.addDebugChannel(debugChannels[i].flag, debugChannels[i].channel, debugChannels[i].desc);
g_eventRec.registerRandomSource(_rnd, "scumm");
}
ScummEngine::~ScummEngine() {
- Common::clearAllDebugChannels();
+ DebugMan.clearAllDebugChannels();
delete _musicEngine;