[Scummvm-git-logs] scummvm master -> 9faef8d66c00687d3938ebb02a9d695ee16789b1

antoniou79 noreply at scummvm.org
Sun Sep 7 10:31:03 UTC 2025


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:
9faef8d66c TSAGE: BLUEFORCE: Fix music fading using global sounds


Commit: 9faef8d66c00687d3938ebb02a9d695ee16789b1
    https://github.com/scummvm/scummvm/commit/9faef8d66c00687d3938ebb02a9d695ee16789b1
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2025-09-07T13:30:01+03:00

Commit Message:
TSAGE: BLUEFORCE: Fix music fading using global sounds

A new game is required for the fix to take effect. Old saved games won't benefit from this fix

Also included a fix for scene271 (Grandma's home, after the accident) where the door knock sound would (wrongly) stop the music.
And a hack was removed from scene160 (Intro - Burial), which was previously needed becaus the music fading was not working.
This fix allows music to be played inside the Boat Rentals shop

Changed paths:
    engines/tsage/blue_force/blueforce_scenes1.cpp
    engines/tsage/blue_force/blueforce_scenes2.cpp
    engines/tsage/blue_force/blueforce_scenes2.h
    engines/tsage/globals.cpp


diff --git a/engines/tsage/blue_force/blueforce_scenes1.cpp b/engines/tsage/blue_force/blueforce_scenes1.cpp
index cc4247d52dc..150775b45ee 100644
--- a/engines/tsage/blue_force/blueforce_scenes1.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes1.cpp
@@ -2658,16 +2658,8 @@ void Scene160::Action2::signal() {
 		break;
 	case 25:
 		BF_GLOBALS._sound1.fade(0, 10, 10, true, this);
-// FIXME: Currently, fade() doesn't end properly with this song,
-//        thus never returns here. This hack skips the wait and changes
-//        directly to the next scene
-// Start of hack
-//		break;
-//	case 26:
-		setDelay(5);
-		BF_GLOBALS._sound1.stop();
-// End of hack
-
+		break;
+	case 26:
 		BF_GLOBALS._sceneManager.changeScene(200);
 		break;
 	default:
diff --git a/engines/tsage/blue_force/blueforce_scenes2.cpp b/engines/tsage/blue_force/blueforce_scenes2.cpp
index b89797d66f3..31cafdf0ce4 100644
--- a/engines/tsage/blue_force/blueforce_scenes2.cpp
+++ b/engines/tsage/blue_force/blueforce_scenes2.cpp
@@ -1594,7 +1594,8 @@ void Scene271::signal() {
 		default:
 			_object11.postInit();
 			_object11.setPosition(Common::Point(340, 100));
-			BF_GLOBALS._sound1.play(36);
+			// Door knock sound
+			_sound1.play(36);
 
 			_sceneMode = 2709;
 			setAction(&_sequenceManager1, this, 2709, &BF_GLOBALS._player, &_object1, &_object12, &_object11, NULL);
diff --git a/engines/tsage/blue_force/blueforce_scenes2.h b/engines/tsage/blue_force/blueforce_scenes2.h
index 080bb5d264b..6e1d048f279 100644
--- a/engines/tsage/blue_force/blueforce_scenes2.h
+++ b/engines/tsage/blue_force/blueforce_scenes2.h
@@ -68,10 +68,6 @@ class Scene210: public SceneExt {
 	public:
 		void signal() override;
 	};
-	class Action2: public Action {
-	public:
-		void signal() override;
-	};
 public:
 	SequenceManager _sequenceManager;
 	Action1 _action1;
@@ -266,6 +262,7 @@ public:
 	Rect _rect1;
 	int _field796, _field2E16;
 	Common::Point _tempPos;
+	ASound _sound1;
 
 	Scene271();
 	void synchronize(Serializer &s) override;
diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp
index c157d3cb129..6879b2fca8d 100644
--- a/engines/tsage/globals.cpp
+++ b/engines/tsage/globals.cpp
@@ -290,6 +290,17 @@ BlueForceGlobals::BlueForceGlobals(): TsAGE2Globals() {
 	_v4CEC8 = 1;
 	_v4CECA = 0;
 	_v4CECC = 0;
+	// Initialize the _breakerBoxStatusArr (dummy values)
+	// NOTE: BF_GLOBALS reset() is called after the globals constructor in TSageEngine::initialize() for Blue Force
+	// which sets the correct initial values for this array
+	memset(_breakerBoxStatusArr, 0, 18 * sizeof(int8));
+
+	// Register the inner sound objects for each of the global ASoundExt fields.
+	// Normally the ASound constructor would do this, but because they're fields
+	// of the globals, the g_globals reference isn't ready for them to use
+	// NOTE: This change is mirroring the similar change for Ringworld2Globals
+	_sounds.push_back(&_sound1);
+	_sounds.push_back(&_sound3);
 }
 
 void BlueForceGlobals::synchronize(Serializer &s) {




More information about the Scummvm-git-logs mailing list