aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2009-01-30 05:10:24 +0000
committerMax Horn2009-01-30 05:10:24 +0000
commit7cb437b56f95bff06b0c79be93cd619b95662346 (patch)
tree6c466852a68c135a92ed7abb816c358b0042c57c
parent7b50c293e6c509142e204e1aa11d51204cda9073 (diff)
downloadscummvm-rg350-7cb437b56f95bff06b0c79be93cd619b95662346.tar.gz
scummvm-rg350-7cb437b56f95bff06b0c79be93cd619b95662346.tar.bz2
scummvm-rg350-7cb437b56f95bff06b0c79be93cd619b95662346.zip
Renamed SpecialDebugLevel to DebugChannel
svn-id: r36142
-rw-r--r--base/main.cpp4
-rw-r--r--common/debug.cpp22
-rw-r--r--common/debug.h24
-rw-r--r--engines/agi/agi.cpp20
-rw-r--r--engines/agi/preagi.cpp20
-rw-r--r--engines/cine/cine.cpp8
-rw-r--r--engines/cruise/cruise.cpp2
-rw-r--r--engines/gob/gob.cpp22
-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
-rw-r--r--engines/igor/igor.cpp12
-rw-r--r--engines/kyra/kyra_lok.cpp2
-rw-r--r--engines/kyra/kyra_v1.cpp22
-rw-r--r--engines/lure/lure.cpp14
-rw-r--r--engines/m4/m4.cpp4
-rw-r--r--engines/parallaction/parallaction.cpp20
-rw-r--r--engines/scumm/debugger.cpp10
-rw-r--r--engines/scumm/scumm.cpp4
-rw-r--r--engines/tinsel/tinsel.cpp8
-rw-r--r--engines/touche/touche.cpp12
-rw-r--r--gui/debugger.cpp8
23 files changed, 139 insertions, 139 deletions
diff --git a/base/main.cpp b/base/main.cpp
index 8540c309e0..d75d5a893b 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -180,7 +180,7 @@ static Common::Error runGame(const EnginePlugin *plugin, OSystem &system, const
Common::StringTokenizer tokenizer(edebuglevels, " ,");
while (!tokenizer.empty()) {
Common::String token = tokenizer.nextToken();
- if (!enableSpecialDebugLevel(token))
+ if (!enableDebugChannel(token))
warning("Engine does not support debug level '%s'", token.c_str());
}
@@ -202,7 +202,7 @@ static Common::Error runGame(const EnginePlugin *plugin, OSystem &system, const
system.engineDone();
// We clear all debug levels again even though the engine should do it
- Common::clearAllSpecialDebugLevels();
+ Common::clearAllDebugChannels();
// Free up memory
delete engine;
diff --git a/common/debug.cpp b/common/debug.cpp
index 3118183713..1a1ea437df 100644
--- a/common/debug.cpp
+++ b/common/debug.cpp
@@ -58,34 +58,34 @@ namespace Common {
namespace {
-typedef HashMap<String, SpecialDebugLevel, IgnoreCase_Hash, IgnoreCase_EqualTo> DebugLevelMap;
+typedef HashMap<String, DebugChannel, IgnoreCase_Hash, IgnoreCase_EqualTo> DebugLevelMap;
static DebugLevelMap gDebugLevels;
static uint32 gDebugLevelsEnabled = 0;
struct DebugLevelComperator {
- bool operator()(const SpecialDebugLevel &l, const SpecialDebugLevel &r) {
+ bool operator()(const DebugChannel &l, const DebugChannel &r) {
return (l.name.compareToIgnoreCase(r.name) < 0);
}
};
}
-bool addSpecialDebugLevel(uint32 level, const String &name, const String &description) {
+bool addDebugChannel(uint32 level, const String &name, const String &description) {
if (gDebugLevels.contains(name)) {
warning("Duplicate declaration of engine debug level '%s'", name.c_str());
}
- gDebugLevels[name] = SpecialDebugLevel(level, name, description);
+ gDebugLevels[name] = DebugChannel(level, name, description);
return true;
}
-void clearAllSpecialDebugLevels() {
+void clearAllDebugChannels() {
gDebugLevelsEnabled = 0;
gDebugLevels.clear();
}
-bool enableSpecialDebugLevel(const String &name) {
+bool enableDebugChannel(const String &name) {
DebugLevelMap::iterator i = gDebugLevels.find(name);
if (i != gDebugLevels.end()) {
@@ -98,7 +98,7 @@ bool enableSpecialDebugLevel(const String &name) {
}
}
-bool disableSpecialDebugLevel(const String &name) {
+bool disableDebugChannel(const String &name) {
DebugLevelMap::iterator i = gDebugLevels.find(name);
if (i != gDebugLevels.end()) {
@@ -112,8 +112,8 @@ bool disableSpecialDebugLevel(const String &name) {
}
-SpecialDebugLevelList listSpecialDebugLevels() {
- SpecialDebugLevelList tmp;
+DebugChannelList listDebugChannels() {
+ DebugChannelList tmp;
for (DebugLevelMap::iterator i = gDebugLevels.begin(); i != gDebugLevels.end(); ++i)
tmp.push_back(i->_value);
sort(tmp.begin(), tmp.end(), DebugLevelComperator());
@@ -121,7 +121,7 @@ SpecialDebugLevelList listSpecialDebugLevels() {
return tmp;
}
-bool isSpecialDebugLevelEnabled(uint32 level) {
+bool isDebugChannelEnabled(uint32 level) {
// FIXME: Seems gDebugLevel 11 has a special meaning? Document that!
if (gDebugLevel == 11)
return true;
@@ -129,7 +129,7 @@ bool isSpecialDebugLevelEnabled(uint32 level) {
return gDebugLevelsEnabled & level;
}
-bool isSpecialDebugLevelEnabled(const String &name) {
+bool isDebugChannelEnabled(const String &name) {
// FIXME: Seems gDebugLevel 11 has a special meaning? Document that!
if (gDebugLevel == 11)
return true;
diff --git a/common/debug.h b/common/debug.h
index 5ee1dd4791..8cdecd749e 100644
--- a/common/debug.h
+++ b/common/debug.h
@@ -33,9 +33,9 @@
namespace Common {
-struct SpecialDebugLevel {
- SpecialDebugLevel() : level(0), enabled(false) {}
- SpecialDebugLevel(uint32 l, const String &n, const String &d)
+struct DebugChannel {
+ DebugChannel() : level(0), enabled(false) {}
+ DebugChannel(uint32 l, const String &n, const String &d)
: name(n), description(d), level(l), enabled(false) {}
String name;
@@ -53,47 +53,47 @@ struct SpecialDebugLevel {
* @param description the description which shows up in the debugger
* @return true on success false on failure
*/
-bool addSpecialDebugLevel(uint32 level, const String &name, const String &description);
+bool addDebugChannel(uint32 level, const String &name, const String &description);
/**
* Resets all engine debug levels.
*/
-void clearAllSpecialDebugLevels();
+void clearAllDebugChannels();
/**
* Enables an engine debug level.
* @param name the name of the debug level to enable
* @return true on success, false on failure
*/
-bool enableSpecialDebugLevel(const String &name);
+bool enableDebugChannel(const String &name);
/**
* 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);
+bool disableDebugChannel(const String &name);
-typedef List<SpecialDebugLevel> SpecialDebugLevelList;
+typedef List<DebugChannel> DebugChannelList;
/**
* Lists all debug levels
* @return returns a arry with all debug levels
*/
-SpecialDebugLevelList listSpecialDebugLevels();
+DebugChannelList listDebugChannels();
/**
* Test whether the given debug level is enabled.
*/
-bool isSpecialDebugLevelEnabled(uint32 level);
+bool isDebugChannelEnabled(uint32 level);
/**
* Test whether the given debug level is enabled.
*/
-bool isSpecialDebugLevelEnabled(const String &name);
+bool isDebugChannelEnabled(const String &name);
} // End of namespace Common
@@ -139,7 +139,7 @@ void debugN(int level, const char *s, ...) GCC_PRINTF(2, 3);
* As a rule of thumb, the more important the message, the lower the level.
* Automatically appends a newline.
*
- * @see enableSpecialDebugLevel
+ * @see enableDebugChannel
*/
void debugC(int level, uint32 engine_level, const char *s, ...) GCC_PRINTF(3, 4);
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index 42a53424ae..bf409a2210 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -630,16 +630,16 @@ AgiEngine::AgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) : AgiBas
_rnd = new Common::RandomSource();
syst->getEventManager()->registerRandomSource(*_rnd, "agi");
- Common::addSpecialDebugLevel(kDebugLevelMain, "Main", "Generic debug level");
- Common::addSpecialDebugLevel(kDebugLevelResources, "Resources", "Resources debugging");
- Common::addSpecialDebugLevel(kDebugLevelSprites, "Sprites", "Sprites debugging");
- Common::addSpecialDebugLevel(kDebugLevelInventory, "Inventory", "Inventory debugging");
- Common::addSpecialDebugLevel(kDebugLevelInput, "Input", "Input events debugging");
- Common::addSpecialDebugLevel(kDebugLevelMenu, "Menu", "Menu debugging");
- Common::addSpecialDebugLevel(kDebugLevelScripts, "Scripts", "Scripts debugging");
- Common::addSpecialDebugLevel(kDebugLevelSound, "Sound", "Sound debugging");
- Common::addSpecialDebugLevel(kDebugLevelText, "Text", "Text output debugging");
- Common::addSpecialDebugLevel(kDebugLevelSavegame, "Savegame", "Saving & restoring game debugging");
+ Common::addDebugChannel(kDebugLevelMain, "Main", "Generic debug level");
+ Common::addDebugChannel(kDebugLevelResources, "Resources", "Resources debugging");
+ Common::addDebugChannel(kDebugLevelSprites, "Sprites", "Sprites debugging");
+ Common::addDebugChannel(kDebugLevelInventory, "Inventory", "Inventory debugging");
+ Common::addDebugChannel(kDebugLevelInput, "Input", "Input events debugging");
+ Common::addDebugChannel(kDebugLevelMenu, "Menu", "Menu debugging");
+ Common::addDebugChannel(kDebugLevelScripts, "Scripts", "Scripts debugging");
+ Common::addDebugChannel(kDebugLevelSound, "Sound", "Sound debugging");
+ Common::addDebugChannel(kDebugLevelText, "Text", "Text output debugging");
+ Common::addDebugChannel(kDebugLevelSavegame, "Savegame", "Saving & restoring game debugging");
memset(&_game, 0, sizeof(struct AgiGame));
diff --git a/engines/agi/preagi.cpp b/engines/agi/preagi.cpp
index a3045a31cc..29abbc6008 100644
--- a/engines/agi/preagi.cpp
+++ b/engines/agi/preagi.cpp
@@ -67,16 +67,16 @@ PreAgiEngine::PreAgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) :
_rnd = new Common::RandomSource();
- Common::addSpecialDebugLevel(kDebugLevelMain, "Main", "Generic debug level");
- Common::addSpecialDebugLevel(kDebugLevelResources, "Resources", "Resources debugging");
- Common::addSpecialDebugLevel(kDebugLevelSprites, "Sprites", "Sprites debugging");
- Common::addSpecialDebugLevel(kDebugLevelInventory, "Inventory", "Inventory debugging");
- Common::addSpecialDebugLevel(kDebugLevelInput, "Input", "Input events debugging");
- Common::addSpecialDebugLevel(kDebugLevelMenu, "Menu", "Menu debugging");
- Common::addSpecialDebugLevel(kDebugLevelScripts, "Scripts", "Scripts debugging");
- Common::addSpecialDebugLevel(kDebugLevelSound, "Sound", "Sound debugging");
- Common::addSpecialDebugLevel(kDebugLevelText, "Text", "Text output debugging");
- Common::addSpecialDebugLevel(kDebugLevelSavegame, "Savegame", "Saving & restoring game debugging");
+ Common::addDebugChannel(kDebugLevelMain, "Main", "Generic debug level");
+ Common::addDebugChannel(kDebugLevelResources, "Resources", "Resources debugging");
+ Common::addDebugChannel(kDebugLevelSprites, "Sprites", "Sprites debugging");
+ Common::addDebugChannel(kDebugLevelInventory, "Inventory", "Inventory debugging");
+ Common::addDebugChannel(kDebugLevelInput, "Input", "Input events debugging");
+ Common::addDebugChannel(kDebugLevelMenu, "Menu", "Menu debugging");
+ Common::addDebugChannel(kDebugLevelScripts, "Scripts", "Scripts debugging");
+ Common::addDebugChannel(kDebugLevelSound, "Sound", "Sound debugging");
+ Common::addDebugChannel(kDebugLevelText, "Text", "Text output debugging");
+ Common::addDebugChannel(kDebugLevelSavegame, "Savegame", "Saving & restoring game debugging");
memset(&_game, 0, sizeof(struct AgiGame));
memset(&_debug, 0, sizeof(struct AgiDebug));
diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp
index 13991f0dec..21e83b8b8a 100644
--- a/engines/cine/cine.cpp
+++ b/engines/cine/cine.cpp
@@ -50,9 +50,9 @@ Common::SaveFileManager *g_saveFileMan;
CineEngine *g_cine;
CineEngine::CineEngine(OSystem *syst, const CINEGameDescription *gameDesc) : Engine(syst), _gameDescription(gameDesc) {
- Common::addSpecialDebugLevel(kCineDebugScript, "Script", "Script debug level");
- Common::addSpecialDebugLevel(kCineDebugPart, "Part", "Part debug level");
- Common::addSpecialDebugLevel(kCineDebugSound, "Sound", "Sound debug level");
+ Common::addDebugChannel(kCineDebugScript, "Script", "Script debug level");
+ Common::addDebugChannel(kCineDebugPart, "Part", "Part debug level");
+ Common::addDebugChannel(kCineDebugSound, "Sound", "Sound debug level");
// Setup mixer
_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
@@ -71,7 +71,7 @@ CineEngine::~CineEngine() {
if (g_cine->getGameType() == Cine::GType_OS) {
freeErrmessDat();
}
- Common::clearAllSpecialDebugLevels();
+ Common::clearAllDebugChannels();
}
Common::Error CineEngine::init() {
diff --git a/engines/cruise/cruise.cpp b/engines/cruise/cruise.cpp
index b1eafabe5c..43eb32a6d3 100644
--- a/engines/cruise/cruise.cpp
+++ b/engines/cruise/cruise.cpp
@@ -49,7 +49,7 @@ CruiseEngine::CruiseEngine(OSystem * syst, const CRUISEGameDescription *gameDesc
_currentVolumeFile = new Common::File();
#endif
- Common::addSpecialDebugLevel(kCruiseDebugScript, "Script",
+ Common::addDebugChannel(kCruiseDebugScript, "Script",
"Script debug level");
// Setup mixer
diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp
index f30cf7517e..ced85357a3 100644
--- a/engines/gob/gob.cpp
+++ b/engines/gob/gob.cpp
@@ -85,17 +85,17 @@ GobEngine::GobEngine(OSystem *syst) : Engine(syst) {
_copyProtection = ConfMan.getBool("copy_protection");
- Common::addSpecialDebugLevel(kDebugFuncOp, "FuncOpcodes", "Script FuncOpcodes debug level");
- Common::addSpecialDebugLevel(kDebugDrawOp, "DrawOpcodes", "Script DrawOpcodes debug level");
- Common::addSpecialDebugLevel(kDebugGobOp, "GoblinOpcodes", "Script GoblinOpcodes debug level");
- Common::addSpecialDebugLevel(kDebugSound, "Sound", "Sound output debug level");
- Common::addSpecialDebugLevel(kDebugParser, "Parser", "Parser debug level");
- Common::addSpecialDebugLevel(kDebugGameFlow, "Gameflow", "Gameflow debug level");
- Common::addSpecialDebugLevel(kDebugFileIO, "FileIO", "File Input/Output debug level");
- Common::addSpecialDebugLevel(kDebugSaveLoad, "SaveLoad", "Saving/Loading debug level");
- Common::addSpecialDebugLevel(kDebugGraphics, "Graphics", "Graphics debug level");
- Common::addSpecialDebugLevel(kDebugVideo, "Video", "IMD/VMD video debug level");
- Common::addSpecialDebugLevel(kDebugCollisions, "Collisions", "Collisions debug level");
+ Common::addDebugChannel(kDebugFuncOp, "FuncOpcodes", "Script FuncOpcodes debug level");
+ Common::addDebugChannel(kDebugDrawOp, "DrawOpcodes", "Script DrawOpcodes debug level");
+ Common::addDebugChannel(kDebugGobOp, "GoblinOpcodes", "Script GoblinOpcodes debug level");
+ Common::addDebugChannel(kDebugSound, "Sound", "Sound output debug level");
+ Common::addDebugChannel(kDebugParser, "Parser", "Parser debug level");
+ Common::addDebugChannel(kDebugGameFlow, "Gameflow", "Gameflow debug level");
+ Common::addDebugChannel(kDebugFileIO, "FileIO", "File Input/Output debug level");
+ Common::addDebugChannel(kDebugSaveLoad, "SaveLoad", "Saving/Loading debug level");
+ Common::addDebugChannel(kDebugGraphics, "Graphics", "Graphics debug level");
+ Common::addDebugChannel(kDebugVideo, "Video", "IMD/VMD video debug level");
+ Common::addDebugChannel(kDebugCollisions, "Collisions", "Collisions debug level");
syst->getEventManager()->registerRandomSource(_rnd, "gob");
}
diff --git a/engines/groovie/debug.cpp b/engines/groovie/debug.cpp
index fa5bef9944..72a07f4f42 100644
--- a/engines/groovie/debug.cpp
+++ b/engines/groovie/debug.cpp
@@ -46,7 +46,7 @@ Debugger::Debugger(GroovieEngine *vm) :
}
Debugger::~Debugger() {
- Common::clearAllSpecialDebugLevels();
+ Common::clearAllDebugChannels();
}
int Debugger::getNumber(const char *arg) {
diff --git a/engines/groovie/groovie.cpp b/engines/groovie/groovie.cpp
index a09fe8fe3b..d0b42506b8 100644
--- a/engines/groovie/groovie.cpp
+++ b/engines/groovie/groovie.cpp
@@ -45,17 +45,17 @@ GroovieEngine::GroovieEngine(OSystem *syst, GroovieGameDescription *gd) :
Common::File::addDefaultDirectory(_gameDataDir.getChild("system"));
// Initialize the custom debug levels
- Common::addSpecialDebugLevel(kGroovieDebugAll, "All", "Debug everything");
- Common::addSpecialDebugLevel(kGroovieDebugVideo, "Video", "Debug video and audio playback");
- Common::addSpecialDebugLevel(kGroovieDebugResource, "Resource", "Debug resouce management");
- Common::addSpecialDebugLevel(kGroovieDebugScript, "Script", "Debug the scripts");
- Common::addSpecialDebugLevel(kGroovieDebugUnknown, "Unknown", "Report values of unknown data in files");
- Common::addSpecialDebugLevel(kGroovieDebugHotspots, "Hotspots", "Show the hotspots");
- Common::addSpecialDebugLevel(kGroovieDebugCursor, "Cursor", "Debug cursor decompression / switching");
- Common::addSpecialDebugLevel(kGroovieDebugMIDI, "MIDI", "Debug MIDI / XMIDI files");
- Common::addSpecialDebugLevel(kGroovieDebugScriptvars, "Scriptvars", "Print out any change to script variables");
- Common::addSpecialDebugLevel(kGroovieDebugCell, "Cell", "Debug the cell game (in the microscope)");
- Common::addSpecialDebugLevel(kGroovieDebugFast, "Fast", "Play videos quickly, with no sound (unstable)");
+ 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)");
}
GroovieEngine::~GroovieEngine() {
diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp
index 4909bb46bc..14dfcf5c9d 100644
--- a/engines/groovie/script.cpp
+++ b/engines/groovie/script.cpp
@@ -42,8 +42,8 @@ void debugScript(int level, bool nl, const char *s, ...) {
char buf[STRINGBUFLEN];
va_list va;
- if (!Common::isSpecialDebugLevelEnabled(kGroovieDebugScript) &&
- !Common::isSpecialDebugLevelEnabled(kGroovieDebugAll))
+ if (!Common::isDebugChannelEnabled(kGroovieDebugScript) &&
+ !Common::isDebugChannelEnabled(kGroovieDebugAll))
return;
va_start(va, s);
@@ -330,8 +330,8 @@ bool Script::hotspot(Common::Rect rect, uint16 address, uint8 cursor) {
bool contained = rect.contains(mousepos);
// Show hotspots when debugging
- if (Common::isSpecialDebugLevelEnabled(kGroovieDebugHotspots) ||
- Common::isSpecialDebugLevelEnabled(kGroovieDebugAll)) {
+ if (Common::isDebugChannelEnabled(kGroovieDebugHotspots) ||
+ Common::isDebugChannelEnabled(kGroovieDebugAll)) {
rect.translate(0, -80);
_vm->_graphicsMan->_foreground.frameRect(rect, 250);
_vm->_system->copyRectToScreen((byte*)_vm->_graphicsMan->_foreground.getBasePtr(0, 0), 640, 0, 80, 640, 320);
diff --git a/engines/groovie/vdx.cpp b/engines/groovie/vdx.cpp
index 2e5cb2dbe9..46bd5f3472 100644
--- a/engines/groovie/vdx.cpp
+++ b/engines/groovie/vdx.cpp
@@ -49,8 +49,8 @@ void VDXPlayer::setOrigin(int16 x, int16 y) {
}
uint16 VDXPlayer::loadInternal() {
- if (Common::isSpecialDebugLevelEnabled(kGroovieDebugVideo) ||
- Common::isSpecialDebugLevelEnabled(kGroovieDebugAll)) {
+ if (Common::isDebugChannelEnabled(kGroovieDebugVideo) ||
+ Common::isDebugChannelEnabled(kGroovieDebugAll)) {
int8 i;
debugN(1, "Groovie::VDX: New VDX: bitflags are ");
for (i = 15; i >= 0; i--) {
@@ -162,7 +162,7 @@ bool VDXPlayer::playFrameInternal() {
// Wait until the current frame can be shown
- if (!Common::isSpecialDebugLevelEnabled(kGroovieDebugFast)) {
+ if (!Common::isDebugChannelEnabled(kGroovieDebugFast)) {
waitFrame();
}
// TODO: Move it to a better place
@@ -493,7 +493,7 @@ void VDXPlayer::chunkSound(Common::ReadStream *in) {
byte *data = new byte[60000];
int chunksize = in->read(data, 60000);
- if (!Common::isSpecialDebugLevelEnabled(kGroovieDebugFast)) {
+ if (!Common::isDebugChannelEnabled(kGroovieDebugFast)) {
_audioStream->queueBuffer(data, chunksize);
}
}
diff --git a/engines/igor/igor.cpp b/engines/igor/igor.cpp
index d9055fa4f7..838f78fbd1 100644
--- a/engines/igor/igor.cpp
+++ b/engines/igor/igor.cpp
@@ -53,11 +53,11 @@ IgorEngine::IgorEngine(OSystem *system, const DetectedGameVersion *dgv)
_inventoryImagesBuffer = (uint8 *)malloc(48000);
_verbsPanelBuffer = (uint8 *)malloc(3840);
- Common::addSpecialDebugLevel(kDebugEngine, "Engine", "Engine debug level");
- Common::addSpecialDebugLevel(kDebugResource, "Resource", "Resource debug level");
- Common::addSpecialDebugLevel(kDebugScreen, "Screen", "Screen debug level");
- Common::addSpecialDebugLevel(kDebugWalk, "Walk", "Walk debug level");
- Common::addSpecialDebugLevel(kDebugGame, "Game", "Game debug level");
+ Common::addDebugChannel(kDebugEngine, "Engine", "Engine debug level");
+ Common::addDebugChannel(kDebugResource, "Resource", "Resource debug level");
+ Common::addDebugChannel(kDebugScreen, "Screen", "Screen debug level");
+ Common::addDebugChannel(kDebugWalk, "Walk", "Walk debug level");
+ Common::addDebugChannel(kDebugGame, "Game", "Game debug level");
if (_game.flags & kFlagFloppy) {
_midiPlayer = new MidiPlayer(this);
@@ -83,7 +83,7 @@ IgorEngine::~IgorEngine() {
free(_inventoryImagesBuffer);
free(_verbsPanelBuffer);
- Common::clearAllSpecialDebugLevels();
+ Common::clearAllDebugChannels();
delete _midiPlayer;
}
diff --git a/engines/kyra/kyra_lok.cpp b/engines/kyra/kyra_lok.cpp
index 700b0502b7..142abbceee 100644
--- a/engines/kyra/kyra_lok.cpp
+++ b/engines/kyra/kyra_lok.cpp
@@ -110,7 +110,7 @@ KyraEngine_LoK::~KyraEngine_LoK() {
_emc->unload(&_scriptClickData);
}
- Common::clearAllSpecialDebugLevels();
+ Common::clearAllDebugChannels();
delete _screen;
delete _sprites;
diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp
index fbbaf7272a..112e5fc9fc 100644
--- a/engines/kyra/kyra_v1.cpp
+++ b/engines/kyra/kyra_v1.cpp
@@ -70,17 +70,17 @@ KyraEngine_v1::KyraEngine_v1(OSystem *system, const GameFlags &flags)
_mouseX = _mouseY = 0;
// sets up all engine specific debug levels
- Common::addSpecialDebugLevel(kDebugLevelScriptFuncs, "ScriptFuncs", "Script function debug level");
- Common::addSpecialDebugLevel(kDebugLevelScript, "Script", "Script interpreter debug level");
- Common::addSpecialDebugLevel(kDebugLevelSprites, "Sprites", "Sprite debug level");
- Common::addSpecialDebugLevel(kDebugLevelScreen, "Screen", "Screen debug level");
- Common::addSpecialDebugLevel(kDebugLevelSound, "Sound", "Sound debug level");
- Common::addSpecialDebugLevel(kDebugLevelAnimator, "Animator", "Animator debug level");
- Common::addSpecialDebugLevel(kDebugLevelMain, "Main", "Generic debug level");
- Common::addSpecialDebugLevel(kDebugLevelGUI, "GUI", "GUI debug level");
- Common::addSpecialDebugLevel(kDebugLevelSequence, "Sequence", "Sequence debug level");
- Common::addSpecialDebugLevel(kDebugLevelMovie, "Movie", "Movie debug level");
- Common::addSpecialDebugLevel(kDebugLevelTimer, "Timer", "Timer debug level");
+ Common::addDebugChannel(kDebugLevelScriptFuncs, "ScriptFuncs", "Script function debug level");
+ Common::addDebugChannel(kDebugLevelScript, "Script", "Script interpreter debug level");
+ Common::addDebugChannel(kDebugLevelSprites, "Sprites", "Sprite debug level");
+ Common::addDebugChannel(kDebugLevelScreen, "Screen", "Screen debug level");
+ Common::addDebugChannel(kDebugLevelSound, "Sound", "Sound debug level");
+ Common::addDebugChannel(kDebugLevelAnimator, "Animator", "Animator debug level");
+ Common::addDebugChannel(kDebugLevelMain, "Main", "Generic debug level");
+ Common::addDebugChannel(kDebugLevelGUI, "GUI", "GUI debug level");
+ Common::addDebugChannel(kDebugLevelSequence, "Sequence", "Sequence debug level");
+ Common::addDebugChannel(kDebugLevelMovie, "Movie", "Movie debug level");
+ Common::addDebugChannel(kDebugLevelTimer, "Timer", "Timer debug level");
system->getEventManager()->registerRandomSource(_rnd, "kyra");
}
diff --git a/engines/lure/lure.cpp b/engines/lure/lure.cpp
index a394bf950c..2aa6ea4b5d 100644
--- a/engines/lure/lure.cpp
+++ b/engines/lure/lure.cpp
@@ -40,12 +40,12 @@ static LureEngine *int_engine = NULL;
LureEngine::LureEngine(OSystem *system, const LureGameDescription *gameDesc): Engine(system), _gameDescription(gameDesc) {
- Common::addSpecialDebugLevel(kLureDebugScripts, "scripts", "Scripts debugging");
- Common::addSpecialDebugLevel(kLureDebugAnimations, "animations", "Animations debugging");
- Common::addSpecialDebugLevel(kLureDebugHotspots, "hotspots", "Hotspots debugging");
- Common::addSpecialDebugLevel(kLureDebugFights, "fights", "Fights debugging");
- Common::addSpecialDebugLevel(kLureDebugSounds, "sounds", "Sounds debugging");
- Common::addSpecialDebugLevel(kLureDebugStrings, "strings", "Strings debugging");
+ Common::addDebugChannel(kLureDebugScripts, "scripts", "Scripts debugging");
+ Common::addDebugChannel(kLureDebugAnimations, "animations", "Animations debugging");
+ Common::addDebugChannel(kLureDebugHotspots, "hotspots", "Hotspots debugging");
+ Common::addDebugChannel(kLureDebugFights, "fights", "Fights debugging");
+ Common::addDebugChannel(kLureDebugSounds, "sounds", "Sounds debugging");
+ Common::addDebugChannel(kLureDebugStrings, "strings", "Strings debugging");
}
Common::Error LureEngine::init() {
@@ -94,7 +94,7 @@ Common::Error LureEngine::init() {
LureEngine::~LureEngine() {
// Remove all of our debug levels here
- Common::clearAllSpecialDebugLevels();
+ Common::clearAllDebugChannels();
if (_initialised) {
// Delete and deinitialise subsystems
diff --git a/engines/m4/m4.cpp b/engines/m4/m4.cpp
index 98944b2611..0c1256bce4 100644
--- a/engines/m4/m4.cpp
+++ b/engines/m4/m4.cpp
@@ -111,8 +111,8 @@ M4Engine::M4Engine(OSystem *syst, const M4GameDescription *gameDesc) :
Common::File::addDefaultDirectory("goodstuf"); // FIXME: This is nonsense
Common::File::addDefaultDirectory("resource"); // FIXME: This is nonsense
- Common::addSpecialDebugLevel(kDebugScript, "script", "Script debug level");
- Common::addSpecialDebugLevel(kDebugConversations, "conversations", "Conversations debugging");
+ Common::addDebugChannel(kDebugScript, "script", "Script debug level");
+ Common::addDebugChannel(kDebugConversations, "conversations", "Conversations debugging");
}
diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp
index 0b1ac96fa1..93ad60824a 100644
--- a/engines/parallaction/parallaction.cpp
+++ b/engines/parallaction/parallaction.cpp
@@ -61,16 +61,16 @@ Parallaction::Parallaction(OSystem *syst, const PARALLACTIONGameDescription *gam
Engine(syst), _gameDescription(gameDesc), _char(this) {
_vm = this;
- Common::addSpecialDebugLevel(kDebugDialogue, "dialogue", "Dialogues debug level");
- Common::addSpecialDebugLevel(kDebugParser, "parser", "Parser debug level");
- Common::addSpecialDebugLevel(kDebugDisk, "disk", "Disk debug level");
- Common::addSpecialDebugLevel(kDebugWalk, "walk", "Walk debug level");
- Common::addSpecialDebugLevel(kDebugGraphics, "gfx", "Gfx debug level");
- Common::addSpecialDebugLevel(kDebugExec, "exec", "Execution debug level");
- Common::addSpecialDebugLevel(kDebugInput, "input", "Input debug level");
- Common::addSpecialDebugLevel(kDebugAudio, "audio", "Audio debug level");
- Common::addSpecialDebugLevel(kDebugMenu, "menu", "Menu debug level");
- Common::addSpecialDebugLevel(kDebugInventory, "inventory", "Inventory debug level");
+ Common::addDebugChannel(kDebugDialogue, "dialogue", "Dialogues debug level");
+ Common::addDebugChannel(kDebugParser, "parser", "Parser debug level");
+ Common::addDebugChannel(kDebugDisk, "disk", "Disk debug level");
+ Common::addDebugChannel(kDebugWalk, "walk", "Walk debug level");
+ Common::addDebugChannel(kDebugGraphics, "gfx", "Gfx debug level");
+ Common::addDebugChannel(kDebugExec, "exec", "Execution debug level");
+ Common::addDebugChannel(kDebugInput, "input", "Input debug level");
+ Common::addDebugChannel(kDebugAudio, "audio", "Audio debug level");
+ Common::addDebugChannel(kDebugMenu, "menu", "Menu debug level");
+ Common::addDebugChannel(kDebugInventory, "inventory", "Inventory debug level");
syst->getEventManager()->registerRandomSource(_rnd, "parallaction");
}
diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp
index fbffffb9e0..f5dde54354 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::isSpecialDebugLevelEnabled(channel) && (gDebugLevel < 9))
+ if (!Common::isDebugChannelEnabled(channel) && (gDebugLevel < 9))
return;
va_start(va, s);
@@ -498,12 +498,12 @@ bool ScummDebugger::Cmd_Object(int argc, const char **argv) {
}
bool ScummDebugger::Cmd_Debug(int argc, const char **argv) {
- const Common::SpecialDebugLevelList &lvls = Common::listSpecialDebugLevels();
+ const Common::DebugChannelList &lvls = Common::listDebugChannels();
// No parameters given: Print out a list of all channels and their status
if (argc <= 1) {
DebugPrintf("Available debug channels: ");
- for (Common::SpecialDebugLevelList::iterator i = lvls.begin(); i != lvls.end(); ++i) {
+ for (Common::DebugChannelList::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");
@@ -514,9 +514,9 @@ bool ScummDebugger::Cmd_Debug(int argc, const char **argv) {
// Enable or disable channel?
bool result = false;
if (argv[1][0] == '+') {
- result = Common::enableSpecialDebugLevel(argv[1] + 1);
+ result = Common::enableDebugChannel(argv[1] + 1);
} else if (argv[1][0] == '-') {
- result = Common::disableSpecialDebugLevel(argv[1] + 1);
+ result = Common::disableDebugChannel(argv[1] + 1);
}
if (result) {
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 78329dd3e4..01e2947712 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -536,14 +536,14 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
// Add debug levels
for (int i = 0; i < ARRAYSIZE(debugChannels); ++i)
- Common::addSpecialDebugLevel(debugChannels[i].flag, debugChannels[i].channel, debugChannels[i].desc);
+ Common::addDebugChannel(debugChannels[i].flag, debugChannels[i].channel, debugChannels[i].desc);
syst->getEventManager()->registerRandomSource(_rnd, "scumm");
}
ScummEngine::~ScummEngine() {
- Common::clearAllSpecialDebugLevels();
+ Common::clearAllDebugChannels();
if (_musicEngine) {
_musicEngine->terminate();
diff --git a/engines/tinsel/tinsel.cpp b/engines/tinsel/tinsel.cpp
index 2524c3e6a2..b5a745cf81 100644
--- a/engines/tinsel/tinsel.cpp
+++ b/engines/tinsel/tinsel.cpp
@@ -853,10 +853,10 @@ TinselEngine::TinselEngine(OSystem *syst, const TinselGameDescription *gameDesc)
_vm = this;
// Register debug flags
- Common::addSpecialDebugLevel(kTinselDebugAnimations, "animations", "Animations debugging");
- Common::addSpecialDebugLevel(kTinselDebugActions, "actions", "Actions debugging");
- Common::addSpecialDebugLevel(kTinselDebugSound, "sound", "Sound debugging");
- Common::addSpecialDebugLevel(kTinselDebugMusic, "music", "Music debugging");
+ Common::addDebugChannel(kTinselDebugAnimations, "animations", "Animations debugging");
+ Common::addDebugChannel(kTinselDebugActions, "actions", "Actions debugging");
+ Common::addDebugChannel(kTinselDebugSound, "sound", "Sound debugging");
+ Common::addDebugChannel(kTinselDebugMusic, "music", "Music debugging");
// Setup mixer
_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume"));
diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp
index 2c740e72dc..cdb9bf1fed 100644
--- a/engines/touche/touche.cpp
+++ b/engines/touche/touche.cpp
@@ -67,17 +67,17 @@ ToucheEngine::ToucheEngine(OSystem *system, Common::Language language)
_menuRedrawCounter = 0;
memset(_paletteBuffer, 0, sizeof(_paletteBuffer));
- Common::addSpecialDebugLevel(kDebugEngine, "Engine", "Engine debug level");
- Common::addSpecialDebugLevel(kDebugGraphics, "Graphics", "Graphics debug level");
- Common::addSpecialDebugLevel(kDebugResource, "Resource", "Resource debug level");
- Common::addSpecialDebugLevel(kDebugOpcodes, "Opcodes", "Opcodes debug level");
- Common::addSpecialDebugLevel(kDebugMenu, "Menu", "Menu debug level");
+ Common::addDebugChannel(kDebugEngine, "Engine", "Engine debug level");
+ Common::addDebugChannel(kDebugGraphics, "Graphics", "Graphics debug level");
+ Common::addDebugChannel(kDebugResource, "Resource", "Resource debug level");
+ Common::addDebugChannel(kDebugOpcodes, "Opcodes", "Opcodes debug level");
+ Common::addDebugChannel(kDebugMenu, "Menu", "Menu debug level");
_eventMan->registerRandomSource(_rnd, "touche");
}
ToucheEngine::~ToucheEngine() {
- Common::clearAllSpecialDebugLevels();
+ Common::clearAllDebugChannels();
delete _midiPlayer;
}
diff --git a/gui/debugger.cpp b/gui/debugger.cpp
index 39e07a28f3..7ad468b477 100644
--- a/gui/debugger.cpp
+++ b/gui/debugger.cpp
@@ -406,7 +406,7 @@ bool Debugger::Cmd_Help(int argc, const char **argv) {
}
bool Debugger::Cmd_DebugFlagsList(int argc, const char **argv) {
- const Common::SpecialDebugLevelList &debugLevels = Common::listSpecialDebugLevels();
+ const Common::DebugChannelList &debugLevels = Common::listDebugChannels();
DebugPrintf("Engine debug levels:\n");
DebugPrintf("--------------------\n");
@@ -414,7 +414,7 @@ bool Debugger::Cmd_DebugFlagsList(int argc, const char **argv) {
DebugPrintf("No engine debug levels\n");
return true;
}
- for (Common::SpecialDebugLevelList::const_iterator i = debugLevels.begin(); i != debugLevels.end(); ++i) {
+ for (Common::DebugChannelList::const_iterator i = debugLevels.begin(); i != debugLevels.end(); ++i) {
DebugPrintf("%c%s - %s (%s)\n", i->enabled ? '+' : ' ',
i->name.c_str(), i->description.c_str(),
i->enabled ? "enabled" : "disabled");
@@ -427,7 +427,7 @@ bool Debugger::Cmd_DebugFlagEnable(int argc, const char **argv) {
if (argc < 2) {
DebugPrintf("debugflag_enable <flag>\n");
} else {
- if (Common::enableSpecialDebugLevel(argv[1])) {
+ if (Common::enableDebugChannel(argv[1])) {
DebugPrintf("Enabled debug flag '%s'\n", argv[1]);
} else {
DebugPrintf("Failed to enable debug flag '%s'\n", argv[1]);
@@ -440,7 +440,7 @@ bool Debugger::Cmd_DebugFlagDisable(int argc, const char **argv) {
if (argc < 2) {
DebugPrintf("debugflag_disable <flag>\n");
} else {
- if (Common::disableSpecialDebugLevel(argv[1])) {
+ if (Common::disableDebugChannel(argv[1])) {
DebugPrintf("Disabled debug flag '%s'\n", argv[1]);
} else {
DebugPrintf("Failed to disable debug flag '%s'\n", argv[1]);