aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-08-21 10:39:30 +0200
committerEugene Sandulenko2016-08-21 11:24:11 +0200
commitfdd2c5fb609585eb1eb7fb56f678693c4cac1a30 (patch)
tree29edf530c812ea576c8b899cad97645603864db6
parent9f05f7821e1fe5131ee3df191a8c44269d162790 (diff)
downloadscummvm-rg350-fdd2c5fb609585eb1eb7fb56f678693c4cac1a30.tar.gz
scummvm-rg350-fdd2c5fb609585eb1eb7fb56f678693c4cac1a30.tar.bz2
scummvm-rg350-fdd2c5fb609585eb1eb7fb56f678693c4cac1a30.zip
DIRECTOR: Added image dumping at debug
-rw-r--r--engines/director/director.cpp1
-rw-r--r--engines/director/director.h7
-rw-r--r--engines/director/lingo/lingo.h5
-rw-r--r--engines/director/score.cpp8
4 files changed, 16 insertions, 5 deletions
diff --git a/engines/director/director.cpp b/engines/director/director.cpp
index ddc5adccdd..4898994f9f 100644
--- a/engines/director/director.cpp
+++ b/engines/director/director.cpp
@@ -52,6 +52,7 @@ DirectorEngine::DirectorEngine(OSystem *syst, const DirectorGameDescription *gam
_rnd("director") {
DebugMan.addDebugChannel(kDebugLingoExec, "lingoexec", "Lingo Execution");
DebugMan.addDebugChannel(kDebugLingoCompile, "lingocompile", "Lingo Compilation");
+ DebugMan.addDebugChannel(kDebugLoading, "loading", "Loading");
if (!_mixer->isReady())
error("Sound initialization failed");
diff --git a/engines/director/director.h b/engines/director/director.h
index 6208df2197..cccae8f879 100644
--- a/engines/director/director.h
+++ b/engines/director/director.h
@@ -53,6 +53,13 @@ class Lingo;
class Score;
struct Cast;
+enum {
+ kDebugLingoExec = 1 << 0,
+ kDebugLingoCompile = 1 << 1,
+ kDebugLoading = 1 << 2
+};
+
+
class DirectorEngine : public ::Engine {
public:
DirectorEngine(OSystem *syst, const DirectorGameDescription *gameDesc);
diff --git a/engines/director/lingo/lingo.h b/engines/director/lingo/lingo.h
index 2cc1a09012..5f4eb78f78 100644
--- a/engines/director/lingo/lingo.h
+++ b/engines/director/lingo/lingo.h
@@ -35,11 +35,6 @@
namespace Director {
-enum {
- kDebugLingoExec = 1 << 0,
- kDebugLingoCompile = 1 << 1
-};
-
enum LEvent {
kEventPrepareMovie,
kEventStartMovie,
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 2cdff841b2..231cb41a88 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -1340,6 +1340,14 @@ Image::ImageDecoder *Frame::getImageFrom(uint16 spriteId) {
if (_vm->_currentScore->getArchive()->hasResource(MKTAG('B', 'I', 'T', 'D'), imgId)) {
img = new Image::BitmapDecoder();
+
+ if (debugChannelSet(8, kDebugLoading)) {
+ Common::SeekableReadStream *s = _vm->_currentScore->getArchive()->getResource(MKTAG('B', 'I', 'T', 'D'), imgId);
+ byte buf[1024];
+ int n = s->read(buf, 1024);
+ Common::hexdump(buf, n);
+ }
+
img->loadStream(*_vm->_currentScore->getArchive()->getResource(MKTAG('B', 'I', 'T', 'D'), imgId));
return img;
}