[Scummvm-git-logs] scummvm master -> 340c91c496dd8428cbac00c3af3bbe982131bedc

antoniou79 noreply at scummvm.org
Tue Feb 3 23:24:32 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:
340c91c496 MYST3: Remove hack for autocorrecting looping scripted movies


Commit: 340c91c496dd8428cbac00c3af3bbe982131bedc
    https://github.com/scummvm/scummvm/commit/340c91c496dd8428cbac00c3af3bbe982131bedc
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2026-02-04T01:24:22+02:00

Commit Message:
MYST3: Remove hack for autocorrecting looping scripted movies

This code had side-effects on other videos, that were not spotted earlier

Instead, the special case that worked with the code is explicitly hardcoded to use 0 as startframe

Changed paths:
    engines/myst3/movie.cpp


diff --git a/engines/myst3/movie.cpp b/engines/myst3/movie.cpp
index 499896eab35..0526cb96639 100644
--- a/engines/myst3/movie.cpp
+++ b/engines/myst3/movie.cpp
@@ -285,17 +285,7 @@ void ScriptedMovie::update(bool pauseAtFirstFrame) {
 
 	uint32 frameCount = _bink.getFrameCount();
 	if (!effectiveEndFrame || (uint32)effectiveEndFrame >= frameCount) {
-		if ((uint32)effectiveEndFrame == frameCount) {
-			// A special case: if endFrame is equal to frameCount, decrease it by 1,
-			// but also decrease startFrame by 1 (if it wasn't explicitly set by startFrameVar)
-			// Example case: the looping movie 13011 of the swiming jellyfish at node LIFO 11
-			--effectiveEndFrame;
-			if (!_startFrameVar && effectiveStartFrame > 0) {
-				--effectiveStartFrame;
-			}
-		} else {
-			effectiveEndFrame = frameCount - 1;
-		}
+		effectiveEndFrame = frameCount - 1;
 	}
 
 	if (!_startFrameVar && effectiveStartFrame > 0) {
@@ -306,6 +296,11 @@ void ScriptedMovie::update(bool pauseAtFirstFrame) {
 		effectiveStartFrame = effectiveEndFrame;
 	}
 
+	if (getId() == 13011) {
+		// Special case for the looping movie 13011 of the looping swiming jellyfish at node LIFO 11
+		effectiveStartFrame = 0;
+	}
+
 	if (_posUVar) {
 		_posU = _vm->_state->getVar(_posUVar);
 	}
@@ -369,7 +364,6 @@ void ScriptedMovie::update(bool pauseAtFirstFrame) {
 
 		updateVolume();
 
-		bool drawnAFrame = false; // not taking into account the first frame when enabling the movie (intentional)
 		if (_nextFrameReadVar) {
 			int32 nextFrame = _vm->_state->getVar(_nextFrameReadVar);
 			if (nextFrame > 0 && nextFrame <= (int32)_bink.getFrameCount()) {
@@ -392,7 +386,6 @@ void ScriptedMovie::update(bool pauseAtFirstFrame) {
 						}
 					}
 					drawNextFrameToTexture();
-					drawnAFrame = true;
 				}
 
 				_vm->_state->setVar(_nextFrameReadVar, 0);
@@ -400,7 +393,7 @@ void ScriptedMovie::update(bool pauseAtFirstFrame) {
 			}
 		}
 
-		if (!drawnAFrame && !_scriptDriven && (_bink.needsUpdate() || _isLastFrame)) {
+		if (!_scriptDriven && (_bink.needsUpdate() || _isLastFrame)) {
 			bool complete = false;
 
 			if (_isLastFrame) {




More information about the Scummvm-git-logs mailing list