[Scummvm-git-logs] scummvm master -> a78059e90ee6975e239a2c844b7a1f8bb2734d8c

sev- noreply at scummvm.org
Wed Jul 22 15:49:42 UTC 2026


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
a78059e90e DIRECTOR: Fix film loop D4 and D5+ behavior


Commit: a78059e90ee6975e239a2c844b7a1f8bb2734d8c
    https://github.com/scummvm/scummvm/commit/a78059e90ee6975e239a2c844b7a1f8bb2734d8c
Author: ramyak-sharma (ramyaksharma1 at gmail.com)
Date: 2026-07-22T17:49:37+02:00

Commit Message:
DIRECTOR: Fix film loop D4 and D5+ behavior

Film loops advanced every render tick regardless of playback state.
Now they freeze while the movie is paused (all versions), and in D4
while the playhead loops in a single frame (e.g. go the frame); D5
and later animate in that case.:Wq

Changed paths:
    engines/director/score.cpp
    engines/director/score.h


diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 53188d9726d..9bf147e9727 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -908,6 +908,16 @@ bool Score::renderTransition(uint16 frameId, RenderMode mode) {
 }
 
 void Score::incrementFilmLoops() {
+	// Film loops do not advance while the movie is paused
+	if (_window->_playbackPaused)
+		return;
+
+	// In D4, film loops also freeze while the playhead loops in a single
+	// frame, e.g. via go the frame. D5 and later animate in that case
+	if (_vm->getVersion() < 500 && _curFrameNumber == _filmLoopsLastFrame)
+		return;
+	_filmLoopsLastFrame = _curFrameNumber;
+
 	for (auto &it : _channels) {
 		if (it->_sprite->_cast && (it->_sprite->_cast->_type == kCastFilmLoop || it->_sprite->_cast->_type == kCastMovie)) {
 			FilmLoopCastMember *fl = ((FilmLoopCastMember *)it->_sprite->_cast);
diff --git a/engines/director/score.h b/engines/director/score.h
index 3abf9aba157..de8e5dc08ab 100644
--- a/engines/director/score.h
+++ b/engines/director/score.h
@@ -249,6 +249,9 @@ private:
 	int _currentLabel;
 	DirectorSound *_soundManager;
 
+	// score frame number at the last film loop advance
+	uint32 _filmLoopsLastFrame = 0;
+
 	int _previousBuildBotBuild = -1;
 	bool _firstRun = true;
 };




More information about the Scummvm-git-logs mailing list