[Scummvm-git-logs] scummvm master -> 5ce90b0bc72d4b05f7a06648fa9abec9d1b7448c
sev-
noreply at scummvm.org
Fri Jan 27 21:29:49 UTC 2023
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:
63a57c1ba3 DIRECTOR: Made fewframesonly count global frames.
5ce90b0bc7 DIRECTOR: Increased number of fewframesonly to 19
Commit: 63a57c1ba33a564488c87235859f7001dd8915ec
https://github.com/scummvm/scummvm/commit/63a57c1ba33a564488c87235859f7001dd8915ec
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-01-27T22:25:19+01:00
Commit Message:
DIRECTOR: Made fewframesonly count global frames.
If the movie is switching during the first few frames, we were
resetting the counter which led to buildbot hanging.
Changed paths:
engines/director/director.h
engines/director/lingo/lingo-builtins.cpp
engines/director/score.cpp
engines/director/score.h
engines/director/window.cpp
diff --git a/engines/director/director.h b/engines/director/director.h
index ef1ca7db74c..6c5fb31d1c0 100644
--- a/engines/director/director.h
+++ b/engines/director/director.h
@@ -284,6 +284,8 @@ private:
public:
int _tickBaseline;
Common::String _traceLogFile;
+
+ uint16 _framesRan = 0; // used by kDebugFewFramesOnly
};
// An extension of MacPlotData for interfacing with inks and patterns without
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index cc15196e19b..37f8561d120 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -2726,10 +2726,10 @@ void LB::b_updateStage(int nargs) {
g_director->draw();
if (debugChannelSet(-1, kDebugFewFramesOnly)) {
- score->_framesRan++;
- warning("LB::b_updateStage(): ran frame %0d", score->_framesRan);
+ g_director->_framesRan++;
+ warning("LB::b_updateStage(): ran frame %0d", g_director->_framesRan);
- if (score->_framesRan > 9) {
+ if (g_director->_framesRan > 9) {
warning("b_updateStage(): exiting due to debug few frames only");
score->_playState = kPlayStopped;
}
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index f757da98467..61fb2733a67 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -81,8 +81,6 @@ Score::Score(Movie *movie) {
_playState = kPlayNotStarted;
_numChannelsDisplayed = 0;
-
- _framesRan = 0; // used by kDebugFewFramesOnly and kDebugScreenshot
}
Score::~Score() {
@@ -296,11 +294,11 @@ void Score::step() {
update();
if (debugChannelSet(-1, kDebugFewFramesOnly) || debugChannelSet(-1, kDebugScreenshot)) {
- warning("Score::startLoop(): ran frame %0d", _framesRan);
- _framesRan++;
+ warning("Score::startLoop(): ran frame %0d", g_director->_framesRan);
+ g_director->_framesRan++;
}
- if (debugChannelSet(-1, kDebugFewFramesOnly) && _framesRan > 9) {
+ if (debugChannelSet(-1, kDebugFewFramesOnly) && g_director->_framesRan > 9) {
warning("Score::startLoop(): exiting due to debug few frames only");
_playState = kPlayStopped;
return;
@@ -993,7 +991,7 @@ void Score::screenShot() {
Common::String currentPath = _vm->getCurrentPath().c_str();
Common::replace(currentPath, Common::String(g_director->_dirSeparator), "-"); // exclude dir separator from screenshot filename prefix
Common::String prefix = Common::String::format("%s%s", currentPath.c_str(), _movie->getMacName().c_str());
- Common::String filename = dumpScriptName(prefix.c_str(), kMovieScript, _framesRan, "png");
+ Common::String filename = dumpScriptName(prefix.c_str(), kMovieScript, g_director->_framesRan, "png");
Common::DumpFile screenshotFile;
if (screenshotFile.open(filename)) {
diff --git a/engines/director/score.h b/engines/director/score.h
index 07953585b5e..70b43abe113 100644
--- a/engines/director/score.h
+++ b/engines/director/score.h
@@ -161,8 +161,6 @@ public:
int _numChannelsDisplayed;
- uint16 _framesRan; // used by kDebugFewFramesOnly
-
private:
DirectorEngine *_vm;
Lingo *_lingo;
diff --git a/engines/director/window.cpp b/engines/director/window.cpp
index 2c40a6ce021..d12aa016dcf 100644
--- a/engines/director/window.cpp
+++ b/engines/director/window.cpp
@@ -345,6 +345,9 @@ bool Window::step() {
}
}
+ if (debugChannelSet(-1, kDebugFewFramesOnly) && g_director->_framesRan > 9)
+ return false;
+
// prepare next movie
if (!_nextMovie.movie.empty()) {
if (!loadNextMovie())
Commit: 5ce90b0bc72d4b05f7a06648fa9abec9d1b7448c
https://github.com/scummvm/scummvm/commit/5ce90b0bc72d4b05f7a06648fa9abec9d1b7448c
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-01-27T22:29:21+01:00
Commit Message:
DIRECTOR: Increased number of fewframesonly to 19
Changed paths:
engines/director/lingo/lingo-builtins.cpp
engines/director/score.cpp
engines/director/types.h
engines/director/window.cpp
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp
index 37f8561d120..276045b18d0 100644
--- a/engines/director/lingo/lingo-builtins.cpp
+++ b/engines/director/lingo/lingo-builtins.cpp
@@ -2729,7 +2729,7 @@ void LB::b_updateStage(int nargs) {
g_director->_framesRan++;
warning("LB::b_updateStage(): ran frame %0d", g_director->_framesRan);
- if (g_director->_framesRan > 9) {
+ if (g_director->_framesRan > kFewFamesMaxCounter) {
warning("b_updateStage(): exiting due to debug few frames only");
score->_playState = kPlayStopped;
}
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 61fb2733a67..42a193e3ca4 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -298,7 +298,7 @@ void Score::step() {
g_director->_framesRan++;
}
- if (debugChannelSet(-1, kDebugFewFramesOnly) && g_director->_framesRan > 9) {
+ if (debugChannelSet(-1, kDebugFewFramesOnly) && g_director->_framesRan > kFewFamesMaxCounter) {
warning("Score::startLoop(): exiting due to debug few frames only");
_playState = kPlayStopped;
return;
diff --git a/engines/director/types.h b/engines/director/types.h
index c95bd5fa197..227160543d6 100644
--- a/engines/director/types.h
+++ b/engines/director/types.h
@@ -26,6 +26,10 @@ namespace Director {
#define CONTINUATION (0xAC)
+enum {
+ kFewFamesMaxCounter = 19,
+};
+
enum MovieFlag {
kMovieFlagAllowOutdatedLingo = (1 << 8)
};
diff --git a/engines/director/window.cpp b/engines/director/window.cpp
index d12aa016dcf..4f4b0039d07 100644
--- a/engines/director/window.cpp
+++ b/engines/director/window.cpp
@@ -345,7 +345,7 @@ bool Window::step() {
}
}
- if (debugChannelSet(-1, kDebugFewFramesOnly) && g_director->_framesRan > 9)
+ if (debugChannelSet(-1, kDebugFewFramesOnly) && g_director->_framesRan > kFewFamesMaxCounter)
return false;
// prepare next movie
More information about the Scummvm-git-logs
mailing list