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

SCI: Fix SQ4 Sequel police electronics store bugs #1669

Merged
merged 1 commit into from
Jun 17, 2019

Conversation

sluicebox
Copy link
Member

"How's QFG4 going?"
"Let's just say even SQ4 mall bugs are more fun..."

This fixes lockup, animation, and flag bugs when hiding in the electronics store, bug #10977.

Whew! This one has been sitting in the queue for a while, but the hole kept getting deeper. It looks like this entire sequence was never tested on CD, since it locks up immediately and has message typos and animation and flag bugs after that. I never knew you could do this stuff as it takes an inefficient escape route, which I guess is how testers missed it.

These fixes make a dozen lines of audio available for the first time, including a "new" death message in front of monolith burger.

// the available bytes. To make room we use the clear-flag method's return
// value, which is the previous flag value, and only test if the previous room
// number is even, which only room 400 is. This patch is split into two parts
// to surround a single bnt instruction whose size changed between versions.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I'm confused - can't you create a single patch in this case?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bnt instruction that's in the middle has a 16-bit operand in some versions and an 8-bit in the other (even though it's the same value) and there's not a mechanism for "skip 2 or 3 bytes".

I updated the comment to be clearer that it's the operand size in the instruction.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense. Thanks!

Fixes lockup, animation, and flag bugs when hiding in the
electronics store, bug #10977
@bluegr
Copy link
Member

bluegr commented Jun 17, 2019

Well done! Quite an edge case, and it looks like very few people actually stumbled upon these bugs

@bluegr bluegr merged commit bdf85e3 into scummvm:master Jun 17, 2019
@sluicebox sluicebox deleted the sq4mallpolicefixes branch September 22, 2019 03:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants