From 5285e7d29cdfb5debe90033da54fec325ddc892b Mon Sep 17 00:00:00 2001 From: Roland van Laar Date: Tue, 21 Jul 2020 22:42:18 +0200 Subject: [PATCH] DIRECTOR: make _actionId a uint16, it can be > 255 _actionId was also read twice, the last one was the correct one. Redefine the first _actionId as an unk. --- engines/director/frame.cpp | 2 +- engines/director/frame.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/director/frame.cpp b/engines/director/frame.cpp index d7181d6e9df..58c308ff699 100644 --- a/engines/director/frame.cpp +++ b/engines/director/frame.cpp @@ -185,7 +185,7 @@ void Frame::readChannels(Common::ReadStreamEndian *stream) { stream->read(unk, 3); } else if (_vm->getVersion() == 4) { // Sound/Tempo/Transition - _actionId = stream->readByte(); + int unk1 = stream->readByte(); _soundType1 = stream->readByte(); // type: 0x17 for sounds (sound is cast id), 0x16 for MIDI (sound is cmd id) uint8 transFlags = stream->readByte(); // 0x80 is whole stage (vs changed area), rest is duration in 1/4ths of a second diff --git a/engines/director/frame.h b/engines/director/frame.h index 85412b6e724..9a3008a66e5 100644 --- a/engines/director/frame.h +++ b/engines/director/frame.h @@ -83,11 +83,11 @@ private: Image::ImageDecoder *getImageFrom(uint16 spriteId); Common::String readTextStream(Common::SeekableSubReadStreamEndian *textStream, TextCastMember *textCast); - + public: int _numChannels; byte _channelData[kChannelDataSize]; - uint8 _actionId; + uint16 _actionId; uint16 _transDuration; uint8 _transArea; // 1 - Whole Stage, 0 - Changing Area uint8 _transChunkSize;