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.
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
Documet bottle using actions #2360
base: main
Are you sure you want to change the base?
Documet bottle using actions #2360
Changes from 7 commits
fb60c5c
3a0ac4a
f47487a
0f390cf
cf02449
1b54055
24c9746
1cc97fa
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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'd really prefer if this define was at top-level instead of in the middle of a function. Maybe in z64player.h? Then it could be used in Player_ActionToBottle as well.
(PS: I'm not really sure what to do about these "sub-enums" like with Player_ActionToMagicSpell and Player_ActionToMeleeWeapon too. Maybe they deserve a separate enum? I think we can figure that out later though)
(PPS: maybe it should be called
ACTION_TO_BOTTLE
to match the function name?)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.
Yeah I would prefer to handle all these in a consistent manner at some point in the future. But if we want to introduce this now I guess we can change other examples of it later.
But there are so many of these id offset situations in player.
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.
yeah, I kinda think this is a bigger project and not too relevant to this PR (where the goal is just to name some action funcs). Could also revert
ACTION_TO_BOTTLE_ACTION
here to really punt on itThere 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.
For now, I moved it to
z64player.h
and used it inPlayer_ActionToBottle
.I think that either this or a
PlayerBottle
enum of some kind is needed since without it it's harder to understand how it chooses an action (sp2C >= ACTION_TO_BOTTLE(PLAYER_IA_BOTTLE_FISH) && sp2C <= ACTION_TO_BOTTLE(PLAYER_IA_BOTTLE_BUG)
vssp2C >= 1 && sp2C <= 3
).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.
We're not saying that it isn't helpful, but rather that this pattern is a much larger thing that needs to be handled within player. And that it makes more sense to do it separately as a larger project.
I would prefer if it was taken out temporarily, with the understanding that this enum-range pattern will be handled in the future at a larger scale.
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'm fine keeping it as-is, I just meant I didn't want to spend too much time right now trying to get it right. I don't think it'll be hard to undo later if we wanted to, and it does make the code a little clearer now IMO