aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/agos/agos.cpp7
-rw-r--r--engines/agos/agos.h4
-rw-r--r--engines/agos/gfx.cpp5
3 files changed, 6 insertions, 10 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index 8763872c41..0ee6bb538f 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -148,6 +148,7 @@ AGOSEngine::AGOSEngine(OSystem *system, const AGOSGameDescription *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");
_vcPtr = 0;
_vcGetOutOfCode = 0;
@@ -248,7 +249,6 @@ AGOSEngine::AGOSEngine(OSystem *system, const AGOSGameDescription *gd)
_backFlag = false;
- _dumpVgaScripts = false;
_dumpImages = false;
_copyProtection = false;
@@ -676,11 +676,6 @@ Common::Error AGOSEngine::init() {
_subtitles = true;
}
- // TODO: Use special debug levels instead of the following hack.
- switch (gDebugLevel) {
- case 5: _dumpVgaScripts = true; break;
- }
-
return Common::kNoError;
}
diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index 43afdb7740..e2f5100f65 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -64,7 +64,8 @@ namespace AGOS {
enum {
kDebugOpcode = 1 << 0,
kDebugVGAOpcode = 1 << 1,
- kDebugSubroutine = 1 << 2
+ kDebugSubroutine = 1 << 2,
+ kDebugVGAScript = 1 << 3
};
uint fileReadItemID(Common::SeekableReadStream *in);
@@ -333,7 +334,6 @@ protected:
Common::Language _language;
bool _copyProtection;
bool _pause;
- bool _dumpVgaScripts;
bool _dumpImages;
bool _speech;
bool _subtitles;
diff --git a/engines/agos/gfx.cpp b/engines/agos/gfx.cpp
index 6e97084811..33145b7d0d 100644
--- a/engines/agos/gfx.cpp
+++ b/engines/agos/gfx.cpp
@@ -20,6 +20,7 @@
*
*/
+#include "common/debug-channels.h"
#include "common/endian.h"
#include "common/system.h"
#include "common/textconsole.h"
@@ -1129,7 +1130,7 @@ void AGOSEngine::animate(uint16 windowNum, uint16 zoneNum, uint16 vgaSpriteId, i
assert(READ_BE_UINT16(&((AnimationHeader_WW *) p)->id) == vgaSpriteId);
}
- if (_dumpVgaScripts) {
+ if (DebugMan.isDebugChannelEnabled(kDebugVGAScript)) {
if (getGameType() == GType_FF || getGameType() == GType_PP) {
dumpVgaScript(_curVgaFile1 + READ_LE_UINT16(&((AnimationHeader_Feeble*)p)->scriptOffs), zoneNum, vgaSpriteId);
} else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) {
@@ -1235,7 +1236,7 @@ void AGOSEngine::setImage(uint16 vgaSpriteId, bool vgaScript) {
}
}
- if (_dumpVgaScripts) {
+ if (DebugMan.isDebugChannelEnabled(kDebugVGAScript)) {
if (getGameType() == GType_FF || getGameType() == GType_PP) {
dumpVgaScript(_curVgaFile1 + READ_LE_UINT16(&((ImageHeader_Feeble*)b)->scriptOffs), zoneNum, vgaSpriteId);
} else if (getGameType() == GType_SIMON1 || getGameType() == GType_SIMON2) {