[Scummvm-git-logs] scummvm master -> 58185c565459cdea0d24cb2f3255778add9c9c9f

AndywinXp noreply at scummvm.org
Sun Jan 15 21:20:10 UTC 2023


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:
58185c5654 SCUMM: SMUSH: Extend dynamic video framerate changes to all games


Commit: 58185c565459cdea0d24cb2f3255778add9c9c9f
    https://github.com/scummvm/scummvm/commit/58185c565459cdea0d24cb2f3255778add9c9c9f
Author: AndywinXp (andywinxp at gmail.com)
Date: 2023-01-15T22:20:01+01:00

Commit Message:
SCUMM: SMUSH: Extend dynamic video framerate changes to all games

This has been verified from disasm, and also removes the need for
another old workaround.

Changed paths:
    engines/scumm/script_v6.cpp
    engines/scumm/scumm.cpp
    engines/scumm/smush/smush_player.cpp


diff --git a/engines/scumm/script_v6.cpp b/engines/scumm/script_v6.cpp
index 15d6081ca6b..3e3265d0571 100644
--- a/engines/scumm/script_v6.cpp
+++ b/engines/scumm/script_v6.cpp
@@ -2630,9 +2630,6 @@ void ScummEngine_v7::o6_kernelSetFunctions() {
 				if ((_game.id == GID_FT) && (_game.features & GF_DEMO) && (_game.platform == Common::kPlatformMacintosh) &&
 					(!strcmp(videoname, "jumpgorge.san")))
 					_splayer->play("jumpgorg.san", _smushFrameRate);
-				// WORKAROUND: A faster frame rate is required, to keep audio/video in sync in this video
-				else if (_game.id == GID_DIG && !strcmp(videoname, "sq3.san"))
-					_splayer->play(videoname, 14);
 				else
 					_splayer->play(videoname, _smushFrameRate);
 
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index ee613010b0d..e13c4709323 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1430,6 +1430,8 @@ void ScummEngine_v7::setupScumm(const Common::String &macResourceFile) {
 		}
 	}
 
+	// This is just an initialization, most SMUSH videos do have
+	// their own framerate value embedded in their ANIM header...
 	_smushFrameRate = (_game.id == GID_FT) ? 10 : 12;
 
 	ScummEngine::setupScumm(macResourceFile);
diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp
index 310bd2a453c..e5901c6c3c8 100644
--- a/engines/scumm/smush/smush_player.cpp
+++ b/engines/scumm/smush/smush_player.cpp
@@ -952,18 +952,16 @@ void SmushPlayer::handleAnimHeader(int32 subSize, Common::SeekableReadStream &b)
 		_nbframes = READ_LE_UINT16(&headerContent[2]);
 
 		// Video files might contain framerate overrides
-		if (_vm->_game.id == GID_FT || (_vm->_game.id == GID_DIG && _vm->_game.features & GF_DEMO)) {
-			if (headerMajorVersion > 1) {
-				uint16 speed = READ_LE_UINT16(&headerContent[6 + 0x300]);
-				if ((_curVideoFlags & 8) == 0 && speed != 0) {
-					debug(5, "SmushPlayer::handleAnimHeader(): header version %d.%d, video speed override %d fps (cur speed %d)",
-						  headerMajorVersion,
-						  headerMinorVersion,
-						  speed,
-						  _speed);
-
-					_speed = speed;
-				}
+		if (headerMajorVersion > 1) {
+			uint16 speed = READ_LE_UINT16(&headerContent[6 + 0x300]);
+			if ((_curVideoFlags & 8) == 0 && speed != 0) {
+				debug(5, "SmushPlayer::handleAnimHeader(): header version %d.%d, video speed override %d fps (cur speed %d)",
+						headerMajorVersion,
+						headerMinorVersion,
+						speed,
+						_speed);
+
+				_speed = speed;
 			}
 		}
 




More information about the Scummvm-git-logs mailing list