SCUMM: Fix Captain Dread's head when Guybrush says "It's me again." #3929
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes an original, small and absolutely non-critical bug of Monkey2, so it can be safely ignored for the 2.6.0 release if necessary.
Original bug
This one comes from https://www.moviemistakes.com/main7214 (eh!).
When Guybrush interacts with Dread, Dread should turn and face him if he's not already looking at him. But the original script forgot to do this check, if Guybrush already met him, tries giving him an object and then immediately talks to him.
Indeed, this is what happens in script 201 (room 22) if it's the first time you talk to Dread and know his name (= OK):
(
descumm
has a bit of trouble decodingdrawObject()
it seems)This is if you met him for the first time and don't know his name (= OK):
And this is if you talk to him again (= bug):
Notice that the
if (!Bit[129])
condition is missing, this time. So Dread will always turn and face Guybrush, even if he's already facing him, hence the glitch with his head.Since Dread's movement is always done by 32 bytes of opcodes, I think we can just skip that if its first
drawObject()
call was done althoughBit[129]
was set. This is inspired by what commit 9b56d7c did.I could maybe just ignore all the
drawObject()
calls in that script ifBit[129]
is set, but then I'd also have to ignore thedelay()
calls, otherwise Dread is a bit slow at reacting… I'm not a big fan of just moving the pointer with a static value, but I can't see why a particular version of Monkey2 would do thesedrawObject()
calls differently. I tested various versions and Dread's full reaction is always 32-byte long with nothing in-between.How to test
456
which saves you time). Note that the Lite Mode can't trigger this bug.Dread should always turn and face you when reacting, but his head should never glitch.
I've tested this with: