diff options
author | Eugene Sandulenko | 2016-11-09 19:01:34 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-11-09 19:06:49 +0100 |
commit | 939b7ed885754e2a513e8b8498715f52d14dbaa3 (patch) | |
tree | cf8baeaff8a5de30c597c27aed5e27deaabf223b | |
parent | fc1633513d715fbba1c08a4016077aaf5ce3ee5b (diff) | |
download | scummvm-rg350-939b7ed885754e2a513e8b8498715f52d14dbaa3.tar.gz scummvm-rg350-939b7ed885754e2a513e8b8498715f52d14dbaa3.tar.bz2 scummvm-rg350-939b7ed885754e2a513e8b8498715f52d14dbaa3.zip |
DIRECTOR: More debug information to CASt loading
-rw-r--r-- | engines/director/score.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/engines/director/score.cpp b/engines/director/score.cpp index 294b865e70..66e5e2a172 100644 --- a/engines/director/score.cpp +++ b/engines/director/score.cpp @@ -409,14 +409,16 @@ void Score::loadCastData(Common::SeekableSubReadStreamEndian &stream, uint16 id) stream.hexdump(stream.size()); uint32 size1, size2, size3, castType; - byte blob[3]; + byte unk1 = 0, unk2 = 0, unk3 = 0; if (_vm->getVersion() < 5) { size1 = stream.readUint16(); size2 = stream.readUint32(); size3 = 0; castType = stream.readByte(); - stream.read(blob, 3); + unk1 = stream.readByte(); + unk2 = stream.readByte(); + unk3 = stream.readByte(); } else { // FIXME: only the cast type and the strings are good castType = stream.readUint32(); @@ -425,12 +427,12 @@ void Score::loadCastData(Common::SeekableSubReadStreamEndian &stream, uint16 id) size1 = stream.readUint32(); assert(size1 == 0x14); size1 = 0; - blob[0] = blob[1] = blob[2] = 0; } - debugC(3, kDebugLoading, "CASt: id: %d type: %x size1: %d size2: %d (%x) size3: %d", id, castType, size1, size2, size2, size3); + debugC(3, kDebugLoading, "CASt: id: %d type: %x size1: %d size2: %d (%x) size3: %d unk1: %d unk2: %d unk3: %d", + id, castType, size1, size2, size2, size3, unk1, unk2, unk3); - byte *data = (byte *)malloc(size1 + 16); + byte *data = (byte *)calloc(size1 + 16, 1); stream.read(data, size1 + 16); Common::MemoryReadStreamEndian castStream(data, size1 + 16, stream.isBE()); |