aboutsummaryrefslogtreecommitdiff
path: root/engines/agos
diff options
context:
space:
mode:
authorD G Turner2014-05-11 12:46:55 +0100
committerD G Turner2014-05-11 12:46:55 +0100
commitbe686829469b1007f3dec00f658431774a734189 (patch)
tree1d7717e560d95c22bc2ece9a58fc872606edc022 /engines/agos
parent6856b09d5a0024397895984aeb8d79d4a77e9111 (diff)
downloadscummvm-rg350-be686829469b1007f3dec00f658431774a734189.tar.gz
scummvm-rg350-be686829469b1007f3dec00f658431774a734189.tar.bz2
scummvm-rg350-be686829469b1007f3dec00f658431774a734189.zip
AGOS: Switch VGA opcode debugging to debug flag, rather than level 3.
This is now set by --debugflags=vga_opcode rather than -d 3, though it will still require a debug level greater than 0.
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