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

klusark noreply at scummvm.org
Wed Nov 11 21:28:31 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:
c8dea40ec2 GRIM: Fix background dialog volume


Commit: c8dea40ec21d7e3d49878187233ebdf1b4c1ef05
    https://github.com/scummvm/scummvm/commit/c8dea40ec21d7e3d49878187233ebdf1b4c1ef05
Author: Joel Teichroeb (joel at teichroeb.net)
Date: 2026-11-11T16:27:02-05:00

Commit Message:
GRIM: Fix background dialog volume

In the high rollers lounge, Glottis is loudly yelling about the cat
racing. When talking to Nick, his volume should be reduced so we can
hear what nick is saying

Fixes #13047

Assisted-by: Claude:claude-opus-5-5

Changed paths:
    engines/grim/actor.cpp
    engines/grim/actor.h
    engines/grim/lua_v1_text.cpp


diff --git a/engines/grim/actor.cpp b/engines/grim/actor.cpp
index b659eaa81e8..7656e2541f9 100644
--- a/engines/grim/actor.cpp
+++ b/engines/grim/actor.cpp
@@ -1144,7 +1144,7 @@ Math::Angle Actor::getYawTo(const Math::Vector3d &p) const {
 		return Math::Angle::arcTangent2(-dpos.x(), dpos.y());
 }
 
-void Actor::sayLine(const char *msgId, bool background, float x, float y) {
+void Actor::sayLine(const char *msgId, bool background, float x, float y, int volume, int pan) {
 	assert(msgId);
 
 	if (msgId[0] == 0) {
@@ -1193,7 +1193,7 @@ void Actor::sayLine(const char *msgId, bool background, float x, float y) {
 	_talkSoundId = 0;
 
 	if (g_grim->getSpeechMode() != GrimEngine::TextOnly)
-		started = g_sound->startVoice(_talkSoundName.c_str(), 127, 64, background, &_talkSoundId);
+		started = g_sound->startVoice(_talkSoundName.c_str(), volume, pan, background, &_talkSoundId);
 
 	// If the actor is clearly not visible then don't try to play the lip sync
 	if (_visible && (!g_movie->isPlaying() || g_grim->getMode() == GrimEngine::NormalMode)) {
diff --git a/engines/grim/actor.h b/engines/grim/actor.h
index 2da8f5cdf69..609724bfca8 100644
--- a/engines/grim/actor.h
+++ b/engines/grim/actor.h
@@ -436,10 +436,12 @@ public:
 	 *
 	 * @param msgId The id of the message to say.
 	 * @param background ?? actual meaning unknown yet.
+	 * @param volume The voice volume (0-127), the SayLine table's volume.
+	 * @param pan The voice pan (0-127), the SayLine table's pan.
 	 * @see isTalking
 	 * @see shutUp
 	 */
-	void sayLine(const char *msgId, bool background, float x, float y);
+	void sayLine(const char *msgId, bool background, float x, float y, int volume, int pan);
 	// When we clean all text objects we don't want the actors to clean their
 	// objects again since they're already freed
 	void lineCleanup();
diff --git a/engines/grim/lua_v1_text.cpp b/engines/grim/lua_v1_text.cpp
index 645ebc1d86b..a641f7c9084 100644
--- a/engines/grim/lua_v1_text.cpp
+++ b/engines/grim/lua_v1_text.cpp
@@ -273,7 +273,7 @@ void Lua_V1::SetSayLineDefaults() {
 }
 
 void Lua_V1::SayLine() {
-	int vol = 127, buffer = 64, paramId = 1;
+	int vol = 127, pan = 64, paramId = 1;
 	float x = -1, y = -1;
 	bool background = true;
 	const char *msgId = nullptr;
@@ -292,7 +292,7 @@ void Lua_V1::SayLine() {
 				if (!lua_isstring(paramObj) && !lua_isnumber(paramObj) && !lua_istable(paramObj))
 					break;
 				if (lua_istable(paramObj))
-					parseSayLineTable(paramObj, &background, &vol, &buffer, &x, &y);
+					parseSayLineTable(paramObj, &background, &vol, &pan, &x, &y);
 				else {
 					if (lua_isnumber(paramObj))
 						background = false;
@@ -303,7 +303,7 @@ void Lua_V1::SayLine() {
 				paramObj = lua_getparam(paramId++);
 			}
 			if (msgId) {
-				actor->sayLine(msgId, background, x, y); // background, vol, pan, x, y
+				actor->sayLine(msgId, background, x, y, vol, pan);
 			}
 		}
 	}




More information about the Scummvm-git-logs mailing list