aboutsummaryrefslogtreecommitdiff
path: root/engines/agos
diff options
context:
space:
mode:
Diffstat (limited to 'engines/agos')
-rw-r--r--engines/agos/agos.cpp3
-rw-r--r--engines/agos/agos.h4
-rw-r--r--engines/agos/vga.cpp6
3 files changed, 6 insertions, 7 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index 8754b11065..809311219f 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -146,6 +146,7 @@ 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");
_vcPtr = 0;
_vcGetOutOfCode = 0;
@@ -248,7 +249,6 @@ AGOSEngine::AGOSEngine(OSystem *system, const AGOSGameDescription *gd)
_dumpScripts = false;
_dumpVgaScripts = false;
- _dumpVgaOpcodes = false;
_dumpImages = false;
_copyProtection = false;
@@ -678,7 +678,6 @@ Common::Error AGOSEngine::init() {
// TODO: Use special debug levels instead of the following hack.
switch (gDebugLevel) {
- case 3: _dumpVgaOpcodes = true; break;
case 4: _dumpScripts = true; break;
case 5: _dumpVgaScripts = true; break;
}
diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index c23f16b690..cfe84deaeb 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -62,7 +62,8 @@ struct Surface;
namespace AGOS {
enum {
- kDebugOpcode = 1 << 0
+ kDebugOpcode = 1 << 0,
+ kDebugVGAOpcode = 1 << 1
};
uint fileReadItemID(Common::SeekableReadStream *in);
@@ -334,7 +335,6 @@ protected:
bool _pause;
bool _dumpScripts;
bool _dumpVgaScripts;
- bool _dumpVgaOpcodes;
bool _dumpImages;
bool _speech;
bool _subtitles;
diff --git a/engines/agos/vga.cpp b/engines/agos/vga.cpp
index c656c0167a..31191792a1 100644
--- a/engines/agos/vga.cpp
+++ b/engines/agos/vga.cpp
@@ -27,6 +27,7 @@
#include "agos/intern.h"
#include "agos/vga.h"
+#include "common/debug-channels.h"
#include "common/endian.h"
#include "common/system.h"
#include "common/textconsole.h"
@@ -152,7 +153,7 @@ void AGOSEngine::runVgaScript() {
for (;;) {
uint opcode;
- if (_dumpVgaOpcodes) {
+ if (DebugMan.isDebugChannelEnabled(kDebugVGAOpcode)) {
if (_vcPtr != (const byte *)&_vcGetOutOfCode) {
debugN("%.5d %.5X: %5d %4d ", _vgaTickCounter, (unsigned int)(_vcPtr - _curVgaFile1), _vgaCurSpriteId, _vgaCurZoneNum);
dumpVideoScript(_vcPtr, true);
@@ -381,8 +382,7 @@ void AGOSEngine::vcSkipNextInstruction() {
_vcPtr += opcodeParamLenPN[opcode];
}
- if (_dumpVgaOpcodes)
- debugN("; skipped\n");
+ debugCN(kDebugVGAOpcode, "; skipped\n");
}
// VGA Script commands