Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCUMM: Fix missing voice when selling back the hub cap and pirate hat #4011

Conversation

dwatteau
Copy link
Contributor

@dwatteau dwatteau commented Jun 17, 2022

This one was found by Threepwang while he was testing his own French translation.

Context

This only happens with the Ultimate Talkie edition of Monkey Island 2, when you go to the Booty Boutique and try to buy/sell some objects.

Script 215 in room 48 (talkie edition 0.2) does this:

...
[0004] (48) if (Local[0] == 530) { # <===
[000B] (D8)   printEgo([Text(sound(0xACDDEDE, 0xA) + "Can I sell back this hub cap?")]);
[003B] (48) } else if (Local[0] == 529) { # <===
[0045] (D8)   printEgo([Text(sound(0xACE4833, 0xA) + "Can I sell back this pirate hat?")]);
[0078] (48) } else if (Local[0] == 534) {
[0082] (D8)   printEgo([Text(sound(0xACEC310, 0xA) + "Can I sell back this wreath?")]);
[00B1] (48) } else if (Local[0] == 547) {
[00BB] (D8)   printEgo([Text(sound(0xACF2463, 0xA) + "Can I sell back this rock and roll collector's plate?")]);
[0103] (18) } else {
[0106] (48)   if (Local[0] == 520) {
[010D] (18)     goto 00BB;
[0110] (**)   }
[0110] (48)   if (Local[0] == 537) {
[0117] (D8)     printEgo([Text(sound(0xACFCB35, 0xA) + "Can I sell back this feather pen?")]);
[014B] (18)   } else {
[014E] (48)     if (Local[0] == 548) {
[0155] (18)       goto 0082;
[0158] (**)     }
[0158] (48)     if (Local[0] == 551) {
[015F] (18)       goto 0117;
[0162] (**)     }
[0162] (9D)     if (classOfIs(Local[0],[137])) {
[016B] (D8)       printEgo([Text("Can I sell back these " + getName(Local[0]) + "?")]);
[0189] (18)     } else {
[018C] (D8)       printEgo([Text("Can I sell back this " + getName(Local[0]) + "?")]);
[01A9] (**)     }
[01A9] (**)   }
[01A9] (**) }
...

but for the hub cap and the pirate hat, the comparison is wrong, it should check for 550 and 549 since they must be in your inventory to be sold again.

So, the first two if () would never match and you'd fall back to the voice-less Can I sell back this XXX.... Not game-breaking, but the audio sample is there, and the Ultimate Talkie edition was all about fixing and improving everything in the orignal game :)

As usual, I try to take many precautions in my checks (so if a future version of the Ultimate Edition appears, this shouldn't cause any problem). In this particular case, I don't check for _enableEnhancements since this fan-made edition is about enhancements in the first place (a similar reasoning is already applied to an existing workaround in this same file).

How to test

  1. You need the Ultimate Talkie edition of Monkey Island 2 to test this.
  2. Start the game with the -b 619 boot param.
  3. Buy (= pick up) a hub cap (on the left) and a pirate hat (at the top).
  4. Sell (= give) them back to the antique dealer.

With this fix, you should hear Guybrush's voice again when he asks about selling back these objects.

The Ultimate Talkie edition of Monkey Island 2 has a small script error
when you try to sell back your hub cap or your pirate hat to the antique
dealer.  It wasn't doing a comparison with the proper object number, and
so it would play a fallback line with no voice.
@bluegr
Copy link
Member

@bluegr bluegr commented Jun 18, 2022

Great, thanks! We should notify the creators of the ultimate edition for a patch from their end too

Merging

@bluegr bluegr merged commit 59cbd90 into scummvm:master Jun 18, 2022
8 checks passed
@dwatteau dwatteau deleted the fix/monkey2-missing-speech-pirate-hat-hub-caps-booty-boutique branch Jun 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants