[Scummvm-git-logs] scummvm master -> 63a5010e3ea05d5b8d77c0e7530bdce7cbbc7f89

bluegr noreply at scummvm.org
Thu Aug 4 20:57:15 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:
63a5010e3e SCUMM: Fix Sophia speaking with Indy's voice when looking at him


Commit: 63a5010e3ea05d5b8d77c0e7530bdce7cbbc7f89
    https://github.com/scummvm/scummvm/commit/63a5010e3ea05d5b8d77c0e7530bdce7cbbc7f89
Author: Donovan Watteau (contrib at dwatteau.fr)
Date: 2022-08-04T23:57:12+03:00

Commit Message:
SCUMM: Fix Sophia speaking with Indy's voice when looking at him

When playing as Sophia in some scenes (such as in the Azores), using the
`Look at` verb on Indy would make her speak with Indy's voice, because
the script triggering this sentence for this verb didn't check or
include a line for the case when VAR_EGO is Sophia.

Fortunately, a different script does have this exact same line dubbed
for Sophia, so we can reuse it, as long as the audio offsets have the
values that we expect (and I'm only aware of a single MONSTER.SOU file
for this title, always in English and identical on all ports).

Changed paths:
    engines/scumm/script_v5.cpp


diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index 3843fff4437..6bc156e8888 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -3287,6 +3287,24 @@ void ScummEngine_v5::decodeParseString() {
 					} else {
 						printString(textSlot, _scriptPointer);
 					}
+				} else if (_game.id == GID_INDY4 && vm.slot[_currentScript].number == 161 && _actorToPrintStrFor == 2 &&
+						_game.platform != Common::kPlatformAmiga && strcmp(_game.variant, "Floppy") != 0 &&
+						_enableEnhancements) {
+					// WORKAROUND: In Indy 4, if one plays as Sophia and looks at Indy, then
+					// her "There's nothing to look at." reaction line will be said with
+					// Indy's voice, because script 68-161 doesn't check for Sophia in this
+					// case. Script 68-4 has a "There's nothing to look at." line for Sophia,
+					// though, so we reuse this if the current line contains the expected
+					// audio offset.
+					if (memcmp(_scriptPointer, "\xFF\x0A\x5D\x8E\xFF\x0A\x63\x08\xFF\x0A\x0E\x00\xFF\x0A\x00\x00", 16) == 0) {
+						byte *tmpBuf = new byte[len];
+						memcpy(tmpBuf, "\xFF\x0A\xCE\x3B\xFF\x0A\x01\x05\xFF\x0A\x0E\x00\xFF\x0A\x00\x00", 16);
+						memcpy(tmpBuf + 16, _scriptPointer + 16, len - 16);
+						printString(textSlot, tmpBuf);
+						delete[] tmpBuf;
+					} else {
+						printString(textSlot, _scriptPointer);
+					}
 				} else if (_game.id == GID_MONKEY_EGA && _roomResource == 30 && vm.slot[_currentScript].number == 411 &&
 							strstr((const char *)_scriptPointer, "NCREDIT-NOTE-AMOUNT")) {
 					// WORKAROUND for bug #4886 (MI1EGA German: Credit text incorrect)




More information about the Scummvm-git-logs mailing list