-
Notifications
You must be signed in to change notification settings - Fork 610
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?
Conversation
Thanks. |
Undid the |
@@ -927,6 +927,7 @@ typedef struct Player { | |||
s16 csDelayTimer; // Player_Action_WaitForCutscene: Number of frames to wait before responding to a cutscene | |||
s16 playedLandingSfx; // Player_Action_BlueWarpArrive: Played sfx when landing on the ground | |||
s16 appearTimer; // Player_Action_FaroresWindArrive: Counts up, appear at 20 frames (1 second) | |||
s16 drinkingState; // Player_Action_DrinkFromBottle: Uses values 0-2 to determine which part of the drinking action is currently active |
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.
mention DrinkingState
enum here?
if (sp2C >= 0) { | ||
if (sp2C == 0xC) { | ||
Player_SetupActionPreserveItemAction(play, this, Player_Action_8084EED8, 0); | ||
#define ACTION_TO_BOTTLE_ACTION(action) (action - PLAYER_IA_BOTTLE) |
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.
But there are so many of these id offset situations in player.
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 it
Document
Player_Action_8084EAC0
asPlayer_Action_DrinkFromBottle
,Player_Action_8084EED8
asPlayer_Action_UseFairyFromBottle
, andPlayer_Action_8084EFC0
asPlayer_Action_DropActorFromBottle
.Also documents
func_8083C0E8
asPlayer_SetupIdleAndPlayIdleAnim
(could maybe be named something likePlayer_ResetToIdle
instead as that's how it's used from what I can see) as it was used inPlayer_Action_DrinkFromBottle
.