diff options
author | Eugene Sandulenko | 2019-06-08 14:21:13 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:16:45 +0200 |
commit | 42d0ba46c626dfdc4bd1ca4d48b9d2834bc4081e (patch) | |
tree | 9e1c26782af15295dd7eb5b26471a681a5e7665c | |
parent | 2975f5222fa8cfcf8b09b8bb892da1b06c59bcda (diff) | |
download | scummvm-rg350-42d0ba46c626dfdc4bd1ca4d48b9d2834bc4081e.tar.gz scummvm-rg350-42d0ba46c626dfdc4bd1ca4d48b9d2834bc4081e.tar.bz2 scummvm-rg350-42d0ba46c626dfdc4bd1ca4d48b9d2834bc4081e.zip |
HDB: Added debug output to the map loading
-rw-r--r-- | engines/hdb/map-loader.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/engines/hdb/map-loader.cpp b/engines/hdb/map-loader.cpp index 238e40fb6c..06bbe2184b 100644 --- a/engines/hdb/map-loader.cpp +++ b/engines/hdb/map-loader.cpp @@ -53,6 +53,8 @@ bool Map::load(Common::SeekableReadStream *stream) { return false; } + debug(5, "map stream size: %d(%x)", stream->size(), stream->size()); + // Load MSM data header stream->read(_name, 32); _width = stream->readUint16LE(); @@ -64,12 +66,21 @@ bool Map::load(Common::SeekableReadStream *stream) { _infoNum = stream->readUint16LE(); _infoListOffset = stream->readUint32LE(); + debug(5, "map: w: %d(%x), h: %d(%x) bg: %x fg: %x icon#: %d(%x) icon: %x info#: %d(%x) info: %x", + _width, _width, _height, _height, _backgroundOffset, _foregroundOffset, _iconNum, _iconNum, + _iconListOffset, _infoNum, _infoNum, _infoListOffset); + // Reading Background _background = new uint16[_width * _height]; stream->seek(_backgroundOffset); for (int i = 0; i < _width * _height; i++) { _background[i] = stream->readUint16LE(); } + if (gDebugLevel >= 5) { + debug(5, "Background:"); + Common::hexdump((const byte *)_foreground, 512); + } + // Reading Foreground _foreground = new uint16[_width * _height]; @@ -78,6 +89,11 @@ bool Map::load(Common::SeekableReadStream *stream) { _foreground[i] = stream->readUint16LE(); } + if (gDebugLevel >= 5) { + debug(5, "Foreground:"); + Common::hexdump((const byte *)_foreground, 512); + } + // Reading Icon List _iconList = new MSMIcon[_iconNum]; for (uint i = 0; i < _iconNum; i++) { |