diff options
author | Eugene Sandulenko | 2017-03-17 08:20:11 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2017-03-17 08:20:11 +0000 |
commit | 7074c98e915402e59313331543b1ab5ca8c1bbc4 (patch) | |
tree | f1827fb9d10a44079101b4f67deea1a3d53f50d7 /engines/director | |
parent | 7c2fb94f9c0ceb9241a5192844f89befd9a9bb84 (diff) | |
download | scummvm-rg350-7074c98e915402e59313331543b1ab5ca8c1bbc4.tar.gz scummvm-rg350-7074c98e915402e59313331543b1ab5ca8c1bbc4.tar.bz2 scummvm-rg350-7074c98e915402e59313331543b1ab5ca8c1bbc4.zip |
DIRECTOR: Improved debug output for resource loading
Diffstat (limited to 'engines/director')
-rw-r--r-- | engines/director/resource.cpp | 14 | ||||
-rw-r--r-- | engines/director/score.cpp | 11 |
2 files changed, 18 insertions, 7 deletions
diff --git a/engines/director/resource.cpp b/engines/director/resource.cpp index 62363bfc53..10e7d939ce 100644 --- a/engines/director/resource.cpp +++ b/engines/director/resource.cpp @@ -200,7 +200,7 @@ void DirectorEngine::loadMac(const Common::String movie) { void DirectorEngine::loadSharedCastsFrom(Common::String filename) { Archive *shardcst = createArchive(); - debug(0, "Loading Shared cast '%s'", filename.c_str()); + debug(0, "****** Loading Shared cast '%s'", filename.c_str()); _sharedDIB = new Common::HashMap<int, Common::SeekableSubReadStreamEndian *>; _sharedSTXT = new Common::HashMap<int, Common::SeekableSubReadStreamEndian *>; @@ -229,12 +229,16 @@ void DirectorEngine::loadSharedCastsFrom(Common::String filename) { Common::Array<uint16> cast = shardcst->getResourceIDList(MKTAG('C','A','S','t')); if (cast.size() > 0) { + debug(0, "****** Loading %d CASt resources", cast.size()); + for (Common::Array<uint16>::iterator iterator = cast.begin(); iterator != cast.end(); ++iterator) _sharedScore->loadCastData(*shardcst->getResource(MKTAG('C','A','S','t'), *iterator), *iterator, NULL); } Common::Array<uint16> vwci = shardcst->getResourceIDList(MKTAG('V', 'W', 'C', 'I')); if (vwci.size() > 0) { + debug(0, "****** Loading %d CastInfo resources", vwci.size()); + for (Common::Array<uint16>::iterator iterator = vwci.begin(); iterator != vwci.end(); ++iterator) _sharedScore->loadCastInfo(*shardcst->getResource(MKTAG('V', 'W', 'C', 'I'), *iterator), *iterator); } @@ -243,7 +247,7 @@ void DirectorEngine::loadSharedCastsFrom(Common::String filename) { Common::Array<uint16> dib = shardcst->getResourceIDList(MKTAG('D','I','B',' ')); if (dib.size() != 0) { - debugC(3, kDebugLoading, "Loading %d DIBs", dib.size()); + debugC(3, kDebugLoading, "****** Loading %d DIBs", dib.size()); for (Common::Array<uint16>::iterator iterator = dib.begin(); iterator != dib.end(); ++iterator) { debugC(3, kDebugLoading, "Shared DIB %d", *iterator); @@ -253,7 +257,7 @@ void DirectorEngine::loadSharedCastsFrom(Common::String filename) { Common::Array<uint16> stxt = shardcst->getResourceIDList(MKTAG('S','T','X','T')); if (stxt.size() != 0) { - debugC(3, kDebugLoading, "Loading %d STXTs", stxt.size()); + debugC(3, kDebugLoading, "****** Loading %d STXTs", stxt.size()); for (Common::Array<uint16>::iterator iterator = stxt.begin(); iterator != stxt.end(); ++iterator) { debugC(3, kDebugLoading, "Shared STXT %d", *iterator); @@ -263,7 +267,7 @@ void DirectorEngine::loadSharedCastsFrom(Common::String filename) { Common::Array<uint16> bmp = shardcst->getResourceIDList(MKTAG('B','I','T','D')); if (bmp.size() != 0) { - debugC(3, kDebugLoading, "Loading %d BITDs", bmp.size()); + debugC(3, kDebugLoading, "****** Loading %d BITDs", bmp.size()); for (Common::Array<uint16>::iterator iterator = bmp.begin(); iterator != bmp.end(); ++iterator) { debugC(3, kDebugLoading, "Shared BITD %d (%s)", *iterator, numToCastNum(*iterator - 1024)); _sharedBMP->setVal(*iterator, shardcst->getResource(MKTAG('B','I','T','D'), *iterator)); @@ -272,7 +276,7 @@ void DirectorEngine::loadSharedCastsFrom(Common::String filename) { Common::Array<uint16> sound = shardcst->getResourceIDList(MKTAG('S','N','D',' ')); if (sound.size() != 0) { - debugC(3, kDebugLoading, "Loading %d SNDs", sound.size()); + debugC(3, kDebugLoading, "****** Loading %d SNDs", sound.size()); for (Common::Array<uint16>::iterator iterator = sound.begin(); iterator != sound.end(); ++iterator) { debugC(3, kDebugLoading, "Shared SND %d", *iterator); _sharedSound->setVal(*iterator, shardcst->getResource(MKTAG('S','N','D',' '), *iterator)); diff --git a/engines/director/score.cpp b/engines/director/score.cpp index 14ab831d16..61bfd0964c 100644 --- a/engines/director/score.cpp +++ b/engines/director/score.cpp @@ -183,6 +183,8 @@ void Score::loadArchive() { } void Score::loadSpriteImages(bool isSharedCast) { + debugC(1, kDebugLoading, "****** Preloading sprite images"); + Common::HashMap<int, BitmapCast *>::iterator bc; for (bc = _loadedBitmaps->begin(); bc != _loadedBitmaps->end(); ++bc) { if (bc->_value) { @@ -277,6 +279,8 @@ void Score::loadPalette(Common::SeekableSubReadStreamEndian &stream) { } void Score::loadFrames(Common::SeekableSubReadStreamEndian &stream) { + debugC(1, kDebugLoading, "****** Loading frames"); + uint32 size = stream.readUint32(); size -= 4; @@ -334,7 +338,7 @@ void Score::loadFrames(Common::SeekableSubReadStreamEndian &stream) { //Common::hexdump(channelData, ARRAYSIZE(channelData)); frame->readChannels(str); - debugC(3, kDebugLoading, "Frame %d actionId: %d", _frames.size() + 1, frame->_actionId); + debugC(3, kDebugLoading, "Frame %d actionId: %d", _frames.size(), frame->_actionId); delete str; @@ -343,6 +347,8 @@ void Score::loadFrames(Common::SeekableSubReadStreamEndian &stream) { } void Score::loadConfig(Common::SeekableSubReadStreamEndian &stream) { + debugC(1, kDebugLoading, "****** Loading Config"); + /*uint16 unk1 = */ stream.readUint16(); /*ver1 = */ stream.readUint16(); _movieRect = Score::readRect(stream); @@ -362,7 +368,7 @@ void Score::readVersion(uint32 rid) { } void Score::loadCastDataVWCR(Common::SeekableSubReadStreamEndian &stream) { - debugC(1, kDebugLoading, "Score::loadCastDataVWCR(). start: %d, end: %d", _castArrayStart, _castArrayEnd); + debugC(1, kDebugLoading, "****** Score::loadCastDataVWCR(). start: %d, end: %d", _castArrayStart, _castArrayEnd); for (uint16 id = _castArrayStart; id <= _castArrayEnd; id++) { byte size = stream.readByte(); @@ -638,6 +644,7 @@ void Score::loadLabels(Common::SeekableSubReadStreamEndian &stream) { Common::SortedArray<Label *>::iterator j; + debugC(2, kDebugLoading, "****** Loading labels"); for (j = _labels->begin(); j != _labels->end(); ++j) { debugC(2, kDebugLoading, "Frame %d, Label %s", (*j)->number, (*j)->name.c_str()); } |