[Scummvm-git-logs] scummvm master -> 6d58b72d07e49d0dd37f9ce327a598d8955cb3d7
moralrecordings
code at moral.net.au
Sat Jul 11 16:06:57 UTC 2020
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:
6d58b72d07 DIRECTOR: Attach digital video cast fields
Commit: 6d58b72d07e49d0dd37f9ce327a598d8955cb3d7
https://github.com/scummvm/scummvm/commit/6d58b72d07e49d0dd37f9ce327a598d8955cb3d7
Author: Scott Percival (code at moral.net.au)
Date: 2020-07-12T00:00:29+08:00
Commit Message:
DIRECTOR: Attach digital video cast fields
Changed paths:
engines/director/castmember.cpp
engines/director/castmember.h
engines/director/lingo/lingo-the.cpp
diff --git a/engines/director/castmember.cpp b/engines/director/castmember.cpp
index 276836e555..f2ca04fc23 100644
--- a/engines/director/castmember.cpp
+++ b/engines/director/castmember.cpp
@@ -229,16 +229,16 @@ DigitalVideoCastMember::DigitalVideoCastMember(Cast *cast, uint16 castId, Common
_preload = false;
_enableVideo = false;
- _pauseAtStart = false;
+ _pausedAtStart = false;
_showControls = false;
_looping = false;
_enableSound = false;
- _enableCrop = false;
+ _crop = false;
_center = false;
+ _directToStage = true;
} else {
- for (int i = 0; i < 5; i++) {
- stream.readUint16();
- }
+ stream.readByte();
+ _initialRect = Movie::readRect(stream);
_frameRate = stream.readByte();
stream.readByte();
@@ -249,17 +249,22 @@ DigitalVideoCastMember::DigitalVideoCastMember(Cast *cast, uint16 castId, Common
}
_preload = flags1 & 0x04;
_enableVideo = !(flags1 & 0x02);
- _pauseAtStart = flags1 & 0x01;
+ _pausedAtStart = flags1 & 0x01;
byte flags2 = stream.readByte();
_showControls = flags2 & 0x40;
_looping = flags2 & 0x10;
_enableSound = flags2 & 0x08;
- _enableCrop = !(flags2 & 0x02);
+ _crop = !(flags2 & 0x02);
_center = flags2 & 0x01;
+ _directToStage = true;
}
}
+DigitalVideoCastMember::~DigitalVideoCastMember() {
+
+}
+
SoundCastMember::SoundCastMember(Cast *cast, uint16 castId, Common::ReadStreamEndian &stream, uint16 version)
: CastMember(cast, castId) {
_type = kCastSound;
diff --git a/engines/director/castmember.h b/engines/director/castmember.h
index c87af64606..fe5dc5d63b 100644
--- a/engines/director/castmember.h
+++ b/engines/director/castmember.h
@@ -112,15 +112,17 @@ public:
class DigitalVideoCastMember : public CastMember {
public:
DigitalVideoCastMember(Cast *cast, uint16 castId, Common::ReadStreamEndian &stream, uint16 version);
+ ~DigitalVideoCastMember();
bool _looping;
- bool _pauseAtStart;
+ bool _pausedAtStart;
bool _enableVideo;
bool _enableSound;
- bool _enableCrop;
+ bool _crop;
bool _center;
bool _preload;
bool _showControls;
+ bool _directToStage;
FrameRateType _frameRateType;
uint16 _frameRate;
diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index 49c9491ac3..2b97e7c49e 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -1347,19 +1347,35 @@ Datum Lingo::getTheCast(Datum &id1, int field) {
d.u.i = castType;
break;
case kTheCenter:
- warning("STUB: Lingo::getTheCast(): Unprocessed getting field \"%s\" of cast %d", field2str(field), id);
+ if (castType == kCastDigitalVideo) {
+ d.u.i = ((DigitalVideoCastMember *)member)->_center ? 1 : 0;
+ } else {
+ warning("Lingo::getTheCast(): Unsupported getting kCastDigitalVideo field \"%s\" of cast %d", field2str(field), id);
+ }
break;
case kTheController:
- warning("STUB: Lingo::getTheCast(): Unprocessed getting field \"%s\" of cast %d", field2str(field), id);
+ if (castType == kCastDigitalVideo) {
+ d.u.i = ((DigitalVideoCastMember *)member)->_showControls ? 1 : 0;
+ } else {
+ warning("Lingo::getTheCast(): Unsupported getting kCastDigitalVideo field \"%s\" of cast %d", field2str(field), id);
+ }
break;
case kTheCrop:
- warning("STUB: Lingo::getTheCast(): Unprocessed getting field \"%s\" of cast %d", field2str(field), id);
+ if (castType == kCastDigitalVideo) {
+ d.u.i = ((DigitalVideoCastMember *)member)->_crop ? 1 : 0;
+ } else {
+ warning("Lingo::getTheCast(): Unsupported getting kCastDigitalVideo field \"%s\" of cast %d", field2str(field), id);
+ }
break;
case kTheDepth:
warning("STUB: Lingo::getTheCast(): Unprocessed getting field \"%s\" of cast %d", field2str(field), id);
break;
case kTheDirectToStage:
- warning("STUB: Lingo::getTheCast(): Unprocessed getting field \"%s\" of cast %d", field2str(field), id);
+ if (castType == kCastDigitalVideo) {
+ d.u.i = ((DigitalVideoCastMember *)member)->_directToStage ? 1 : 0;
+ } else {
+ warning("Lingo::getTheCast(): Unsupported getting kCastDigitalVideo field \"%s\" of cast %d", field2str(field), id);
+ }
break;
case kTheDuration:
warning("STUB: Lingo::getTheCast(): Unprocessed getting field \"%s\" of cast %d", field2str(field), id);
@@ -1371,7 +1387,11 @@ Datum Lingo::getTheCast(Datum &id1, int field) {
d.u.i = member->getForeColor();
break;
case kTheFrameRate:
- warning("STUB: Lingo::getTheCast(): Unprocessed getting field \"%s\" of cast %d", field2str(field), id);
+ if (castType == kCastDigitalVideo) {
+ d.u.i = ((DigitalVideoCastMember *)member)->_frameRate;
+ } else {
+ warning("Lingo::getTheCast(): Unsupported getting kCastDigitalVideo field \"%s\" of cast %d", field2str(field), id);
+ }
break;
case kTheHeight:
d.u.i = cast->getCastMemberInitialRect(id).height();
@@ -1383,7 +1403,11 @@ Datum Lingo::getTheCast(Datum &id1, int field) {
d.u.i = 1; //Not loaded handled above
break;
case kTheLoop:
- warning("STUB: Lingo::getTheCast(): Unprocessed getting field \"%s\" of cast %d", field2str(field), id);
+ if (castType == kCastDigitalVideo) {
+ d.u.i = ((DigitalVideoCastMember *)member)->_looping ? 1 : 0;
+ } else {
+ warning("Lingo::getTheCast(): Unsupported getting kCastDigitalVideo field \"%s\" of cast %d", field2str(field), id);
+ }
break;
case kTheModified:
warning("STUB: Lingo::getTheCast(): Unprocessed getting field \"%s\" of cast %d", field2str(field), id);
@@ -1395,10 +1419,18 @@ Datum Lingo::getTheCast(Datum &id1, int field) {
d.u.i = id;
break;
case kThePausedAtStart:
- warning("STUB: Lingo::getTheCast(): Unprocessed getting field \"%s\" of cast %d", field2str(field), id);
+ if (castType == kCastDigitalVideo) {
+ d.u.i = ((DigitalVideoCastMember *)member)->_pausedAtStart ? 1 : 0;
+ } else {
+ warning("Lingo::getTheCast(): Unsupported getting kCastDigitalVideo field \"%s\" of cast %d", field2str(field), id);
+ }
break;
case kThePreLoad:
- warning("STUB: Lingo::getTheCast(): Unprocessed getting field \"%s\" of cast %d", field2str(field), id);
+ if (castType == kCastDigitalVideo) {
+ d.u.i = ((DigitalVideoCastMember *)member)->_preload ? 1 : 0;
+ } else {
+ warning("Lingo::getTheCast(): Unsupported getting kCastDigitalVideo field \"%s\" of cast %d", field2str(field), id);
+ }
break;
case kTheRect:
warning("STUB: Lingo::getTheCast(): Unprocessed getting field \"%s\" of cast %d", field2str(field), id);
@@ -1422,7 +1454,11 @@ Datum Lingo::getTheCast(Datum &id1, int field) {
warning("STUB: Lingo::getTheCast(): Unprocessed getting field \"%s\" of cast %d", field2str(field), id);
break;
case kTheSound:
- warning("STUB: Lingo::getTheCast(): Unprocessed getting field \"%s\" of cast %d", field2str(field), id);
+ if (castType == kCastDigitalVideo) {
+ d.u.i = ((DigitalVideoCastMember *)member)->_enableSound ? 1 : 0;
+ } else {
+ warning("Lingo::getTheCast(): Unsupported getting kCastDigitalVideo field \"%s\" of cast %d", field2str(field), id);
+ }
break;
case kTheText:
{
@@ -1440,7 +1476,11 @@ Datum Lingo::getTheCast(Datum &id1, int field) {
}
break;
case kTheVideo:
- warning("STUB: Lingo::getTheCast(): Unprocessed getting field \"%s\" of cast %d", field2str(field), id);
+ if (castType == kCastDigitalVideo) {
+ d.u.i = ((DigitalVideoCastMember *)member)->_enableVideo ? 1 : 0;
+ } else {
+ warning("Lingo::getTheCast(): Unsupported getting kCastDigitalVideo field \"%s\" of cast %d", field2str(field), id);
+ }
break;
case kTheWidth:
d.u.i = cast->getCastMemberInitialRect(id).width();
@@ -1489,19 +1529,35 @@ void Lingo::setTheCast(Datum &id1, int field, Datum &d) {
//cast->modified = 1;
break;
case kTheCenter:
- warning("STUB: Lingo::setTheCast(): Unprocessed setting field \"%s\" of cast %d", field2str(field), id);
+ if (castType == kCastDigitalVideo) {
+ ((DigitalVideoCastMember *)member)->_center = (bool)d.asInt();
+ } else {
+ warning("Lingo::setTheCast(): Unsupported setting kCastDigitalVideo field \"%s\" of cast %d", field2str(field), id);
+ }
break;
case kTheController:
- warning("STUB: Lingo::setTheCast(): Unprocessed setting field \"%s\" of cast %d", field2str(field), id);
+ if (castType == kCastDigitalVideo) {
+ ((DigitalVideoCastMember *)member)->_showControls = (bool)d.asInt();
+ } else {
+ warning("Lingo::setTheCast(): Unsupported setting kCastDigitalVideo field \"%s\" of cast %d", field2str(field), id);
+ }
break;
case kTheCrop:
- warning("STUB: Lingo::setTheCast(): Unprocessed setting field \"%s\" of cast %d", field2str(field), id);
+ if (castType == kCastDigitalVideo) {
+ ((DigitalVideoCastMember *)member)->_crop = (bool)d.asInt();
+ } else {
+ warning("Lingo::setTheCast(): Unsupported setting kCastDigitalVideo field \"%s\" of cast %d", field2str(field), id);
+ }
break;
case kTheDepth:
warning("STUB: Lingo::setTheCast(): Unprocessed setting field \"%s\" of cast %d", field2str(field), id);
break;
case kTheDirectToStage:
- warning("STUB: Lingo::setTheCast(): Unprocessed setting field \"%s\" of cast %d", field2str(field), id);
+ if (castType == kCastDigitalVideo) {
+ ((DigitalVideoCastMember *)member)->_directToStage = (bool)d.asInt();
+ } else {
+ warning("Lingo::setTheCast(): Unsupported setting kCastDigitalVideo field \"%s\" of cast %d", field2str(field), id);
+ }
break;
case kTheDuration:
warning("STUB: Lingo::setTheCast(): Unprocessed setting field \"%s\" of cast %d", field2str(field), id);
@@ -1520,7 +1576,11 @@ void Lingo::setTheCast(Datum &id1, int field, Datum &d) {
break;
}
case kTheFrameRate:
- warning("STUB: Lingo::setTheCast(): Unprocessed setting field \"%s\" of cast %d", field2str(field), id);
+ if (castType == kCastDigitalVideo) {
+ ((DigitalVideoCastMember *)member)->_frameRate = (bool)d.asInt();
+ } else {
+ warning("Lingo::setTheCast(): Unsupported setting kCastDigitalVideo field \"%s\" of cast %d", field2str(field), id);
+ }
break;
case kTheHeight:
cast->getCastMemberInitialRect(id).setHeight(d.asInt());
@@ -1539,7 +1599,11 @@ void Lingo::setTheCast(Datum &id1, int field, Datum &d) {
}
break;
case kTheLoop:
- warning("STUB: Lingo::setTheCast(): Unprocessed setting field \"%s\" of cast %d", field2str(field), id);
+ if (castType == kCastDigitalVideo) {
+ ((DigitalVideoCastMember *)member)->_looping = (bool)d.asInt();
+ } else {
+ warning("Lingo::setTheCast(): Unsupported setting kCastDigitalVideo field \"%s\" of cast %d", field2str(field), id);
+ }
break;
case kTheName:
if (!castInfo) {
@@ -1549,10 +1613,18 @@ void Lingo::setTheCast(Datum &id1, int field, Datum &d) {
castInfo->name = d.asString();
break;
case kThePausedAtStart:
- warning("STUB: Lingo::setTheCast(): Unprocessed setting field \"%s\" of cast %d", field2str(field), id);
+ if (castType == kCastDigitalVideo) {
+ ((DigitalVideoCastMember *)member)->_pausedAtStart = (bool)d.asInt();
+ } else {
+ warning("Lingo::setTheCast(): Unsupported setting kCastDigitalVideo field \"%s\" of cast %d", field2str(field), id);
+ }
break;
case kThePreLoad:
- warning("STUB: Lingo::setTheCast(): Unprocessed setting field \"%s\" of cast %d", field2str(field), id);
+ if (castType == kCastDigitalVideo) {
+ ((DigitalVideoCastMember *)member)->_preload = (bool)d.asInt();
+ } else {
+ warning("Lingo::setTheCast(): Unsupported setting kCastDigitalVideo field \"%s\" of cast %d", field2str(field), id);
+ }
break;
case kTheRect:
warning("STUB: Lingo::setTheCast(): Unprocessed setting field \"%s\" of cast %d", field2str(field), id);
@@ -1578,7 +1650,11 @@ void Lingo::setTheCast(Datum &id1, int field, Datum &d) {
castInfo->script = d.asString();
break;
case kTheSound:
- warning("STUB: Lingo::setTheCast(): Unprocessed setting field \"%s\" of cast %d", field2str(field), id);
+ if (castType == kCastDigitalVideo) {
+ ((DigitalVideoCastMember *)member)->_enableSound = (bool)d.asInt();
+ } else {
+ warning("Lingo::setTheCast(): Unsupported setting kCastDigitalVideo field \"%s\" of cast %d", field2str(field), id);
+ }
break;
case kTheText:
if (castType == kCastText) {
@@ -1593,7 +1669,11 @@ void Lingo::setTheCast(Datum &id1, int field, Datum &d) {
}
break;
case kTheVideo:
- warning("STUB: Lingo::setTheCast(): Unprocessed setting field \"%s\" of cast %d", field2str(field), id);
+ if (castType == kCastDigitalVideo) {
+ ((DigitalVideoCastMember *)member)->_enableVideo = (bool)d.asInt();
+ } else {
+ warning("Lingo::setTheCast(): Unsupported setting kCastDigitalVideo field \"%s\" of cast %d", field2str(field), id);
+ }
break;
case kTheWidth:
cast->getCastMemberInitialRect(id).setWidth(d.asInt());
More information about the Scummvm-git-logs
mailing list