diff options
author | Max Horn | 2007-02-04 12:41:49 +0000 |
---|---|---|
committer | Max Horn | 2007-02-04 12:41:49 +0000 |
commit | 5b65897cd3d4a197fe167b19afb4d931359c2462 (patch) | |
tree | 08630c50987051a96bc8b7a224a1d1ec6dfbd65b /engines/scumm/scumm.cpp | |
parent | 5007d82ec7b771579df86c050eba75caddd3931f (diff) | |
download | scummvm-rg350-5b65897cd3d4a197fe167b19afb4d931359c2462.tar.gz scummvm-rg350-5b65897cd3d4a197fe167b19afb4d931359c2462.tar.bz2 scummvm-rg350-5b65897cd3d4a197fe167b19afb4d931359c2462.zip |
Switch SCUMM engine to use the common special debug flags support (thus making it possible to use --debugflags with it)
svn-id: r25381
Diffstat (limited to 'engines/scumm/scumm.cpp')
-rw-r--r-- | engines/scumm/scumm.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 622a33b591..c8434029be 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -80,6 +80,25 @@ namespace Scumm { ScummEngine *g_scumm = 0; +struct dbgChannelDesc { + const char *channel, *desc; + uint32 flag; +}; + + +// Debug channel lookup table for Debugger console +static const dbgChannelDesc debugChannels[] = { + {"SCRIPTS", "Track script execution", DEBUG_SCRIPTS}, + {"OPCODES", "Track opcode execution", DEBUG_OPCODES}, + {"IMUSE", "Track iMUSE events", DEBUG_IMUSE}, + {"RESOURCE", "Track resource loading/management", DEBUG_RESOURCE}, + {"VARS", "Track variable changes", DEBUG_VARS}, + {"ACTORS", "Actor-related debug", DEBUG_ACTORS}, + {"SOUND", "Sound related debug", DEBUG_SOUND}, + {"INSANE", "Track INSANE", DEBUG_INSANE}, + {"SMUSH", "Track SMUSH", DEBUG_SMUSH} +}; + ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr) : Engine(syst), _game(dr.game), @@ -112,7 +131,6 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr) _musicEngine = NULL; _verbs = NULL; _objs = NULL; - _debugFlags = 0; _sound = NULL; memset(&vm, 0, sizeof(vm)); _quit = false; @@ -502,9 +520,16 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr) if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG) { _herculesBuf = (byte *)malloc(Common::kHercW * Common::kHercH); } + + // Add debug levels + for (int i = 0; i < ARRAYSIZE(debugChannels); ++i) + Common::addSpecialDebugLevel(debugChannels[i].flag, debugChannels[i].channel, debugChannels[i].desc); } + ScummEngine::~ScummEngine() { + Common::clearAllSpecialDebugLevels(); + if (_musicEngine) { _musicEngine->terminate(); delete _musicEngine; @@ -558,6 +583,7 @@ ScummEngine::~ScummEngine() { delete _gdi; } + ScummEngine_v5::ScummEngine_v5(OSystem *syst, const DetectorResult &dr) : ScummEngine(syst, dr) { |