[Scummvm-git-logs] scummvm master -> 221eb86d9c2bd8c3208f31acd219b4ed501605c7
sev-
noreply at scummvm.org
Sat Oct 4 22:15:40 UTC 2025
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
0c565c698f DIRECTOR: Read palettes for D6+
e0eade0260 DIRECTOR: Improve logging on loading
221eb86d9c DIRECTOR: Correctly read padding bytes for main channels in D6+
Commit: 0c565c698f9c7d47f8a8914446b601b4f3319b8c
https://github.com/scummvm/scummvm/commit/0c565c698f9c7d47f8a8914446b601b4f3319b8c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-10-05T00:04:27+02:00
Commit Message:
DIRECTOR: Read palettes for D6+
Changed paths:
engines/director/castmember/palette.cpp
diff --git a/engines/director/castmember/palette.cpp b/engines/director/castmember/palette.cpp
index a390cad6e79..83bb0892abd 100644
--- a/engines/director/castmember/palette.cpp
+++ b/engines/director/castmember/palette.cpp
@@ -98,7 +98,7 @@ void PaletteCastMember::load() {
if (_cast->_version < kFileVer400) {
// For D3 and below, palette IDs are stored in the CLUT resource as cast ID + 1024
paletteId = _castId + _cast->_castIDoffset;
- } else if (_cast->_version >= kFileVer400 && _cast->_version < kFileVer600) {
+ } else if (_cast->_version >= kFileVer400 && _cast->_version < kFileVer1100) {
for (auto &it : _children) {
if (it.tag == MKTAG('C', 'L', 'U', 'T')) {
paletteId = it.index;
Commit: e0eade0260b7bcfe72db5739c243f315b6691813
https://github.com/scummvm/scummvm/commit/e0eade0260b7bcfe72db5739c243f315b6691813
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-10-05T00:04:48+02:00
Commit Message:
DIRECTOR: Improve logging on loading
Changed paths:
engines/director/frame.cpp
diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp
index 8483184aa06..5403901cdf7 100644
--- a/engines/director/frame.cpp
+++ b/engines/director/frame.cpp
@@ -972,7 +972,7 @@ void Frame::readMainChannelsD5(Common::MemoryReadStreamEndian &stream, uint16 of
if (stream.pos() > finishPosition) {
// This means that the relevant `case` label reads too many bytes and must be split
- error("Frame::readMainChannelsD5(): Read %" PRId64 "extra bytes", stream.pos() - finishPosition);
+ error("Frame::readMainChannelsD5(): Read %" PRId64 " extra bytes", stream.pos() - finishPosition);
}
_mainChannels.transChunkSize = CLIP<byte>(_mainChannels.transChunkSize, 0, 128);
@@ -1404,7 +1404,7 @@ void Frame::readMainChannelsD6(Common::MemoryReadStreamEndian &stream, uint16 of
if (stream.pos() > finishPosition) {
// This means that the relevant `case` label reads too many bytes and must be split
- error("Frame::readMainChannelsD6(): Read %" PRId64 "extra bytes", stream.pos() - finishPosition);
+ error("Frame::readMainChannelsD6(): Read %" PRId64 " extra bytes", stream.pos() - finishPosition);
}
_mainChannels.transChunkSize = CLIP<byte>(_mainChannels.transChunkSize, 0, 128);
@@ -1861,7 +1861,7 @@ void Frame::readMainChannelsD7(Common::MemoryReadStreamEndian &stream, uint16 of
if (stream.pos() > finishPosition) {
// This means that the relevant `case` label reads too many bytes and must be split
- error("Frame::readMainChannelsD7(): Read %" PRId64 "extra bytes", stream.pos() - finishPosition);
+ error("Frame::readMainChannelsD7(): Read %" PRId64 " extra bytes", stream.pos() - finishPosition);
}
_mainChannels.transChunkSize = CLIP<byte>(_mainChannels.transChunkSize, 0, 128);
Commit: 221eb86d9c2bd8c3208f31acd219b4ed501605c7
https://github.com/scummvm/scummvm/commit/221eb86d9c2bd8c3208f31acd219b4ed501605c7
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-10-05T00:13:16+02:00
Commit Message:
DIRECTOR: Correctly read padding bytes for main channels in D6+
Changed paths:
engines/director/frame.cpp
diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp
index 5403901cdf7..bdabfa836b6 100644
--- a/engines/director/frame.cpp
+++ b/engines/director/frame.cpp
@@ -1250,8 +1250,11 @@ void Frame::readMainChannelsD6(Common::MemoryReadStreamEndian &stream, uint16 of
_mainChannels.colorScript = stream.readByte();
break;
case 0+9:
- stream.read(unk, 15); // alignment bytes
- hexdumpIfNotZero(unk, 15, "Frame::readMainChannelsD6(): script.unk: ");
+ {
+ int bytes = MIN<int>(finishPosition - stream.pos(), 15);
+ stream.read(unk, bytes); // alignment bytes
+ hexdumpIfNotZero(unk, bytes, "Frame::readMainChannelsD6(): script.unk: ");
+ }
break;
// Tempo
@@ -1273,8 +1276,11 @@ void Frame::readMainChannelsD6(Common::MemoryReadStreamEndian &stream, uint16 of
_mainChannels.colorTempo = stream.readByte();
break;
case 24+8:
- stream.read(unk, 16); // alignment bytes
- hexdumpIfNotZero(unk, 16, "Frame::readMainChannelsD6(): tempo.unk: ");
+ {
+ int bytes = MIN<int>(finishPosition - stream.pos(), 16);
+ stream.read(unk, bytes); // alignment bytes
+ hexdumpIfNotZero(unk, bytes, "Frame::readMainChannelsD6(): tempo.unk: ");
+ }
break;
@@ -1295,8 +1301,11 @@ void Frame::readMainChannelsD6(Common::MemoryReadStreamEndian &stream, uint16 of
_mainChannels.colorTrans = stream.readByte();
break;
case 48+9:
- stream.read(unk, 15); // alignment bytes
- hexdumpIfNotZero(unk, 15, "Frame::readMainChannelsD6(): trans.unk: ");
+ {
+ int bytes = MIN<int>(finishPosition - stream.pos(), 15);
+ stream.read(unk, bytes); // alignment bytes
+ hexdumpIfNotZero(unk, bytes, "Frame::readMainChannelsD6(): trans.unk: ");
+ }
break;
// Sound2
@@ -1316,8 +1325,11 @@ void Frame::readMainChannelsD6(Common::MemoryReadStreamEndian &stream, uint16 of
_mainChannels.colorSound2 = stream.readByte();
break;
case 72+9:
- stream.read(unk, 15); // alignment bytes
- hexdumpIfNotZero(unk, 15, "Frame::readMainChannelsD6(): sound2.unk: ");
+ {
+ int bytes = MIN<int>(finishPosition - stream.pos(), 15);
+ stream.read(unk, bytes); // alignment bytes
+ hexdumpIfNotZero(unk, bytes, "Frame::readMainChannelsD6(): sound2.unk: ");
+ }
break;
// Sound1
@@ -1337,8 +1349,11 @@ void Frame::readMainChannelsD6(Common::MemoryReadStreamEndian &stream, uint16 of
_mainChannels.colorSound1 = stream.readByte();
break;
case 96+9:
- stream.read(unk, 15); // alignment bytes
- hexdumpIfNotZero(unk, 15, "Frame::readMainChannelsD6(): sound1.unk: ");
+ {
+ int bytes = MIN<int>(finishPosition - stream.pos(), 15);
+ stream.read(unk, bytes); // alignment bytes
+ hexdumpIfNotZero(unk, bytes, "Frame::readMainChannelsD6(): sound1.unk: ");
+ }
break;
// Palette
@@ -1389,8 +1404,11 @@ void Frame::readMainChannelsD6(Common::MemoryReadStreamEndian &stream, uint16 of
_mainChannels.palette.spriteListIdx = stream.readUint16();
break;
case 120+20:
- stream.read(unk, 4); // alignment bytes
- hexdumpIfNotZero(unk, 4, "Frame::readMainChannelsD6(): palette.unk: ");
+ {
+ int bytes = MIN<int>(finishPosition - stream.pos(), 4);
+ stream.read(unk, bytes); // alignment bytes
+ hexdumpIfNotZero(unk, bytes, "Frame::readMainChannelsD6(): palette.unk: ");
+ }
break;
// 144 bytes (24 * 6)
@@ -1708,8 +1726,11 @@ void Frame::readMainChannelsD7(Common::MemoryReadStreamEndian &stream, uint16 of
_mainChannels.colorScript = stream.readByte();
break;
case 0+9:
- stream.read(unk, 39); // alignment bytes
- hexdumpIfNotZero(unk, 39, "Frame::readMainChannelsD7(): script.unk: ");
+ {
+ int bytes = MIN<int>(finishPosition - stream.pos(), 39);
+ stream.read(unk, bytes); // alignment bytes
+ hexdumpIfNotZero(unk, bytes, "Frame::readMainChannelsD6(): script.unk: ");
+ }
break;
// Tempo
@@ -1731,8 +1752,11 @@ void Frame::readMainChannelsD7(Common::MemoryReadStreamEndian &stream, uint16 of
_mainChannels.colorTempo = stream.readByte();
break;
case 48+8:
- stream.read(unk, 40); // alignment bytes
- hexdumpIfNotZero(unk, 40, "Frame::readMainChannelsD7(): tempo.unk: ");
+ {
+ int bytes = MIN<int>(finishPosition - stream.pos(), 40);
+ stream.read(unk, bytes); // alignment bytes
+ hexdumpIfNotZero(unk, bytes, "Frame::readMainChannelsD6(): tempo.unk: ");
+ }
break;
// Transition
@@ -1752,8 +1776,11 @@ void Frame::readMainChannelsD7(Common::MemoryReadStreamEndian &stream, uint16 of
_mainChannels.colorTrans = stream.readByte();
break;
case 96+9:
- stream.read(unk, 39); // alignment bytes
- hexdumpIfNotZero(unk, 39, "Frame::readMainChannelsD7(): trans.unk: ");
+ {
+ int bytes = MIN<int>(finishPosition - stream.pos(), 39);
+ stream.read(unk, bytes); // alignment bytes
+ hexdumpIfNotZero(unk, bytes, "Frame::readMainChannelsD6(): trans.unk: ");
+ }
break;
// Sound2
@@ -1773,8 +1800,11 @@ void Frame::readMainChannelsD7(Common::MemoryReadStreamEndian &stream, uint16 of
_mainChannels.colorSound2 = stream.readByte();
break;
case 144+9:
- stream.read(unk, 39); // alignment bytes
- hexdumpIfNotZero(unk, 39, "Frame::readMainChannelsD7(): sound2.unk: ");
+ {
+ int bytes = MIN<int>(finishPosition - stream.pos(), 39);
+ stream.read(unk, bytes); // alignment bytes
+ hexdumpIfNotZero(unk, bytes, "Frame::readMainChannelsD6(): sound2.unk: ");
+ }
break;
// Sound1
@@ -1794,8 +1824,11 @@ void Frame::readMainChannelsD7(Common::MemoryReadStreamEndian &stream, uint16 of
_mainChannels.colorSound1 = stream.readByte();
break;
case 192+9:
- stream.read(unk, 39); // alignment bytes
- hexdumpIfNotZero(unk, 39, "Frame::readMainChannelsD7(): sound1.unk: ");
+ {
+ int bytes = MIN<int>(finishPosition - stream.pos(), 39);
+ stream.read(unk, bytes); // alignment bytes
+ hexdumpIfNotZero(unk, bytes, "Frame::readMainChannelsD6(): sound1.unk: ");
+ }
break;
// Palette
@@ -1846,8 +1879,11 @@ void Frame::readMainChannelsD7(Common::MemoryReadStreamEndian &stream, uint16 of
_mainChannels.palette.spriteListIdx = stream.readUint16();
break;
case 240+20:
- stream.read(unk, 28); // alignment bytes
- hexdumpIfNotZero(unk, 28, "Frame::readMainChannelsD7(): palette.unk: ");
+ {
+ int bytes = MIN<int>(finishPosition - stream.pos(), 28);
+ stream.read(unk, bytes); // alignment bytes
+ hexdumpIfNotZero(unk, bytes, "Frame::readMainChannelsD6(): palette.unk: ");
+ }
break;
// 288 bytes (48 * 6)
More information about the Scummvm-git-logs
mailing list