[Scummvm-git-logs] scummvm master -> 122aeb0acaacc94ca3fbb91b5329046f77e93761
rvanlaar
roland at rolandvanlaar.nl
Sat Aug 15 20:25:01 UTC 2020
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
18b99bf796 DIRECTOR: Add endvideo debugflag for stopped video
122aeb0aca DIRECTOR: LINGO: Fix cast fetch
Commit: 18b99bf79675475a6ef3d6ebe4bca481d0c71af3
https://github.com/scummvm/scummvm/commit/18b99bf79675475a6ef3d6ebe4bca481d0c71af3
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2020-08-15T22:24:43+02:00
Commit Message:
DIRECTOR: Add endvideo debugflag for stopped video
The movieRate is checked in lingo code to see if the movie
is still running. Setting it to 0 signals the end of the movie.
This is usefull in Majestic to progress in the game.
Note: This flag can be removed once DigitalVideo is working.
Changed paths:
engines/director/director.cpp
engines/director/director.h
engines/director/lingo/lingo-the.cpp
diff --git a/engines/director/director.cpp b/engines/director/director.cpp
index bb1906fc2a..983ee998aa 100644
--- a/engines/director/director.cpp
+++ b/engines/director/director.cpp
@@ -62,6 +62,7 @@ DirectorEngine::DirectorEngine(OSystem *syst, const DirectorGameDescription *gam
DebugMan.addDebugChannel(kDebugScreenshot, "screenshot", "screenshot each frame");
DebugMan.addDebugChannel(kDebugDesktop, "desktop", "Show the Classic Mac desktop");
DebugMan.addDebugChannel(kDebug32bpp, "32bpp", "Work in 32bpp mode");
+ DebugMan.addDebugChannel(kDebugEndVideo, "endvideo", "Fake that the end of video is reached setting");
g_director = this;
diff --git a/engines/director/director.h b/engines/director/director.h
index 3c4a54bc94..8a6c7036a6 100644
--- a/engines/director/director.h
+++ b/engines/director/director.h
@@ -87,7 +87,8 @@ enum {
kDebugPreprocess = 1 << 13,
kDebugScreenshot = 1 << 14,
kDebugDesktop = 1 << 15,
- kDebug32bpp = 1 << 16
+ kDebug32bpp = 1 << 16,
+ kDebugEndVideo = 1 << 17,
};
struct MovieReference {
diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index c1ca8b0a20..1e8d13d4ba 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -1173,6 +1173,8 @@ Datum Lingo::getTheSprite(Datum &id1, int field) {
break;
case kTheMovieRate:
d.u.i = channel->_movieRate;
+ if (debugChannelSet(-1, kDebugEndVideo))
+ d.u.i = 0;
break;
case kTheMovieTime:
d.u.i = channel->_movieTime;
Commit: 122aeb0acaacc94ca3fbb91b5329046f77e93761
https://github.com/scummvm/scummvm/commit/122aeb0acaacc94ca3fbb91b5329046f77e93761
Author: Roland van Laar (roland at rolandvanlaar.nl)
Date: 2020-08-15T22:24:43+02:00
Commit Message:
DIRECTOR: LINGO: Fix cast fetch
The castId was cast to an int by asInt.
This broke when the Datum was of type CASTREF.
The Datum to castId is now done by castIdFetch.
Changed paths:
engines/director/lingo/lingo-the.cpp
diff --git a/engines/director/lingo/lingo-the.cpp b/engines/director/lingo/lingo-the.cpp
index 1e8d13d4ba..03f459cc87 100644
--- a/engines/director/lingo/lingo-the.cpp
+++ b/engines/director/lingo/lingo-the.cpp
@@ -1274,10 +1274,13 @@ void Lingo::setTheSprite(Datum &id1, int field, Datum &d) {
}
break;
case kTheCastNum:
- if (d.asInt() != sprite->_castId) {
- g_director->getCurrentWindow()->addDirtyRect(channel->getBbox());
- channel->setCast(d.asInt());
- channel->_dirty = true;
+ {
+ int castId = castIdFetch(d);
+ if (castId != sprite->_castId) {
+ g_director->getCurrentWindow()->addDirtyRect(channel->getBbox());
+ channel->setCast(castId);
+ channel->_dirty = true;
+ }
}
break;
case kTheConstraint:
@@ -1306,7 +1309,9 @@ void Lingo::setTheSprite(Datum &id1, int field, Datum &d) {
if (d.type == INT) {
channel->_cursor.readFromResource(d.asInt());
} else if (d.type == ARRAY && d.u.farr->size() == 2) {
- channel->_cursor.readFromCast(d.u.farr->operator[](0).asInt(), d.u.farr->operator[](1).asInt());
+ uint cursorId = castIdFetch(d.u.farr->operator[](0));
+ uint maskId = castIdFetch(d.u.farr->operator[](1));
+ channel->_cursor.readFromCast(cursorId, maskId);
}
break;
case kTheEditableText:
More information about the Scummvm-git-logs
mailing list