Skip to content

Conversation

@JordanLongstaff
Copy link
Contributor

No description provided.

Comment on lines +366 to 375
bool Player_IsBackJumping(PlayState* play) {
Player* player = GET_PLAYER(play);

return (player->stateFlags2 & PLAYER_STATE2_80000) && (player->av1.actionVar1 == 2);
}

bool func_80122FCC(PlayState* play) {
bool Player_IsSideJumping(PlayState* play) {
Player* player = GET_PLAYER(play);

return (player->stateFlags2 & PLAYER_STATE2_80000) &&
Copy link
Collaborator

Choose a reason for hiding this comment

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

We are a bit more picky when player docs are involved, like how do you know these variables are related to jumping?

Ideally we would name these functions after we have a good understanding of PLAYER_STATE2_80000 and having it named too (or at least a name candidate).

There's also the usage of av1, which is an union that gets used for many different values depending of many different cases. Its usage is pretty complex, and since pretty much the only thing this function does is checking these two values then it would best to also add a new member to that union, but that implies figuring out the av1.actionVar1 usages in player code that need to be changed to this new member, which can be a massive task and definitely out of the scope of the current PR.

We try to be careful when naming stuff from big systems like Player, because something being named makes other people believe the name to be correct and base their documentation efforts on that info. I'm not saying that your naming is wrong, but just from the information presented in the PR we can't be certain we aren't missing something else and the naming should try to reflect that.

So it may be better to leave these functions alone and maybe mention this suspected behavior in a comment.
Also, if you are interested in Player then you should reach fig, he is the Player expert.

Copy link
Collaborator

Choose a reason for hiding this comment

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

... On the other hand, these two functions are only used by the actor in question, so I guess naming this may be just fine.

Not sure how to proceed.

I took a look at OoT and these functions don't exist over there. Also the equivalent of our PLAYER_STATE2_80000 seems to be OoT's PLAYER_STATE2_19 (not totally confident but the value at least matches)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, if there had been other callers besides the swordsman, I wouldn't have renamed these. I won't deign to go any deeper into renaming or formalizing anything regarding these two actions or the Player actor.

CC @fig02 Would it be better to just add comments rather than rename the functions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I took a look at OoT and these functions don't exist over there.

Probably because OoT doesn't have an interactive tutorial requiring Link to do these moves, just signs passively explaining how to do them.

Copy link
Contributor

Choose a reason for hiding this comment

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

Opinion: These names seem fine, especially if they are not in OOT we don't have to worry about aligning the naming between the two games and they are so limited in scope.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess it will be fine then

void EnKendoJs_SetupExpertCourse(EnKendoJs* this) {
SET_WEEKEVENTREG(WEEKEVENTREG_STARTED_SWORDSMAN_MINIGAME);
this->timer = 120;
this->minigameRound = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
this->minigameRound = 0;
this->minigameRound = ENKENDOJS_NOVICE_SIDE_JUMP;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not using these constants for the expert course. The rounds in the expert course are simply the number of pairs of logs that have been raised, which is 5 in total.

if (this->unk_290 >= 140) {
if (this->unk_284 == 5) {
if (this->timer >= 140) {
if (this->minigameRound == 5) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if (this->minigameRound == 5) {
if (this->minigameRound == ENKENDOJS_NOVICE_SWORD_THRUST) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same here, not for the expert course.

@AngheloAlf AngheloAlf added documentation Improvements or additions to documentation Asset Needs-second-approval Second approval Needs-first-approval First approval Overlay and removed Asset labels Dec 4, 2025
Copy link
Contributor

@isghj5 isghj5 left a comment

Choose a reason for hiding this comment

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

Looks pretty solid, here are some thoughts:

@AngheloAlf AngheloAlf removed the Needs-first-approval First approval label Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation Needs-second-approval Second approval Overlay

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants