[Scummvm-git-logs] scummvm master -> 77228509ebf073674b6f029125386013ab1841e6

bluegr noreply at scummvm.org
Wed May 18 18:57:23 UTC 2022


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

Summary:
77228509eb SCUMM: Fix hanging Maniac Mansion cutscene with the French version (Trac#13473)


Commit: 77228509ebf073674b6f029125386013ab1841e6
    https://github.com/scummvm/scummvm/commit/77228509ebf073674b6f029125386013ab1841e6
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-05-18T21:57:19+03:00

Commit Message:
SCUMM: Fix hanging Maniac Mansion cutscene with the French version (Trac#13473)

The lab cutscene where Purple Tentacle is bullying Sandy would hang
when Dr Fred is done talking, in the official French version.

This appears to be related to this VAR_CHARCOUNT check in script no. 155:

[0085] (14) print(9,"{{Dr Fred's reaction line, shorter in French}}");
[00DA] (80) breakHere();
[00DB] (44) unless (VAR_CHARCOUNT > 90) goto 00DA;

Usually, French sentences are a bit longer than English sentences, but
in this case, it's shorter, but yet the script didn't adjust the 90
value, so it would indefinitely loop, causing the scene to hang (until
the player presses the Esc key) and Sandy's reaction to be lost.

So we just pad this string with extra spaces if its length looks too
short for the default VAR_CHARCOUNT check.  This should also remain
harmless if the string *is* long enough, or if a translation did fix
the VAR_CHARCOUNT check.

Still, we only restrict this workaround to the French version for now,
since we're not aware of a similar problem with other translations.

Changed paths:
    engines/scumm/script_v2.cpp


diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp
index 30d3b48a33c..efe0ffcc79b 100644
--- a/engines/scumm/script_v2.cpp
+++ b/engines/scumm/script_v2.cpp
@@ -396,6 +396,24 @@ void ScummEngine_v2::decodeParseString() {
 	}
 	*ptr = 0;
 
+	// WORKAROUND bug #13473: in the French version of Maniac Mansion, the cutscene
+	// where Purple Tentacle is bullying Sandy hangs once Dr Fred is done talking,
+	// because his reaction line in shorter in this translation (which is unusual for
+	// French which tends to be more verbose) and the `unless (VAR_CHARCOUNT > 90)`
+	// loop in script #155 hasn't been ajusted for this shorter length.
+	//
+	// So we add some extra spaces at the end of the string if it's too short; this
+	// unblocks the cutscene and also lets Sandy react as intended.
+	//
+	// (Not using `_enableEnhancements` because some users could be really confused
+	// by the game hanging and they may not know about the Esc key.)
+	if (_game.id == GID_MANIAC && _game.platform != Common::kPlatformNES && _language == Common::FR_FRA && vm.slot[_currentScript].number == 155 && _roomResource == 31 && _actorToPrintStrFor == 9) {
+		while (ptr - buffer < 100) {
+			*ptr++ = ' ';
+		}
+		*ptr = 0;
+	}
+
 	int textSlot = 0;
 	_string[textSlot].xpos = 0;
 	_string[textSlot].ypos = 0;




More information about the Scummvm-git-logs mailing list