aboutsummaryrefslogtreecommitdiff
path: root/engines/agos/agos.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/agos/agos.cpp')
-rw-r--r--engines/agos/agos.cpp25
1 files changed, 9 insertions, 16 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index 7266c75474..6eda2eb9aa 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -21,6 +21,7 @@
*/
#include "common/config-manager.h"
+#include "common/debug-channels.h"
#include "common/file.h"
#include "common/fs.h"
#include "common/textconsole.h"
@@ -144,6 +145,14 @@ AGOSEngine_Elvira1::AGOSEngine_Elvira1(OSystem *system, const AGOSGameDescriptio
AGOSEngine::AGOSEngine(OSystem *system, const AGOSGameDescription *gd)
: Engine(system), _rnd("agos"), _gameDescription(gd) {
+ DebugMan.addDebugChannel(kDebugOpcode, "opcode", "Opcode debug level");
+ DebugMan.addDebugChannel(kDebugVGAOpcode, "vga_opcode", "VGA Opcode debug level");
+ DebugMan.addDebugChannel(kDebugSubroutine, "subroutine", "Subroutine debug level");
+ DebugMan.addDebugChannel(kDebugVGAScript, "vga_script", "VGA Script debug level");
+ //Image dumping command disabled as it doesn't work well
+#if 0
+ DebugMan.addDebugChannel(kDebugImageDump, "image_dump", "Enable dumping of images to files");
+#endif
_vcPtr = 0;
_vcGetOutOfCode = 0;
_gameOffsetsPtr = 0;
@@ -243,13 +252,6 @@ AGOSEngine::AGOSEngine(OSystem *system, const AGOSGameDescription *gd)
_backFlag = false;
- _debugMode = 0;
- _dumpScripts = false;
- _dumpOpcodes = false;
- _dumpVgaScripts = false;
- _dumpVgaOpcodes = false;
- _dumpImages = false;
-
_copyProtection = false;
_pause = false;
_speech = false;
@@ -675,15 +677,6 @@ Common::Error AGOSEngine::init() {
_subtitles = true;
}
- // TODO: Use special debug levels instead of the following hack.
- _debugMode = (gDebugLevel >= 0);
- switch (gDebugLevel) {
- case 2: _dumpOpcodes = true; break;
- case 3: _dumpVgaOpcodes = true; break;
- case 4: _dumpScripts = true; break;
- case 5: _dumpVgaScripts = true; break;
- }
-
return Common::kNoError;
}