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

press Z to swap Zelda/Shiek in Online CSS #118

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

BR-
Copy link

@BR- BR- commented Jan 6, 2023

Someone in Discord requested this: https://discord.com/channels/328261477372919811/1042515294268178433/1042515294268178433

Z is already used for backing out of queue so maybe a different button might be better?

This also skips the hover-check code so if you are hovering over the button that you are switching away from with Z, the button will be gray for a frame before becoming white.

Happy to fix either of those or anything else you suggest.

@@ -249,6 +249,15 @@ lbz r3, MSRB_IS_LOCAL_PLAYER_READY(r3)
cmpwi r3, 0
bne FN_SZThink_CHANGE_HANDLING_END # No changes when locked-in

# Check if the Z button was pressed this frame
load r4, 0x804c20bc
lbz r3, -0x49B0(r13) # player index

Choose a reason for hiding this comment

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

nitpick: use secondaryDmaBuffer

.set secondaryDmaBuffer,-0x49b0

# Check if the Z button was pressed this frame
load r4, 0x804c20bc
lbz r3, -0x49B0(r13) # player index
mulli r3, r3, 68

Choose a reason for hiding this comment

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

nitpick: use a constant like PLAYER_PAD_STRUCT_LEN or something (idk exactly what struct youre looking at) instead of a magic number

@BR-
Copy link
Author

BR- commented Jan 6, 2023

That code was copied from the code slightly below that checks for A button presses while hovering over the S/Z button. I don't know specifically what it is accessing. I can change both places?

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