[Scummvm-git-logs] scummvm master -> 9408888115f5154117ced114367c743c66a0feba
moralrecordings
noreply at scummvm.org
Mon Oct 16 01:21:36 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
9408888115 DIRECTOR: Fix film loop loading for D2
Commit: 9408888115f5154117ced114367c743c66a0feba
https://github.com/scummvm/scummvm/commit/9408888115f5154117ced114367c743c66a0feba
Author: Scott Percival (code at moral.net.au)
Date: 2023-10-16T09:21:31+08:00
Commit Message:
DIRECTOR: Fix film loop loading for D2
Changed paths:
engines/director/castmember/filmloop.cpp
diff --git a/engines/director/castmember/filmloop.cpp b/engines/director/castmember/filmloop.cpp
index 1372fe9fe5c..0b2bf300c22 100644
--- a/engines/director/castmember/filmloop.cpp
+++ b/engines/director/castmember/filmloop.cpp
@@ -140,8 +140,9 @@ void FilmLoopCastMember::loadFilmLoopDataD2(Common::SeekableReadStreamEndian &st
int order = stream.readByte() * 2 - 0x20;
frameSize -= 2;
- int channel = (order / channelSize) - 1;
+ int channel = order / channelSize;
int channelOffset = order % channelSize;
+ int offset = order;
debugC(8, kDebugLoading, "loadFilmLoopDataD2: Message: msgWidth %d, channel %d, channelOffset %d", msgWidth, channel, channelOffset);
if (debugChannelSet(8, kDebugLoading)) {
@@ -162,12 +163,13 @@ void FilmLoopCastMember::loadFilmLoopDataD2(Common::SeekableReadStreamEndian &st
sprite._puppet = 1;
sprite._stretch = 1;
- uint16 needSize = MIN((uint16)(nextStart - channelOffset), segSize);
+ uint16 needSize = MIN((uint16)(nextStart - offset), segSize);
int startPosition = stream.pos() - channelOffset;
int finishPosition = stream.pos() + needSize;
readSpriteDataD2(stream, sprite, startPosition, finishPosition);
newFrame.sprites.setVal(channel, sprite);
segSize -= needSize;
+ offset += needSize;
channel += 1;
channelOffset = 0;
nextStart += kSprChannelSizeD2;
More information about the Scummvm-git-logs
mailing list