-
Notifications
You must be signed in to change notification settings - Fork 611
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
rename func_8002F368
, a getter for struct Player -> exchangeItemId
#2358
Conversation
s8 Actor_GetPlayerExchangeItemId(PlayState* play) { | ||
Player* player = GET_PLAYER(play); | ||
|
||
return player->exchangeItemId; |
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 thinking maybe Actor_GetOfferedExchangeItem
or something. As in, get the exchange item that player is offering to the actor.
Dont have to do with this one right away, am curious on other opinions.
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 slightly prefer "Player" to "Offered", I feel it makes me think less. Dunno about dropping Id
, it seems inconsistent rn (e.g. EXCH_ITEM_ODD_MUSHROOM
and not EXCH_ITEM_ID_ODD_MUSHROOM
) so idk
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.
so, the name as it is now is what you prefer?
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.
Either Actor_GetPlayerExchangeItemId
or Actor_GetPlayerExchangeItem
I guess, but I don't really care
s8 Actor_GetPlayerExchangeItemId(PlayState* play) { | ||
Player* player = GET_PLAYER(play); | ||
|
||
return player->exchangeItemId; |
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 slightly prefer "Player" to "Offered", I feel it makes me think less. Dunno about dropping Id
, it seems inconsistent rn (e.g. EXCH_ITEM_ODD_MUSHROOM
and not EXCH_ITEM_ID_ODD_MUSHROOM
) so idk
this PR invites anyone to discuss and decide on the name
my initial thought was to name it simply
Player_GetExchangeItemId
. I've reconsidered to settle forActor_GetPlayerExchangeItemId
now, though. arguably, the former might be not the best name, as discussed with @fig02 @ #2295 (comment)reasoning
all in all it seems that the general consensus is:
Actor_
for common functions%EntityName%_
for entity-specific onesso, following this rule,
Actor_GetPlayerExchangeItemId
seems to fit:P.S.
existing functions considered:
Actor_FindNearby
: an actor looks up another oneBgDyYoseizo_Vanish
: Great Fairy looks up an ocarina spot, besides the main purposeActor_GetProjectileActor
: an actor looks up a projectileBgGanonOtyuka_WaitToFall
: Ganon looks up a falling platformObjBean_CheckForHorseTrample
: Bean plant looks up a horse proximity