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

moralrecordings noreply at scummvm.org
Fri Oct 2 16:35:53 UTC 2026


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

Summary:
6762845f1f DIRECTOR: Fix memory leak
7e81f433ed DIRECTOR: Apply _nextMovie frame jump if movie is the same
6cd3203fbc DIRECTOR: Process film loop cast header in D3
1168230e23 DIRECTOR: Fix subchannel scaling when resizing film loops
c7b7040033 DIRECTOR: Fix filmloop sprite position when placed by a script
e9f2d59d00 DIRECTOR: Enable sound1Changed/sound2Changed for D5


Commit: 6762845f1faf47b77c8ea4ce2fe1e2febc668e5a
    https://github.com/scummvm/scummvm/commit/6762845f1faf47b77c8ea4ce2fe1e2febc668e5a
Author: Scott Percival (code at moral.net.au)
Date: 2026-10-03T00:35:45+08:00

Commit Message:
DIRECTOR: Fix memory leak

Changed paths:
    engines/director/resource.cpp


diff --git a/engines/director/resource.cpp b/engines/director/resource.cpp
index 89ad17e2c71..32f6106d813 100644
--- a/engines/director/resource.cpp
+++ b/engines/director/resource.cpp
@@ -155,11 +155,11 @@ void Window::probeResources(Archive *archive) {
 			int num = name->readUint16();
 			if (num < 2) {
 				warning("Window::probeResources: Missing data in the Filenames resource of the Projector file");
-				delete name;
 			} else {
 				_soundsFilenameHint = decodePlatformEncoding(name->readPascalString());
 				_sharedCastFilenameHint = decodePlatformEncoding(name->readPascalString());
 			}
+			delete name;
 		}
 
 		if (archive->hasResource(MKTAG('S', 'T', 'R', '#'), 0)) {


Commit: 7e81f433ed544b83b9b5ac1a7b6638435b90ef7c
    https://github.com/scummvm/scummvm/commit/7e81f433ed544b83b9b5ac1a7b6638435b90ef7c
Author: Scott Percival (code at moral.net.au)
Date: 2026-10-03T00:35:45+08:00

Commit Message:
DIRECTOR: Apply _nextMovie frame jump if movie is the same

Fixes clicking "New Game" twice in easternmind JP; before this would
stop the movie, take no action on the movie change, and lead to ScummVM quitting.

Changed paths:
    engines/director/window.cpp


diff --git a/engines/director/window.cpp b/engines/director/window.cpp
index 4939cb02348..1fb728f394d 100644
--- a/engines/director/window.cpp
+++ b/engines/director/window.cpp
@@ -610,6 +610,19 @@ bool Window::loadNextMovie() {
 
 	if (_currentMovie && archivePath == _currentMovie->getArchive()->getPathName()) {
 		debug(0, "Window::loadNextMovie: next movie '%s' is the same as current movie, skipping load", archivePath.toString(Common::Path::kNativeSeparator).c_str());
+
+		// Jump to the correct frame
+		_currentMovie->getScore()->_playState = kPlayStarted;
+		_nextMovie.movie.clear();
+		if (!_nextMovie.frameS.empty()) {
+			_currentMovie->getScore()->setStartToLabel(_nextMovie.frameS);
+			_nextMovie.frameS.clear();
+		}
+
+		if (_nextMovie.frameI != -1) {
+			_currentMovie->getScore()->setCurrentFrame(_nextMovie.frameI);
+			_nextMovie.frameI = -1;
+		}
 		return true;
 	}
 


Commit: 6cd3203fbcc7fc257a5b442842b35429f94b38f5
    https://github.com/scummvm/scummvm/commit/6cd3203fbcc7fc257a5b442842b35429f94b38f5
Author: Scott Percival (code at moral.net.au)
Date: 2026-10-03T00:35:45+08:00

Commit Message:
DIRECTOR: Process film loop cast header in D3

Fixes missing animations in easternmind JP.

Changed paths:
    engines/director/castmember/filmloop.cpp


diff --git a/engines/director/castmember/filmloop.cpp b/engines/director/castmember/filmloop.cpp
index 3b700f6a6fd..b92a4c073f9 100644
--- a/engines/director/castmember/filmloop.cpp
+++ b/engines/director/castmember/filmloop.cpp
@@ -51,7 +51,7 @@ FilmLoopCastMember::FilmLoopCastMember(Cast *cast, uint16 castId, Common::Seekab
 	_score = nullptr;
 	_flags = 0;
 
-	if (cast->_version >= kFileVer400) {
+	if (cast->_version >= kFileVer300) {
 		_initialRect = Movie::readRect(stream);
 		_flags = stream.readUint32BE();
 		uint16 unk1 = stream.readUint16BE();
@@ -60,7 +60,7 @@ FilmLoopCastMember::FilmLoopCastMember(Cast *cast, uint16 castId, Common::Seekab
 		_crop = _flags & 2 ? 0 : 1;
 		_center = _flags & 1 ? 1 : 0;
 
-		debugC(5, kDebugLoading, "FilmLoopCastMember::FilmLoopCastMember(): flags: %d, unk1: %d, looping: %d, enableSound: %d, crop: %d, center: %d", _flags, unk1, _looping, _enableSound, _crop, _center);
+		debugC(5, kDebugLoading, "FilmLoopCastMember::FilmLoopCastMember(): initialRect: %s, flags: %d, unk1: %d, looping: %d, enableSound: %d, crop: %d, center: %d", _initialRect.toString().c_str(), _flags, unk1, _looping, _enableSound, _crop, _center);
 	}
 }
 


Commit: 1168230e236c5d261d025951d3b1da7ebbb57fad
    https://github.com/scummvm/scummvm/commit/1168230e236c5d261d025951d3b1da7ebbb57fad
Author: Scott Percival (code at moral.net.au)
Date: 2026-10-03T00:35:45+08:00

Commit Message:
DIRECTOR: Fix subchannel scaling when resizing film loops

Fixes D3-mac/filmloop-d3 and D4-mac/filmloop-d4 in director-tests.

Changed paths:
    engines/director/castmember/filmloop.cpp


diff --git a/engines/director/castmember/filmloop.cpp b/engines/director/castmember/filmloop.cpp
index b92a4c073f9..4e8445f2150 100644
--- a/engines/director/castmember/filmloop.cpp
+++ b/engines/director/castmember/filmloop.cpp
@@ -105,7 +105,6 @@ bool FilmLoopCastMember::isModified() {
 }
 
 Common::Array<Channel> *FilmLoopCastMember::getSubChannels(Common::Rect &bbox, uint frame) {
-	Common::Rect widgetRect(bbox.width() ? bbox.width() : _initialRect.width(), bbox.height() ? bbox.height() : _initialRect.height());
 
 	_subchannels.clear();
 
@@ -153,19 +152,20 @@ Common::Array<Channel> *FilmLoopCastMember::getSubChannels(Common::Rect &bbox, u
 				src._startPoint.x, src._startPoint.y, src._width, src._height);
 
 		// translate sprite relative to the global bounding box
+		Common::Point widgetDelta(src._startPoint.x - _initialRect.left, src._startPoint.y - _initialRect.top);
 		if (needToScale) {
-			src._startPoint.x = (src._startPoint.x - _initialRect.left) * scaleX + bbox.left;
-			src._startPoint.y = (src._startPoint.y - _initialRect.top) * scaleY + bbox.top;
-			src._width = widgetRect.width();
-			src._height = widgetRect.height();
+			src._startPoint.x = widgetDelta.x * scaleX + bbox.left;
+			src._startPoint.y = widgetDelta.y * scaleY + bbox.top;
+			src._width = src._width * scaleX;
+			src._height = src._height * scaleY;
 			src._stretch = true;
 
-			debugCN(5, kDebugImages, ", scaled: %d,%d %dx%d", src._startPoint.x, src._startPoint.y, src._width, src._height);
+			debugC(5, kDebugImages, ", scaled: %d,%d %dx%d", src._startPoint.x, src._startPoint.y, src._width, src._height);
 		} else {
-			src._startPoint.x = (src._startPoint.x - _initialRect.left) + bbox.left;
-			src._startPoint.y = (src._startPoint.y - _initialRect.top) + bbox.top;
+			src._startPoint.x = widgetDelta.x + bbox.left;
+			src._startPoint.y = widgetDelta.y + bbox.top;
 
-			debugCN(5, kDebugImages, ", no scaling");
+			debugC(5, kDebugImages, ", no scaling");
 		}
 
 		// Film loop frames are constructed as a series of Channels, much like how a normal frame


Commit: c7b7040033b9e77fa97a90db3d96516a4bc23615
    https://github.com/scummvm/scummvm/commit/c7b7040033b9e77fa97a90db3d96516a4bc23615
Author: Scott Percival (code at moral.net.au)
Date: 2026-10-03T00:35:45+08:00

Commit Message:
DIRECTOR: Fix filmloop sprite position when placed by a script

This reverts commit ab9df75abae1c122491667230bcc3f8d9b353190.
My guess is this is no longer required now subchannel scaling works as
expected.

Fixes clicking the nose and mouth of the big head in easternmind.
Confirmed to work with shotgal.dir in guscarn.

Changed paths:
    engines/director/channel.cpp


diff --git a/engines/director/channel.cpp b/engines/director/channel.cpp
index cbb512c10c3..8f53c3dc97a 100644
--- a/engines/director/channel.cpp
+++ b/engines/director/channel.cpp
@@ -474,9 +474,6 @@ void Channel::setCast(CastMemberID memberID) {
 
 	bool hasChanged = _sprite->_castId != memberID;
 
-	// Save bbox before swapping cast so we can restore visual position afterward.
-	Common::Rect oldBbox = getBbox();
-
 	// Replace the cast member in the sprite.
 	// Only change the dimensions if the "stretch" flag is set,
 	// indicating that the sprite has already been warped away from cast
@@ -485,14 +482,6 @@ void Channel::setCast(CastMemberID memberID) {
 	// those custom dimensions to stick around.
 	_sprite->setCast(memberID, !_sprite->_stretch);
 
-	// If the new cast member is a film loop, adjust _startPoint so the sprite
-	// stays at the same visual position regardless of registration offset changes.
-	if (hasChanged && _sprite->_cast && _sprite->_cast->_type == kCastFilmLoop) {
-		Common::Rect newBbox = getBbox();
-		_sprite->_startPoint.x += oldBbox.left - newBbox.left;
-		_sprite->_startPoint.y += oldBbox.top - newBbox.top;
-	}
-
 	// Duplicate of the special cases in setClean.
 	// Maybe it makes sense to force setClean to use setCast instead?
 	if (hasChanged && _sprite->_cast) {


Commit: e9f2d59d0013867decb7ba6fbd0f541a71e8f4e8
    https://github.com/scummvm/scummvm/commit/e9f2d59d0013867decb7ba6fbd0f541a71e8f4e8
Author: Scott Percival (code at moral.net.au)
Date: 2026-10-03T00:35:45+08:00

Commit Message:
DIRECTOR: Enable sound1Changed/sound2Changed for D5

Fixes various background audio loops from stuttering (e.g. the horse stables) in Noir.

Changed paths:
    engines/director/score.cpp


diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index f8040863507..a7641db0ff7 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -782,7 +782,7 @@ void Score::update() {
 	bool sound1Changed = true;
 	bool sound2Changed = true;
 
-	if (_version >= kFileVer600 && !_firstRun) {
+	if (_version >= kFileVer500 && !_firstRun) {
 		// We check if the sound channels have changed, and only restart
 		// the sound if they have. Even if the sound was stopped
 		//
@@ -1864,9 +1864,10 @@ void Score::playSoundChannel(bool puppetOnly, bool sound1Changed, bool sound2Cha
 		}
 	}
 
-	debugC(5, kDebugSound, "Score::playSoundChannel(): Sound1: %s puppet: %d type: %d, volume: %d, Sound2: %s puppet: %d, type: %d, volume: %d",
-			sound1.asString().c_str(), sound->isChannelPuppet(1), _currentFrame->_mainChannels.soundType1, sound->getChannelVolume(1),
-			sound2.asString().c_str(), sound->isChannelPuppet(2), _currentFrame->_mainChannels.soundType2, sound->getChannelVolume(2));
+	debugC(5, kDebugSound, "Score::playSoundChannel(): movie: %s, frame: %d, Sound1: %s [changed: %d, puppet: %d, type: %d, volume: %d], Sound2: %s [changed: %d, puppet: %d, type: %d, volume: %d]",
+			_movie->getMacName().c_str(), _curFrameNumber,
+			sound1.asString().c_str(), sound1Changed, sound->isChannelPuppet(1), _currentFrame->_mainChannels.soundType1, sound->getChannelVolume(1),
+			sound2.asString().c_str(), sound2Changed, sound->isChannelPuppet(2), _currentFrame->_mainChannels.soundType2, sound->getChannelVolume(2));
 
 	if (sound->isChannelPuppet(1)) {
 		sound->playPuppetSound(1);




More information about the Scummvm-git-logs mailing list