-
Notifications
You must be signed in to change notification settings - Fork 443
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
Start Player Item Docs #1396
Merged
Merged
Start Player Item Docs #1396
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
423c2bf
Copy Fig Docs
engineer124 c668538
small cleanup
engineer124 019cc10
ItemChangeType comment
engineer124 f7ffcd9
bool
engineer124 6ecb70c
item change comments
engineer124 37d6e90
PR Review
engineer124 a009452
rm comments
engineer124 c7135c5
merge main
engineer124 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the usage of this function it seems like
arg2
is always passed a value equivalent toEquipSlot
.thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was about to do this before PR'ing, but the one call to this function in z_player_lib.c made me hesitate, i.e. in function
func_80123810
since the argi
seems shifted up by 1 from C btns. Isi
suppose to beEquipSlot
when it's fed into this function?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, I think I see how it works. It just shifts i from an enum of just C buttons to an enum with B and C buttons.
EquipSlot
has buttons B, C, A so I'm not sure if it's suppose to be all 3 or not, so it's worth revisiting this later. See zeldaret/oot#1228 for this kind of discussionThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't say it is shifting from an enum of just C buttons to another enum, but instead it is just accounting for the fact that
sCItemButtons
doesn't include the B button. That array could have comments like the following considering how it is usedThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would argue
sCItemButtons
is more of a map from:to controller buttons, then
i++
is really the macro#define INTERACT_C_BTN_TO_BC_BTN(btnsC) ((btnsC) + 1)
being applied toi
and storing the result back intoi
. So I'll leave the comments out for now until these different enums are introduced in MM.For reference, equip slot would be
InteractBCAButton
from that PR, but then it might make more sense forPlayer_GetItemOnButton
to takeInteractBCButton
as it's enum arg and notInteractBCAButton
. Just something to be careful of