[Scummvm-git-logs] scummvm master -> 321b113ae750279843190f2066c259d7e0cff851

athrxx noreply at scummvm.org
Fri Jun 12 17:37:52 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:
321b113ae7 SCUMM: (DOTT) - fix text speed setting corruption


Commit: 321b113ae750279843190f2066c259d7e0cff851
    https://github.com/scummvm/scummvm/commit/321b113ae750279843190f2066c259d7e0cff851
Author: athrxx (athrxx at scummvm.org)
Date: 2026-06-12T19:36:49+02:00

Commit Message:
SCUMM: (DOTT) - fix text speed setting corruption

For whatever reason, we let scripted VAR_CHARINC values
overwrite the "talkspeed" setting. I am not changing that,
since I do not know why we do that and if it is needed.
But at least, I restrict it to valid values. DOTT scripts set
VAR_CHARINC to 255 right before the final credits, which
would result in a "talkspeed" setting of -246.

Changed paths:
    engines/scumm/script.cpp


diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp
index 31e0d846480..ff91a786ec1 100644
--- a/engines/scumm/script.cpp
+++ b/engines/scumm/script.cpp
@@ -740,8 +740,16 @@ void ScummEngine::writeVar(uint var, int value) {
 			// value is likely to be bogus. See also bug #4008.
 			if (_currentRoom == 0 && ConfMan.hasKey("talkspeed", _targetName)) {
 				value = 9 - getTalkSpeed();
-			} else {
-				// Save the new talkspeed value to ConfMan
+			} else if (value >= 0 && value <= 9) {
+				// Save the new talkspeed value to ConfMan.
+				// UPDATE: Only do this if the value is in valid range
+				// (e. g. DOTT, right before showing the final credits,
+				// will repeatedly set a value of 255, which would get
+				// stored as -246 and thus corrupt the text display in
+				// the next game session). I don't know why we do this
+				// at all, in my understanding, the script should not
+				// really change the user setting? Also, readVar()
+				// does not have an equivalent counterpart for this.
 				setTalkSpeed(9 - value);
 			}
 		}




More information about the Scummvm-git-logs mailing list