summaryrefslogtreecommitdiff
path: root/src/code/z_player_lib.c
diff options
context:
space:
mode:
authorTharo <17233964+Thar0@users.noreply.github.com>2024-07-02 22:47:37 +0100
committerGitHub <noreply@github.com>2024-07-02 14:47:37 -0700
commit6629597f82e8ed74bfe2f35393142d1cb27be6f7 (patch)
tree39f99b014814254ebebb70b9c175ee7441b322b2 /src/code/z_player_lib.c
parenteccbbd47dc0061f0ffedcb32eaf333be73aeb2cc (diff)
`z_parameter.c`: remaining functions, do action documentation, gfx cleanup (#1652)
* Parameter last functions Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Documentation for do actions and various gfx * Suggested changes * f prefix for texture scale numbers * Player_SetBButtonAmmo --------- Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
Diffstat (limited to 'src/code/z_player_lib.c')
-rw-r--r--src/code/z_player_lib.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c
index fb77070b4..d69854d43 100644
--- a/src/code/z_player_lib.c
+++ b/src/code/z_player_lib.c
@@ -581,15 +581,18 @@ ItemId Player_GetItemOnButton(PlayState* play, Player* player, EquipSlot slot) {
return item;
}
- if ((player->currentMask == PLAYER_MASK_BLAST) && (play->interfaceCtx.bButtonDoAction == DO_ACTION_EXPLODE)) {
+ if ((player->currentMask == PLAYER_MASK_BLAST) &&
+ (play->interfaceCtx.bButtonPlayerDoAction == DO_ACTION_EXPLODE)) {
return ITEM_F0;
}
- if ((player->currentMask == PLAYER_MASK_BREMEN) && (play->interfaceCtx.bButtonDoAction == DO_ACTION_MARCH)) {
+ if ((player->currentMask == PLAYER_MASK_BREMEN) &&
+ (play->interfaceCtx.bButtonPlayerDoAction == DO_ACTION_MARCH)) {
return ITEM_F1;
}
- if ((player->currentMask == PLAYER_MASK_KAMARO) && (play->interfaceCtx.bButtonDoAction == DO_ACTION_DANCE)) {
+ if ((player->currentMask == PLAYER_MASK_KAMARO) &&
+ (play->interfaceCtx.bButtonPlayerDoAction == DO_ACTION_DANCE)) {
return ITEM_F2;
}
@@ -623,8 +626,8 @@ PlayerItemAction func_80123810(PlayState* play) {
if (gSaveContext.save.unk_06 == 0) {
if (CHECK_BTN_ANY(CONTROLLER1(&play->state)->press.button, BTN_A | BTN_B)) {
- play->interfaceCtx.unk_222 = 0;
- play->interfaceCtx.unk_224 = 0;
+ play->interfaceCtx.bButtonInterfaceDoActionActive = false;
+ play->interfaceCtx.bButtonInterfaceDoAction = 0;
Interface_SetHudVisibility(play->msgCtx.hudVisibility);
return PLAYER_IA_MINUS1;
}
@@ -637,8 +640,8 @@ PlayerItemAction func_80123810(PlayState* play) {
i++;
itemId = Player_GetItemOnButton(play, player, i);
- play->interfaceCtx.unk_222 = 0;
- play->interfaceCtx.unk_224 = 0;
+ play->interfaceCtx.bButtonInterfaceDoActionActive = false;
+ play->interfaceCtx.bButtonInterfaceDoAction = 0;
Interface_SetHudVisibility(play->msgCtx.hudVisibility);
if ((itemId >= ITEM_FD) || ((itemAction = play->unk_18794(play, player, itemId)) <= PLAYER_IA_MINUS1)) {
@@ -1360,8 +1363,8 @@ bool func_80123F14(PlayState* play) {
return player->stateFlags1 & PLAYER_STATE1_800000;
}
-s32 func_80123F2C(PlayState* play, s32 ammo) {
- play->unk_1887C = ammo + 1;
+s32 Player_SetBButtonAmmo(PlayState* play, s32 ammo) {
+ play->bButtonAmmoPlusOne = ammo + 1;
return 1;
}