[Scummvm-git-logs] scummvm master -> bf7d2584a43316cedbabe8e1216ecc1359813f34
rvanlaar
noreply at scummvm.org
Mon Aug 29 21:16:55 UTC 2022
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:
bf7d2584a4 DIRECTOR: add reading of kCastMovie cast data
Commit: bf7d2584a43316cedbabe8e1216ecc1359813f34
https://github.com/scummvm/scummvm/commit/bf7d2584a43316cedbabe8e1216ecc1359813f34
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2022-08-29T23:16:42+02:00
Commit Message:
DIRECTOR: add reading of kCastMovie cast data
CastMovie cast data is now parsed. A first step to implement
CastMovies.
CastMovies are references to other director movies and
can be played inside the current movie. Star Trek an interactive
manual makes use of them.
The flags raw data was:
100110 no flags
101110 sound
000110 loop
100100 crop
100101 crop and center
110110 enable scripts
011011 everything
Changed paths:
engines/director/cast.cpp
engines/director/castmember.cpp
engines/director/castmember.h
diff --git a/engines/director/cast.cpp b/engines/director/cast.cpp
index 6d85fdbf97e..f956981966b 100644
--- a/engines/director/cast.cpp
+++ b/engines/director/cast.cpp
@@ -1107,8 +1107,8 @@ void Cast::loadCastData(Common::SeekableReadStreamEndian &stream, uint16 id, Res
castInfoSize = 0;
break;
case kCastMovie:
- warning("BUILDBOT: STUB: Cast::loadCastData(): kCastMovie (id=%d, %d children)! This will be missing from the movie and may cause problems", id, res->children.size());
- castInfoSize = 0;
+ debugC(3, kDebugLoading, "Cast::loadCastData(): loading kCastMovie (id=%d, %d children)", id, res->children.size());
+ _loadedCast->setVal(id, new MovieCastMember(this, id, castStream, _version));
break;
default:
warning("Cast::loadCastData(): Unhandled cast type: %d [%s] (id=%d, %d children)! This will be missing from the movie and may cause problems", castType, tag2str(castType), id, res->children.size());
diff --git a/engines/director/castmember.cpp b/engines/director/castmember.cpp
index 926ccf801c7..d38b26a2111 100644
--- a/engines/director/castmember.cpp
+++ b/engines/director/castmember.cpp
@@ -923,6 +923,32 @@ void DigitalVideoCastMember::setFrameRate(int rate) {
warning("STUB: DigitalVideoCastMember::setFrameRate(%d)", rate);
}
+/////////////////////////////////////
+// MovieCasts
+/////////////////////////////////////
+
+MovieCastMember::MovieCastMember(Cast *cast, uint16 castId, Common::SeekableReadStreamEndian &stream, uint16 version)
+ : CastMember(cast, castId, stream) {
+ _type = kCastMovie;
+
+ _initialRect = Movie::readRect(stream);
+ _flags = stream.readUint32();
+
+ _looping = !(_flags & 0x20);
+ _enableScripts = _flags & 0x10;
+ _enableSound = _flags & 0x08;
+ _crop = !(_flags & 0x02);
+ _center = _flags & 0x01;
+
+ if (debugChannelSet(2, kDebugLoading))
+ _initialRect.debugPrint(2, "MovieCastMember(): rect:");
+ debugC(2, kDebugLoading, "MovieCastMember(): flags: (%d 0x%04x)", _flags, _flags);
+ debugC(2, kDebugLoading, "_looping: %d, _enableScripts %d, _enableSound: %d, _crop %d, _center: %d",
+ _looping, _enableScripts, _enableSound, _crop, _center);
+
+}
+
+
/////////////////////////////////////
// Film loops
/////////////////////////////////////
diff --git a/engines/director/castmember.h b/engines/director/castmember.h
index 7acf5567feb..ff21581c8d1 100644
--- a/engines/director/castmember.h
+++ b/engines/director/castmember.h
@@ -229,6 +229,18 @@ public:
Common::Array<Channel> _subchannels;
};
+class MovieCastMember : public CastMember {
+public:
+ MovieCastMember(Cast *cast, uint16 castId, Common::SeekableReadStreamEndian &stream, uint16 version);
+
+ uint32 _flags;
+ bool _looping;
+ bool _enableScripts;
+ bool _enableSound;
+ bool _crop;
+ bool _center;
+};
+
class SoundCastMember : public CastMember {
public:
SoundCastMember(Cast *cast, uint16 castId, Common::SeekableReadStreamEndian &stream, uint16 version);
More information about the Scummvm-git-logs
mailing list