[Scummvm-git-logs] scummvm master -> 5493c5d3bdaf39e52b004a349ebafed5ec1bffe9

scemino noreply at scummvm.org
Tue Dec 17 21:34:35 UTC 2024


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

Summary:
e9af22e3c1 TWP: Fix fade in time is not applied to sounds
5493c5d3bd TWP: HUD and inventory should be invisible initially


Commit: e9af22e3c17447f73d6bbd3e6475fb220deb34d4
    https://github.com/scummvm/scummvm/commit/e9af22e3c17447f73d6bbd3e6475fb220deb34d4
Author: scemino (scemino74 at gmail.com)
Date: 2024-12-17T22:34:22+01:00

Commit Message:
TWP: Fix fade in time is not applied to sounds

Fix #15603

Changed paths:
    engines/twp/audio.cpp


diff --git a/engines/twp/audio.cpp b/engines/twp/audio.cpp
index bb4cf583ee9..5952257a5ee 100644
--- a/engines/twp/audio.cpp
+++ b/engines/twp/audio.cpp
@@ -145,9 +145,13 @@ float AudioSystem::getMasterVolume() const {
 }
 
 void AudioSystem::updateVolume(AudioSlot *slot) {
-	float vol = _masterVolume * slot->volume;
+	float vol = _masterVolume;
 	if (slot->fadeInTimeMs) {
+		// apply fade time
 		vol *= (((float)g_twp->_mixer->getElapsedTime(slot->handle).msecs()) / slot->total);
+	} else {
+		// no fade time => use the default volume
+		vol *= slot->volume;
 	}
 	if (slot->fadeOutTimeMs) {
 		float startFade = slot->total - slot->fadeOutTimeMs;


Commit: 5493c5d3bdaf39e52b004a349ebafed5ec1bffe9
    https://github.com/scummvm/scummvm/commit/5493c5d3bdaf39e52b004a349ebafed5ec1bffe9
Author: scemino (scemino74 at gmail.com)
Date: 2024-12-17T22:34:22+01:00

Commit Message:
TWP: HUD and inventory should be invisible initially

Fix #15604

Changed paths:
    engines/twp/hud.cpp
    engines/twp/scenegraph.cpp


diff --git a/engines/twp/hud.cpp b/engines/twp/hud.cpp
index 4e022a40c0c..7e1e6fcc3cd 100644
--- a/engines/twp/hud.cpp
+++ b/engines/twp/hud.cpp
@@ -129,6 +129,7 @@ void HudShader::applyUniforms() {
 
 Hud::Hud() : Node("hud") {
 	_zOrder = 100;
+	_visible = false;
 	for (auto &_actorSlot : _actorSlots) {
 		ActorSlot *slot = &_actorSlot;
 		slot->actor = nullptr;
diff --git a/engines/twp/scenegraph.cpp b/engines/twp/scenegraph.cpp
index 0a0d1496706..f9a77d73a81 100644
--- a/engines/twp/scenegraph.cpp
+++ b/engines/twp/scenegraph.cpp
@@ -590,6 +590,7 @@ static bool hasDownArrow(Common::SharedPtr<Object> actor) {
 }
 
 Inventory::Inventory() : Node("Inventory") {
+	_visible = false;
 	for (int i = 0; i < NUMOBJECTS; i++) {
 		float x = SCREEN_WIDTH / 2.f + ARROWWIDTH + MARGIN + ((i % NUMOBJECTSBYROW) * (BACKWIDTH + BACKOFFSET));
 		float y = MARGINBOTTOM + BACKHEIGHT + BACKOFFSET - ((float)(i / NUMOBJECTSBYROW) * (BACKHEIGHT + BACKOFFSET));




More information about the Scummvm-git-logs mailing list