Skip to content

Suppress the error sound effect during key repeats#53

Open
BenHetherington wants to merge 4 commits intoOffBroadway:custom-loader-menufrom
BenHetherington:suppress-error-sfx-on-key-repeat
Open

Suppress the error sound effect during key repeats#53
BenHetherington wants to merge 4 commits intoOffBroadway:custom-loader-menufrom
BenHetherington:suppress-error-sfx-on-key-repeat

Conversation

@BenHetherington
Copy link

The stock memory card menu only plays the error sound effect when a new input is made, not repeatedly while a button is just held down. This updates the game selection menu code to match this behaviour.

Additionally, this replicates another detail from the memory card menu: if you make a diagonal movement, the sound effect that will play will correspond to the horizontal movement (so a failed up and successful right will play ‘move’, and a successful up and a failed right will play ‘error’).

I've only been able to test this on PAL 1.0, so please do test on other versions before merging!

The stock memory card menu only plays the error sound effect when a new input is made, not repeatedly while a button is just held down.

This updates the game selection menu code to match this behaviour.
Very minor detail, but in the memory card menu, if you make a diagonal movement, the sound effect that will play will correspond to the horizontal movement (so a failed up and successful right will play ‘move’, and a successful up and a failed right will play ‘error’).

This replicates this detail by processing vertical input first, followed by horizontal movement.
ntsc11_EXIImm = 0x8135a774;
ntsc11_EXIImmEx = 0x8135a9d0;

ntsc11_is_key_repeat = 0x81481460;
Copy link
Member

Choose a reason for hiding this comment

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

It looks like other functions are calling a get wrapper for this global ala NTSC11 0x81302de0

But I think looking at the variable directly is fine

Copy link
Author

Choose a reason for hiding this comment

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

Oh whoops, you're right, not sure how I missed that 🤦 Either approach is fine by me, though using the function would make it impossible to accidentally modify it. If we're not worried though I'll leave it as-is 🙂

Copy link
Author

Choose a reason for hiding this comment

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

I ended up just going ahead and updating this to use the getter, seeing as I was updating other outstanding reviews anyway!

May as well do this the same way as the original code did. As a nice plus, this means we can’t accidentally set this.
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