aboutsummaryrefslogtreecommitdiff
path: root/engines/groovie
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/groovie
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/groovie')
-rw-r--r--engines/groovie/debug.cpp2
-rw-r--r--engines/groovie/groovie.cpp22
-rw-r--r--engines/groovie/script.cpp8
-rw-r--r--engines/groovie/vdx.cpp8
4 files changed, 20 insertions, 20 deletions
diff --git a/engines/groovie/debug.cpp b/engines/groovie/debug.cpp
index 00eb5c994c..2a4eaf4894 100644
--- a/engines/groovie/debug.cpp
+++ b/engines/groovie/debug.cpp
@@ -46,7 +46,7 @@ Debugger::Debugger(GroovieEngine *vm) :
}
Debugger::~Debugger() {
- Common::clearAllDebugChannels();
+ DebugMan.clearAllDebugChannels();
}
int Debugger::getNumber(const char *arg) {
diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp
index 5b42df143a..35aa4721e7 100644
--- a/engines/groovie/groovie.cpp
+++ b/engines/groovie/groovie.cpp
@@ -46,17 +46,17 @@ GroovieEngine::GroovieEngine(OSystem *syst, const GroovieGameDescription *gd) :
SearchMan.addSubDirectoryMatching(_gameDataDir, "system");
// Initialize the custom debug levels
- Common::addDebugChannel(kGroovieDebugAll, "All", "Debug everything");
- Common::addDebugChannel(kGroovieDebugVideo, "Video", "Debug video and audio playback");
- Common::addDebugChannel(kGroovieDebugResource, "Resource", "Debug resouce management");
- Common::addDebugChannel(kGroovieDebugScript, "Script", "Debug the scripts");
- Common::addDebugChannel(kGroovieDebugUnknown, "Unknown", "Report values of unknown data in files");
- Common::addDebugChannel(kGroovieDebugHotspots, "Hotspots", "Show the hotspots");
- Common::addDebugChannel(kGroovieDebugCursor, "Cursor", "Debug cursor decompression / switching");
- Common::addDebugChannel(kGroovieDebugMIDI, "MIDI", "Debug MIDI / XMIDI files");
- Common::addDebugChannel(kGroovieDebugScriptvars, "Scriptvars", "Print out any change to script variables");
- Common::addDebugChannel(kGroovieDebugCell, "Cell", "Debug the cell game (in the microscope)");
- Common::addDebugChannel(kGroovieDebugFast, "Fast", "Play videos quickly, with no sound (unstable)");
+ DebugMan.addDebugChannel(kGroovieDebugAll, "All", "Debug everything");
+ DebugMan.addDebugChannel(kGroovieDebugVideo, "Video", "Debug video and audio playback");
+ DebugMan.addDebugChannel(kGroovieDebugResource, "Resource", "Debug resouce management");
+ DebugMan.addDebugChannel(kGroovieDebugScript, "Script", "Debug the scripts");
+ DebugMan.addDebugChannel(kGroovieDebugUnknown, "Unknown", "Report values of unknown data in files");
+ DebugMan.addDebugChannel(kGroovieDebugHotspots, "Hotspots", "Show the hotspots");
+ DebugMan.addDebugChannel(kGroovieDebugCursor, "Cursor", "Debug cursor decompression / switching");
+ DebugMan.addDebugChannel(kGroovieDebugMIDI, "MIDI", "Debug MIDI / XMIDI files");
+ DebugMan.addDebugChannel(kGroovieDebugScriptvars, "Scriptvars", "Print out any change to script variables");
+ DebugMan.addDebugChannel(kGroovieDebugCell, "Cell", "Debug the cell game (in the microscope)");
+ DebugMan.addDebugChannel(kGroovieDebugFast, "Fast", "Play videos quickly, with no sound (unstable)");
}
GroovieEngine::~GroovieEngine() {
diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp
index ea211a62f2..2ff14f2706 100644
--- a/engines/groovie/script.cpp
+++ b/engines/groovie/script.cpp
@@ -45,8 +45,8 @@ static void debugScript(int level, bool nl, const char *s, ...) {
char buf[STRINGBUFLEN];
va_list va;
- if (!Common::isDebugChannelEnabled(kGroovieDebugScript) &&
- !Common::isDebugChannelEnabled(kGroovieDebugAll))
+ if (!DebugMan.isDebugChannelEnabled(kGroovieDebugScript) &&
+ !DebugMan.isDebugChannelEnabled(kGroovieDebugAll))
return;
va_start(va, s);
@@ -357,8 +357,8 @@ bool Script::hotspot(Common::Rect rect, uint16 address, uint8 cursor) {
bool contained = rect.contains(mousepos);
// Show hotspots when debugging
- if (Common::isDebugChannelEnabled(kGroovieDebugHotspots) ||
- Common::isDebugChannelEnabled(kGroovieDebugAll)) {
+ if (DebugMan.isDebugChannelEnabled(kGroovieDebugHotspots) ||
+ DebugMan.isDebugChannelEnabled(kGroovieDebugAll)) {
rect.translate(0, -80);
_vm->_graphicsMan->_foreground.frameRect(rect, 250);
_vm->_system->copyRectToScreen((byte*)_vm->_graphicsMan->_foreground.getBasePtr(0, 0), _vm->_graphicsMan->_foreground.pitch, 0, 80, 640, 320);
diff --git a/engines/groovie/vdx.cpp b/engines/groovie/vdx.cpp
index 75c42ef174..a8aba47ec6 100644
--- a/engines/groovie/vdx.cpp
+++ b/engines/groovie/vdx.cpp
@@ -54,8 +54,8 @@ void VDXPlayer::setOrigin(int16 x, int16 y) {
}
uint16 VDXPlayer::loadInternal() {
- if (Common::isDebugChannelEnabled(kGroovieDebugVideo) ||
- Common::isDebugChannelEnabled(kGroovieDebugAll)) {
+ if (DebugMan.isDebugChannelEnabled(kGroovieDebugVideo) ||
+ DebugMan.isDebugChannelEnabled(kGroovieDebugAll)) {
int8 i;
debugN(1, "Groovie::VDX: New VDX: bitflags are ");
for (i = 15; i >= 0; i--) {
@@ -175,7 +175,7 @@ bool VDXPlayer::playFrameInternal() {
// Wait until the current frame can be shown
- if (!Common::isDebugChannelEnabled(kGroovieDebugFast)) {
+ if (!DebugMan.isDebugChannelEnabled(kGroovieDebugFast)) {
waitFrame();
}
// TODO: Move it to a better place
@@ -506,7 +506,7 @@ void VDXPlayer::chunkSound(Common::ReadStream *in) {
byte *data = (byte *)malloc(60000);
int chunksize = in->read(data, 60000);
- if (!Common::isDebugChannelEnabled(kGroovieDebugFast)) {
+ if (!DebugMan.isDebugChannelEnabled(kGroovieDebugFast)) {
_audioStream->queueBuffer(data, chunksize, DisposeAfterUse::YES, Audio::FLAG_UNSIGNED);
}
}