aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorD G Turner2014-05-12 00:44:13 +0100
committerD G Turner2014-05-12 00:44:13 +0100
commitb32ca0aaae88a7dbd3445a5611d4a59f0684a99b (patch)
treef57742a939e29edc5d67a7829f56906b02e66b4b
parent3d3a79108514d1e5b10fc079246501925b1bc813 (diff)
downloadscummvm-rg350-b32ca0aaae88a7dbd3445a5611d4a59f0684a99b.tar.gz
scummvm-rg350-b32ca0aaae88a7dbd3445a5611d4a59f0684a99b.tar.bz2
scummvm-rg350-b32ca0aaae88a7dbd3445a5611d4a59f0684a99b.zip
AGOS: Add image dumping to file enable by debugflag.
This previously required a code change and recompile to enable. It can now be enabled or disabled at runtime using the "image_dump" debug flag.
-rw-r--r--engines/agos/agos.cpp3
-rw-r--r--engines/agos/agos.h4
-rw-r--r--engines/agos/vga.cpp2
3 files changed, 4 insertions, 5 deletions
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index 0ee6bb538f..dab839b02b 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -149,6 +149,7 @@ AGOSEngine::AGOSEngine(OSystem *system, const AGOSGameDescription *gd)
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");
+ DebugMan.addDebugChannel(kDebugImageDump, "image_dump", "Enable dumping of images to files");
_vcPtr = 0;
_vcGetOutOfCode = 0;
@@ -249,8 +250,6 @@ AGOSEngine::AGOSEngine(OSystem *system, const AGOSGameDescription *gd)
_backFlag = false;
- _dumpImages = false;
-
_copyProtection = false;
_pause = false;
_speech = false;
diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index e2f5100f65..b6b5e427e1 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -65,7 +65,8 @@ enum {
kDebugOpcode = 1 << 0,
kDebugVGAOpcode = 1 << 1,
kDebugSubroutine = 1 << 2,
- kDebugVGAScript = 1 << 3
+ kDebugVGAScript = 1 << 3,
+ kDebugImageDump = 1 << 4
};
uint fileReadItemID(Common::SeekableReadStream *in);
@@ -334,7 +335,6 @@ protected:
Common::Language _language;
bool _copyProtection;
bool _pause;
- bool _dumpImages;
bool _speech;
bool _subtitles;
bool _vgaVar9;
diff --git a/engines/agos/vga.cpp b/engines/agos/vga.cpp
index 31191792a1..f761c3fc3f 100644
--- a/engines/agos/vga.cpp
+++ b/engines/agos/vga.cpp
@@ -648,7 +648,7 @@ void AGOSEngine::drawImage_init(int16 image, uint16 palette, int16 x, int16 y, u
if (height == 0 || width == 0)
return;
- if (_dumpImages)
+ if (DebugMan.isDebugChannelEnabled(kDebugImageDump))
dumpSingleBitmap(_vgaCurZoneNum, state.image, state.srcPtr, width, height,
state.palette);
state.width = state.draw_width = width; /* cl */