From db6268a12e11c52867bf9d0307f28ab6bbf8498c Mon Sep 17 00:00:00 2001 From: engineer124 <47598039+engineer124@users.noreply.github.com> Date: Tue, 11 Jul 2023 09:28:25 +1000 Subject: [PATCH] Template Docs For Player Action (#1279) * generic action names * more docs * add comment * more renaming * do nothing * another rename * Swap Init * simplify name * more cleanup * setup * deku stick * PR Review * rm comment * missed some --- include/z64player.h | 4 +- .../actors/ovl_player_actor/z_player.c | 1295 ++++++++--------- tools/disasm/functions.txt | 248 ++-- tools/disasm/variables.txt | 2 +- 4 files changed, 774 insertions(+), 775 deletions(-) diff --git a/include/z64player.h b/include/z64player.h index 29f9f7697f..b74b5846ac 100644 --- a/include/z64player.h +++ b/include/z64player.h @@ -1072,7 +1072,7 @@ typedef enum PlayerUnkAA5 { } PlayerUnkAA5; typedef void (*PlayerActionFunc)(struct Player* this, struct PlayState* play); -typedef s32 (*PlayerFuncAC4)(struct Player* this, struct PlayState* play); +typedef s32 (*PlayerUpperActionFunc)(struct Player* this, struct PlayState* play); typedef void (*PlayerFuncD58)(struct PlayState* play, struct Player* this); @@ -1198,7 +1198,7 @@ typedef struct Player { /* 0xAB8 */ f32 unk_AB8; /* 0xABC */ f32 unk_ABC; /* 0xAC0 */ f32 unk_AC0; - /* 0xAC4 */ PlayerFuncAC4 unk_AC4; + /* 0xAC4 */ PlayerUpperActionFunc upperActionFunc; // Upper body/item action functions /* 0xAC8 */ f32 unk_AC8; /* 0xACC */ s16 unk_ACC; /* 0xACE */ s8 unk_ACE; diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index d210bc91d1..acb5d28bee 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -59,8 +59,6 @@ void func_8082F8BC(PlayState* play, Player* this, PlayerItemAction itemAction); void func_80831990(PlayState* play, Player* this, ItemId item); -s32 func_80848BF4(Player* this, PlayState* play); - void func_80836988(Player* this, PlayState* play); void func_808484F0(Player* this); @@ -102,104 +100,129 @@ typedef struct AnimSfxEntry { } AnimSfxEntry; // size = 0x4 /* action funcs */ -void func_808496AC(Player* this, PlayState* play); -void func_808497A0(Player* this, PlayState* play); -void func_80849A9C(Player* this, PlayState* play); -void func_80849DD0(Player* this, PlayState* play); -void func_80849FE0(Player* this, PlayState* play); -void func_8084A26C(Player* this, PlayState* play); -void func_8084A5C0(Player* this, PlayState* play); -void func_8084A794(Player* this, PlayState* play); -void func_8084A884(Player* this, PlayState* play); -void func_8084A8E8(Player* this, PlayState* play); -void func_8084AB4C(Player* this, PlayState* play); -void func_8084AC84(Player* this, PlayState* play); -void func_8084AEEC(Player* this, PlayState* play); -void func_8084AF9C(Player* this, PlayState* play); -void func_8084B0EC(Player* this, PlayState* play); -void func_8084B288(Player* this, PlayState* play); -void func_8084B3B8(Player* this, PlayState* play); -void func_8084B4A8(Player* this, PlayState* play); -void func_8084B5C0(Player* this, PlayState* play); -void func_8084BAA4(Player* this, PlayState* play); -void func_8084BBF0(Player* this, PlayState* play); -void func_8084BC64(Player* this, PlayState* play); -void func_8084BE40(Player* this, PlayState* play); -void func_8084BF28(Player* this, PlayState* play); -void func_8084BFDC(Player* this, PlayState* play); -void func_8084C16C(Player* this, PlayState* play); -void func_8084C6EC(Player* this, PlayState* play); -void func_8084C94C(Player* this, PlayState* play); -void func_8084CA24(Player* this, PlayState* play); -void func_8084CB58(Player* this, PlayState* play); -void func_8084CCEC(Player* this, PlayState* play); -void func_8084CE84(Player* this, PlayState* play); -void func_8084D18C(Player* this, PlayState* play); -void func_8084D4EC(Player* this, PlayState* play); -void func_8084D770(Player* this, PlayState* play); -void func_8084D820(Player* this, PlayState* play); -void func_8084E034(Player* this, PlayState* play); -void func_8084E25C(Player* this, PlayState* play); -void func_8084E334(Player* this, PlayState* play); -void func_8084E434(Player* this, PlayState* play); -void func_8084E4E4(Player* this, PlayState* play); -void func_8084E58C(Player* this, PlayState* play); -void func_8084E65C(Player* this, PlayState* play); -void func_8084E724(Player* this, PlayState* play); -void func_8084E980(Player* this, PlayState* play); -void func_8084ED9C(Player* this, PlayState* play); -void func_8084EE50(Player* this, PlayState* play); -void func_8084EF9C(Player* this, PlayState* play); -void func_8084F1B8(Player* this, PlayState* play); -void func_8084F3DC(Player* this, PlayState* play); -void func_8084F4E8(Player* this, PlayState* play); -void func_8084FC0C(Player* this, PlayState* play); -void func_8084FE7C(Player* this, PlayState* play); -void func_808505D0(Player* this, PlayState* play); -void func_808508C8(Player* this, PlayState* play); -void func_80850B18(Player* this, PlayState* play); -void func_80850D68(Player* this, PlayState* play); -void func_808513EC(Player* this, PlayState* play); -void func_80851588(Player* this, PlayState* play); -void func_808516B4(Player* this, PlayState* play); -void func_808519FC(Player* this, PlayState* play); -void func_80851B58(Player* this, PlayState* play); -void func_80851BD4(Player* this, PlayState* play); -void func_8085269C(Player* this, PlayState* play); -void func_80852B28(Player* this, PlayState* play); -void func_80852C04(Player* this, PlayState* play); -void func_80852FD4(Player* this, PlayState* play); -void func_80853194(Player* this, PlayState* play); -void func_808534C0(Player* this, PlayState* play); -void func_80853754(Player* this, PlayState* play); -void func_80853850(Player* this, PlayState* play); -void func_80853A5C(Player* this, PlayState* play); -void func_80853CC0(Player* this, PlayState* play); -void func_80853D68(Player* this, PlayState* play); -void func_80854010(Player* this, PlayState* play); -void func_808540A0(Player* this, PlayState* play); -void func_80854118(Player* this, PlayState* play); -void func_8085421C(Player* this, PlayState* play); -void func_8085437C(Player* this, PlayState* play); -void func_8085439C(Player* this, PlayState* play); -void func_80854430(Player* this, PlayState* play); -void func_80854614(Player* this, PlayState* play); -void func_808546D0(Player* this, PlayState* play); -void func_80854800(Player* this, PlayState* play); -void func_808548B8(Player* this, PlayState* play); -void func_80854C70(Player* this, PlayState* play); -void func_808553F4(Player* this, PlayState* play); -void func_80855818(Player* this, PlayState* play); -void func_80855A7C(Player* this, PlayState* play); -void func_80855AF4(Player* this, PlayState* play); -void func_80855B9C(Player* this, PlayState* play); -void func_80855C28(Player* this, PlayState* play); -void func_80855E08(Player* this, PlayState* play); -void func_808561B0(Player* this, PlayState* play); -void func_80856918(Player* this, PlayState* play); -void func_808573A4(Player* this, PlayState* play); -void func_80857BE8(Player* this, PlayState* play); -void func_8085B08C(Player* this, PlayState* play); +void Player_Action_0(Player* this, PlayState* play); +void Player_Action_1(Player* this, PlayState* play); +void Player_Action_2(Player* this, PlayState* play); +void Player_Action_3(Player* this, PlayState* play); +void Player_Action_4(Player* this, PlayState* play); +void Player_Action_5(Player* this, PlayState* play); +void Player_Action_6(Player* this, PlayState* play); +void Player_Action_7(Player* this, PlayState* play); +void Player_Action_8(Player* this, PlayState* play); +void Player_Action_9(Player* this, PlayState* play); +void Player_Action_10(Player* this, PlayState* play); +void Player_Action_11(Player* this, PlayState* play); +void Player_Action_12(Player* this, PlayState* play); +void Player_Action_13(Player* this, PlayState* play); +void Player_Action_14(Player* this, PlayState* play); +void Player_Action_15(Player* this, PlayState* play); +void Player_Action_16(Player* this, PlayState* play); +void Player_Action_17(Player* this, PlayState* play); +void Player_Action_18(Player* this, PlayState* play); +void Player_Action_19(Player* this, PlayState* play); +void Player_Action_20(Player* this, PlayState* play); +void Player_Action_21(Player* this, PlayState* play); +void Player_Action_22(Player* this, PlayState* play); +void Player_Action_23(Player* this, PlayState* play); +void Player_Action_24(Player* this, PlayState* play); +void Player_Action_25(Player* this, PlayState* play); +void Player_Action_26(Player* this, PlayState* play); +void Player_Action_27(Player* this, PlayState* play); +void Player_Action_28(Player* this, PlayState* play); +void Player_Action_29(Player* this, PlayState* play); +void Player_Action_30(Player* this, PlayState* play); +void Player_Action_31(Player* this, PlayState* play); +void Player_Action_32(Player* this, PlayState* play); +void Player_Action_33(Player* this, PlayState* play); +void Player_Action_34(Player* this, PlayState* play); +void Player_Action_35(Player* this, PlayState* play); +void Player_Action_36(Player* this, PlayState* play); +void Player_Action_37(Player* this, PlayState* play); +void Player_Action_38(Player* this, PlayState* play); +void Player_Action_39(Player* this, PlayState* play); +void Player_Action_40(Player* this, PlayState* play); +void Player_Action_41(Player* this, PlayState* play); +void Player_Action_42(Player* this, PlayState* play); +void Player_Action_43(Player* this, PlayState* play); +void Player_Action_44(Player* this, PlayState* play); +void Player_Action_45(Player* this, PlayState* play); +void Player_Action_46(Player* this, PlayState* play); +void Player_Action_47(Player* this, PlayState* play); +void Player_Action_48(Player* this, PlayState* play); +void Player_Action_49(Player* this, PlayState* play); +void Player_Action_50(Player* this, PlayState* play); +void Player_Action_51(Player* this, PlayState* play); +void Player_Action_52(Player* this, PlayState* play); +void Player_Action_53(Player* this, PlayState* play); +void Player_Action_54(Player* this, PlayState* play); +void Player_Action_55(Player* this, PlayState* play); +void Player_Action_56(Player* this, PlayState* play); +void Player_Action_57(Player* this, PlayState* play); +void Player_Action_58(Player* this, PlayState* play); +void Player_Action_59(Player* this, PlayState* play); +void Player_Action_60(Player* this, PlayState* play); +void Player_Action_61(Player* this, PlayState* play); +void Player_Action_62(Player* this, PlayState* play); +void Player_Action_63(Player* this, PlayState* play); +void Player_Action_64(Player* this, PlayState* play); +void Player_Action_65(Player* this, PlayState* play); +void Player_Action_66(Player* this, PlayState* play); +void Player_Action_67(Player* this, PlayState* play); +void Player_Action_68(Player* this, PlayState* play); +void Player_Action_69(Player* this, PlayState* play); +void Player_Action_70(Player* this, PlayState* play); +void Player_Action_71(Player* this, PlayState* play); +void Player_Action_72(Player* this, PlayState* play); +void Player_Action_73(Player* this, PlayState* play); +void Player_Action_74(Player* this, PlayState* play); +void Player_Action_75(Player* this, PlayState* play); +void Player_Action_76(Player* this, PlayState* play); +void Player_Action_77(Player* this, PlayState* play); +void Player_Action_78(Player* this, PlayState* play); +void Player_Action_79(Player* this, PlayState* play); +void Player_Action_80(Player* this, PlayState* play); +void Player_Action_81(Player* this, PlayState* play); +void Player_Action_82(Player* this, PlayState* play); +void Player_Action_83(Player* this, PlayState* play); +void Player_Action_84(Player* this, PlayState* play); +void Player_Action_85(Player* this, PlayState* play); +void Player_Action_86(Player* this, PlayState* play); +void Player_Action_87(Player* this, PlayState* play); +void Player_Action_88(Player* this, PlayState* play); +void Player_Action_89(Player* this, PlayState* play); +void Player_Action_90(Player* this, PlayState* play); +void Player_Action_91(Player* this, PlayState* play); +void Player_Action_92(Player* this, PlayState* play); +void Player_Action_93(Player* this, PlayState* play); +void Player_Action_94(Player* this, PlayState* play); +void Player_Action_95(Player* this, PlayState* play); +void Player_Action_96(Player* this, PlayState* play); +void Player_Action_97(Player* this, PlayState* play); + +s32 Player_UpperAction_0(Player* this, PlayState* play); +s32 Player_UpperAction_1(Player* this, PlayState* play); +s32 Player_UpperAction_2(Player* this, PlayState* play); +s32 Player_UpperAction_3(Player* this, PlayState* play); +s32 Player_UpperAction_4(Player* this, PlayState* play); +s32 Player_UpperAction_5(Player* this, PlayState* play); +s32 Player_UpperAction_6(Player* this, PlayState* play); +s32 Player_UpperAction_7(Player* this, PlayState* play); +s32 Player_UpperAction_8(Player* this, PlayState* play); +s32 Player_UpperAction_9(Player* this, PlayState* play); +s32 Player_UpperAction_10(Player* this, PlayState* play); +s32 Player_UpperAction_11(Player* this, PlayState* play); +s32 Player_UpperAction_12(Player* this, PlayState* play); +s32 Player_UpperAction_13(Player* this, PlayState* play); +s32 Player_UpperAction_14(Player* this, PlayState* play); +s32 Player_UpperAction_15(Player* this, PlayState* play); +s32 Player_UpperAction_16(Player* this, PlayState* play); + +void Player_InitItemAction_DoNothing(PlayState* play, Player* this); +void Player_InitItemAction_DekuStick(PlayState* play, Player* this); +void Player_InitItemAction_2(PlayState* play, Player* this); +void Player_InitItemAction_SpawnExplosive(PlayState* play, Player* this); +void Player_InitItemAction_SpawnHookshot(PlayState* play, Player* this); +void Player_InitItemAction_5(PlayState* play, Player* this); s32 func_80839518(Player* this, PlayState* play); s32 func_808365DC(Player* this, PlayState* play); @@ -217,23 +240,6 @@ s32 func_80834DFC(Player* this, PlayState* play); s32 func_80838A90(Player* this, PlayState* play); s32 func_8083A0CC(Player* this, PlayState* play); -s32 func_80848780(Player* this, PlayState* play); -s32 func_808487B8(Player* this, PlayState* play); -s32 func_80848B6C(Player* this, PlayState* play); -s32 func_808490B4(Player* this, PlayState* play); -s32 func_808491B4(Player* this, PlayState* play); -s32 func_80848808(Player* this, PlayState* play); -s32 func_8084894C(Player* this, PlayState* play); -s32 func_80848A0C(Player* this, PlayState* play); -s32 func_80848AB0(Player* this, PlayState* play); -s32 func_80848E4C(Player* this, PlayState* play); -s32 func_80849054(Player* this, PlayState* play); -s32 func_8084923C(Player* this, PlayState* play); -s32 func_808492C4(Player* this, PlayState* play); -s32 func_8084933C(Player* this, PlayState* play); -s32 func_80849570(Player* this, PlayState* play); -s32 func_80849620(Player* this, PlayState* play); - /* Init Mode functions */ void Player_InitMode_0(PlayState* play, Player* this); void Player_InitMode_1(PlayState* play, Player* this); @@ -323,14 +329,6 @@ void Player_CsAnim_17(PlayState* play, Player* this, void* anim); // PlayerAnim void Player_CsAnim_18(PlayState* play, Player* this, void* entry); // AnimSfxEntry* entry void Player_CsAnim_19(PlayState* play, Player* this, void* anim); // PlayerAnimationHeader* anim -// ItemActions -void func_8082F594(PlayState* play, Player* this); -void func_8082F5A4(PlayState* play, Player* this); -void func_8082F8A0(PlayState* play, Player* this); -void func_8082F5C0(PlayState* play, Player* this); -void func_8082F7F4(PlayState* play, Player* this); -void Player_SpawnExplosive(PlayState* play, Player* this); - typedef struct struct_8085C2A4 { /* 0x0 */ PlayerAnimationHeader* unk_0; /* 0x4 */ PlayerAnimationHeader* unk_4; @@ -2847,8 +2845,8 @@ void func_8082F1AC(PlayState* play, Player* this) { } } -void func_8082F43C(PlayState* play, Player* this, PlayerFuncAC4 arg2) { - this->unk_AC4 = arg2; +void Player_SetUpperAction(PlayState* play, Player* this, PlayerUpperActionFunc upperActionFunc) { + this->upperActionFunc = upperActionFunc; this->unk_ACE = 0; this->unk_AC8 = 0.0f; func_8082E00C(this); @@ -2975,15 +2973,189 @@ PlayerItemAction Player_ItemToItemAction(Player* this, ItemId item) { } } -void func_8082F594(PlayState* play, Player* this) { +PlayerUpperActionFunc D_8085C9F0[PLAYER_IA_MAX] = { + Player_UpperAction_0, // PLAYER_IA_NONE + Player_UpperAction_0, // PLAYER_IA_LAST_USED + Player_UpperAction_0, // PLAYER_IA_FISHING_ROD + Player_UpperAction_1, // PLAYER_IA_SWORD_KOKIRI + Player_UpperAction_1, // PLAYER_IA_SWORD_RAZOR + Player_UpperAction_1, // PLAYER_IA_SWORD_GILDED + Player_UpperAction_1, // PLAYER_IA_SWORD_TWO_HANDED + Player_UpperAction_0, // PLAYER_IA_DEKU_STICK + Player_UpperAction_0, // PLAYER_IA_ZORA_FINS + Player_UpperAction_6, // PLAYER_IA_BOW + Player_UpperAction_6, // PLAYER_IA_BOW_FIRE + Player_UpperAction_6, // PLAYER_IA_BOW_ICE + Player_UpperAction_6, // PLAYER_IA_BOW_LIGHT + Player_UpperAction_6, // PLAYER_IA_HOOKSHOT + Player_UpperAction_10, // PLAYER_IA_BOMB + Player_UpperAction_10, // PLAYER_IA_POWDER_KEG + Player_UpperAction_10, // PLAYER_IA_BOMBCHU + Player_UpperAction_11, // PLAYER_IA_11 + Player_UpperAction_6, // PLAYER_IA_DEKU_NUT + Player_UpperAction_0, // PLAYER_IA_PICTOGRAPH_BOX + Player_UpperAction_0, // PLAYER_IA_OCARINA + Player_UpperAction_0, // PLAYER_IA_BOTTLE_EMPTY + Player_UpperAction_0, // PLAYER_IA_BOTTLE_FISH + Player_UpperAction_0, // PLAYER_IA_BOTTLE_SPRING_WATER + Player_UpperAction_0, // PLAYER_IA_BOTTLE_HOT_SPRING_WATER + Player_UpperAction_0, // PLAYER_IA_BOTTLE_ZORA_EGG + Player_UpperAction_0, // PLAYER_IA_BOTTLE_DEKU_PRINCESS + Player_UpperAction_0, // PLAYER_IA_BOTTLE_GOLD_DUST + Player_UpperAction_0, // PLAYER_IA_BOTTLE_1C + Player_UpperAction_0, // PLAYER_IA_BOTTLE_SEA_HORSE + Player_UpperAction_0, // PLAYER_IA_BOTTLE_MUSHROOM + Player_UpperAction_0, // PLAYER_IA_BOTTLE_HYLIAN_LOACH + Player_UpperAction_0, // PLAYER_IA_BOTTLE_BUG + Player_UpperAction_0, // PLAYER_IA_BOTTLE_POE + Player_UpperAction_0, // PLAYER_IA_BOTTLE_BIG_POE + Player_UpperAction_0, // PLAYER_IA_BOTTLE_POTION_RED + Player_UpperAction_0, // PLAYER_IA_BOTTLE_POTION_BLUE + Player_UpperAction_0, // PLAYER_IA_BOTTLE_POTION_GREEN + Player_UpperAction_0, // PLAYER_IA_BOTTLE_MILK + Player_UpperAction_0, // PLAYER_IA_BOTTLE_MILK_HALF + Player_UpperAction_0, // PLAYER_IA_BOTTLE_CHATEAU + Player_UpperAction_0, // PLAYER_IA_BOTTLE_FAIRY + Player_UpperAction_0, // PLAYER_IA_MOONS_TEAR + Player_UpperAction_0, // PLAYER_IA_DEED_LAND + Player_UpperAction_0, // PLAYER_IA_ROOM_KEY + Player_UpperAction_0, // PLAYER_IA_LETTER_TO_KAFEI + Player_UpperAction_0, // PLAYER_IA_MAGIC_BEANS + Player_UpperAction_0, // PLAYER_IA_DEED_SWAMP + Player_UpperAction_0, // PLAYER_IA_DEED_MOUNTAIN + Player_UpperAction_0, // PLAYER_IA_DEED_OCEAN + Player_UpperAction_0, // PLAYER_IA_32 + Player_UpperAction_0, // PLAYER_IA_LETTER_MAMA + Player_UpperAction_0, // PLAYER_IA_34 + Player_UpperAction_0, // PLAYER_IA_35 + Player_UpperAction_0, // PLAYER_IA_PENDANT_MEMORIES + Player_UpperAction_0, // PLAYER_IA_37 + Player_UpperAction_0, // PLAYER_IA_38 + Player_UpperAction_0, // PLAYER_IA_39 + Player_UpperAction_0, // PLAYER_IA_MASK_TRUTH + Player_UpperAction_0, // PLAYER_IA_MASK_KAFEIS_MASK + Player_UpperAction_0, // PLAYER_IA_MASK_ALL_NIGHT + Player_UpperAction_0, // PLAYER_IA_MASK_BUNNY + Player_UpperAction_0, // PLAYER_IA_MASK_KEATON + Player_UpperAction_0, // PLAYER_IA_MASK_GARO + Player_UpperAction_0, // PLAYER_IA_MASK_ROMANI + Player_UpperAction_0, // PLAYER_IA_MASK_CIRCUS_LEADER + Player_UpperAction_0, // PLAYER_IA_MASK_POSTMAN + Player_UpperAction_0, // PLAYER_IA_MASK_COUPLE + Player_UpperAction_0, // PLAYER_IA_MASK_GREAT_FAIRY + Player_UpperAction_0, // PLAYER_IA_MASK_GIBDO + Player_UpperAction_0, // PLAYER_IA_MASK_DON_GERO + Player_UpperAction_0, // PLAYER_IA_MASK_KAMARO + Player_UpperAction_0, // PLAYER_IA_MASK_CAPTAIN + Player_UpperAction_0, // PLAYER_IA_MASK_STONE + Player_UpperAction_0, // PLAYER_IA_MASK_BREMEN + Player_UpperAction_0, // PLAYER_IA_MASK_BLAST + Player_UpperAction_0, // PLAYER_IA_MASK_SCENTS + Player_UpperAction_0, // PLAYER_IA_MASK_GIANT + Player_UpperAction_0, // PLAYER_IA_MASK_FIERCE_DEITY + Player_UpperAction_0, // PLAYER_IA_MASK_GORON + Player_UpperAction_0, // PLAYER_IA_MASK_ZORA + Player_UpperAction_0, // PLAYER_IA_MASK_DEKU + Player_UpperAction_0, // PLAYER_IA_LENS_OF_TRUTH +}; + +typedef void (*PlayerInitItemActionFunc)(PlayState*, Player*); + +PlayerInitItemActionFunc sPlayerInitItemActionFuncs[PLAYER_IA_MAX] = { + Player_InitItemAction_DoNothing, // PLAYER_IA_NONE + Player_InitItemAction_DoNothing, // PLAYER_IA_LAST_USED + Player_InitItemAction_DoNothing, // PLAYER_IA_FISHING_ROD + Player_InitItemAction_DoNothing, // PLAYER_IA_SWORD_KOKIRI + Player_InitItemAction_DoNothing, // PLAYER_IA_SWORD_RAZOR + Player_InitItemAction_DoNothing, // PLAYER_IA_SWORD_GILDED + Player_InitItemAction_DoNothing, // PLAYER_IA_SWORD_TWO_HANDED + Player_InitItemAction_DekuStick, // PLAYER_IA_DEKU_STICK + Player_InitItemAction_5, // PLAYER_IA_ZORA_FINS + Player_InitItemAction_2, // PLAYER_IA_BOW + Player_InitItemAction_2, // PLAYER_IA_BOW_FIRE + Player_InitItemAction_2, // PLAYER_IA_BOW_ICE + Player_InitItemAction_2, // PLAYER_IA_BOW_LIGHT + Player_InitItemAction_SpawnHookshot, // PLAYER_IA_HOOKSHOT + Player_InitItemAction_SpawnExplosive, // PLAYER_IA_BOMB + Player_InitItemAction_SpawnExplosive, // PLAYER_IA_POWDER_KEG + Player_InitItemAction_SpawnExplosive, // PLAYER_IA_BOMBCHU + Player_InitItemAction_5, // PLAYER_IA_11 + Player_InitItemAction_2, // PLAYER_IA_DEKU_NUT + Player_InitItemAction_DoNothing, // PLAYER_IA_PICTOGRAPH_BOX + Player_InitItemAction_DoNothing, // PLAYER_IA_OCARINA + Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_EMPTY + Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_FISH + Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_SPRING_WATER + Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_HOT_SPRING_WATER + Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_ZORA_EGG + Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_DEKU_PRINCESS + Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_GOLD_DUST + Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_1C + Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_SEA_HORSE + Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_MUSHROOM + Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_HYLIAN_LOACH + Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_BUG + Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_POE + Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_BIG_POE + Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_POTION_RED + Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_POTION_BLUE + Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_POTION_GREEN + Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_MILK + Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_MILK_HALF + Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_CHATEAU + Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_FAIRY + Player_InitItemAction_DoNothing, // PLAYER_IA_MOONS_TEAR + Player_InitItemAction_DoNothing, // PLAYER_IA_DEED_LAND + Player_InitItemAction_DoNothing, // PLAYER_IA_ROOM_KEY + Player_InitItemAction_DoNothing, // PLAYER_IA_LETTER_TO_KAFEI + Player_InitItemAction_DoNothing, // PLAYER_IA_MAGIC_BEANS + Player_InitItemAction_DoNothing, // PLAYER_IA_DEED_SWAMP + Player_InitItemAction_DoNothing, // PLAYER_IA_DEED_MOUNTAIN + Player_InitItemAction_DoNothing, // PLAYER_IA_DEED_OCEAN + Player_InitItemAction_DoNothing, // PLAYER_IA_32 + Player_InitItemAction_DoNothing, // PLAYER_IA_LETTER_MAMA + Player_InitItemAction_DoNothing, // PLAYER_IA_34 + Player_InitItemAction_DoNothing, // PLAYER_IA_35 + Player_InitItemAction_DoNothing, // PLAYER_IA_PENDANT_MEMORIES + Player_InitItemAction_DoNothing, // PLAYER_IA_37 + Player_InitItemAction_DoNothing, // PLAYER_IA_38 + Player_InitItemAction_DoNothing, // PLAYER_IA_39 + Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_TRUTH + Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_KAFEIS_MASK + Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_ALL_NIGHT + Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_BUNNY + Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_KEATON + Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_GARO + Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_ROMANI + Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_CIRCUS_LEADER + Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_POSTMAN + Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_COUPLE + Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_GREAT_FAIRY + Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_GIBDO + Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_DON_GERO + Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_KAMARO + Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_CAPTAIN + Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_STONE + Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_BREMEN + Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_BLAST + Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_SCENTS + Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_GIANT + Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_FIERCE_DEITY + Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_GORON + Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_ZORA + Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_DEKU + Player_InitItemAction_DoNothing, // PLAYER_IA_LENS_OF_TRUTH +}; + +void Player_InitItemAction_DoNothing(PlayState* play, Player* this) { } -void func_8082F5A4(PlayState* play, Player* this) { +void Player_InitItemAction_DekuStick(PlayState* play, Player* this) { this->unk_B28 = 0; this->unk_B0C = 1.0f; } -void func_8082F5C0(PlayState* play, Player* this) { +void Player_InitItemAction_2(PlayState* play, Player* this) { this->stateFlags1 |= PLAYER_STATE1_8; if (this->heldItemAction == PLAYER_IA_DEKU_NUT) { @@ -2994,179 +3166,6 @@ void func_8082F5C0(PlayState* play, Player* this) { this->unk_ACC = 0; } -PlayerFuncAC4 D_8085C9F0[PLAYER_IA_MAX] = { - func_80848780, // PLAYER_IA_NONE - func_80848780, // PLAYER_IA_LAST_USED - func_80848780, // PLAYER_IA_FISHING_ROD - func_808487B8, // PLAYER_IA_SWORD_KOKIRI - func_808487B8, // PLAYER_IA_SWORD_RAZOR - func_808487B8, // PLAYER_IA_SWORD_GILDED - func_808487B8, // PLAYER_IA_SWORD_TWO_HANDED - func_80848780, // PLAYER_IA_DEKU_STICK - func_80848780, // PLAYER_IA_ZORA_FINS - func_80848B6C, // PLAYER_IA_BOW - func_80848B6C, // PLAYER_IA_BOW_FIRE - func_80848B6C, // PLAYER_IA_BOW_ICE - func_80848B6C, // PLAYER_IA_BOW_LIGHT - func_80848B6C, // PLAYER_IA_HOOKSHOT - func_808490B4, // PLAYER_IA_BOMB - func_808490B4, // PLAYER_IA_POWDER_KEG - func_808490B4, // PLAYER_IA_BOMBCHU - func_808491B4, // PLAYER_IA_11 - func_80848B6C, // PLAYER_IA_DEKU_NUT - func_80848780, // PLAYER_IA_PICTOGRAPH_BOX - func_80848780, // PLAYER_IA_OCARINA - func_80848780, // PLAYER_IA_BOTTLE_EMPTY - func_80848780, // PLAYER_IA_BOTTLE_FISH - func_80848780, // PLAYER_IA_BOTTLE_SPRING_WATER - func_80848780, // PLAYER_IA_BOTTLE_HOT_SPRING_WATER - func_80848780, // PLAYER_IA_BOTTLE_ZORA_EGG - func_80848780, // PLAYER_IA_BOTTLE_DEKU_PRINCESS - func_80848780, // PLAYER_IA_BOTTLE_GOLD_DUST - func_80848780, // PLAYER_IA_BOTTLE_1C - func_80848780, // PLAYER_IA_BOTTLE_SEA_HORSE - func_80848780, // PLAYER_IA_BOTTLE_MUSHROOM - func_80848780, // PLAYER_IA_BOTTLE_HYLIAN_LOACH - func_80848780, // PLAYER_IA_BOTTLE_BUG - func_80848780, // PLAYER_IA_BOTTLE_POE - func_80848780, // PLAYER_IA_BOTTLE_BIG_POE - func_80848780, // PLAYER_IA_BOTTLE_POTION_RED - func_80848780, // PLAYER_IA_BOTTLE_POTION_BLUE - func_80848780, // PLAYER_IA_BOTTLE_POTION_GREEN - func_80848780, // PLAYER_IA_BOTTLE_MILK - func_80848780, // PLAYER_IA_BOTTLE_MILK_HALF - func_80848780, // PLAYER_IA_BOTTLE_CHATEAU - func_80848780, // PLAYER_IA_BOTTLE_FAIRY - func_80848780, // PLAYER_IA_MOONS_TEAR - func_80848780, // PLAYER_IA_DEED_LAND - func_80848780, // PLAYER_IA_ROOM_KEY - func_80848780, // PLAYER_IA_LETTER_TO_KAFEI - func_80848780, // PLAYER_IA_MAGIC_BEANS - func_80848780, // PLAYER_IA_DEED_SWAMP - func_80848780, // PLAYER_IA_DEED_MOUNTAIN - func_80848780, // PLAYER_IA_DEED_OCEAN - func_80848780, // PLAYER_IA_32 - func_80848780, // PLAYER_IA_LETTER_MAMA - func_80848780, // PLAYER_IA_34 - func_80848780, // PLAYER_IA_35 - func_80848780, // PLAYER_IA_PENDANT_MEMORIES - func_80848780, // PLAYER_IA_37 - func_80848780, // PLAYER_IA_38 - func_80848780, // PLAYER_IA_39 - func_80848780, // PLAYER_IA_MASK_TRUTH - func_80848780, // PLAYER_IA_MASK_KAFEIS_MASK - func_80848780, // PLAYER_IA_MASK_ALL_NIGHT - func_80848780, // PLAYER_IA_MASK_BUNNY - func_80848780, // PLAYER_IA_MASK_KEATON - func_80848780, // PLAYER_IA_MASK_GARO - func_80848780, // PLAYER_IA_MASK_ROMANI - func_80848780, // PLAYER_IA_MASK_CIRCUS_LEADER - func_80848780, // PLAYER_IA_MASK_POSTMAN - func_80848780, // PLAYER_IA_MASK_COUPLE - func_80848780, // PLAYER_IA_MASK_GREAT_FAIRY - func_80848780, // PLAYER_IA_MASK_GIBDO - func_80848780, // PLAYER_IA_MASK_DON_GERO - func_80848780, // PLAYER_IA_MASK_KAMARO - func_80848780, // PLAYER_IA_MASK_CAPTAIN - func_80848780, // PLAYER_IA_MASK_STONE - func_80848780, // PLAYER_IA_MASK_BREMEN - func_80848780, // PLAYER_IA_MASK_BLAST - func_80848780, // PLAYER_IA_MASK_SCENTS - func_80848780, // PLAYER_IA_MASK_GIANT - func_80848780, // PLAYER_IA_MASK_FIERCE_DEITY - func_80848780, // PLAYER_IA_MASK_GORON - func_80848780, // PLAYER_IA_MASK_ZORA - func_80848780, // PLAYER_IA_MASK_DEKU - func_80848780, // PLAYER_IA_LENS_OF_TRUTH -}; - -// sPlayerItemActionInits? -void (*D_8085CB3C[PLAYER_IA_MAX])(PlayState*, Player*) = { - func_8082F594, // PLAYER_IA_NONE - func_8082F594, // PLAYER_IA_LAST_USED - func_8082F594, // PLAYER_IA_FISHING_ROD - func_8082F594, // PLAYER_IA_SWORD_KOKIRI - func_8082F594, // PLAYER_IA_SWORD_RAZOR - func_8082F594, // PLAYER_IA_SWORD_GILDED - func_8082F594, // PLAYER_IA_SWORD_TWO_HANDED - func_8082F5A4, // PLAYER_IA_DEKU_STICK - func_8082F8A0, // PLAYER_IA_ZORA_FINS - func_8082F5C0, // PLAYER_IA_BOW - func_8082F5C0, // PLAYER_IA_BOW_FIRE - func_8082F5C0, // PLAYER_IA_BOW_ICE - func_8082F5C0, // PLAYER_IA_BOW_LIGHT - func_8082F7F4, // PLAYER_IA_HOOKSHOT - Player_SpawnExplosive, // PLAYER_IA_BOMB - Player_SpawnExplosive, // PLAYER_IA_POWDER_KEG - Player_SpawnExplosive, // PLAYER_IA_BOMBCHU - func_8082F8A0, // PLAYER_IA_11 - func_8082F5C0, // PLAYER_IA_DEKU_NUT - func_8082F594, // PLAYER_IA_PICTOGRAPH_BOX - func_8082F594, // PLAYER_IA_OCARINA - func_8082F594, // PLAYER_IA_BOTTLE_EMPTY - func_8082F594, // PLAYER_IA_BOTTLE_FISH - func_8082F594, // PLAYER_IA_BOTTLE_SPRING_WATER - func_8082F594, // PLAYER_IA_BOTTLE_HOT_SPRING_WATER - func_8082F594, // PLAYER_IA_BOTTLE_ZORA_EGG - func_8082F594, // PLAYER_IA_BOTTLE_DEKU_PRINCESS - func_8082F594, // PLAYER_IA_BOTTLE_GOLD_DUST - func_8082F594, // PLAYER_IA_BOTTLE_1C - func_8082F594, // PLAYER_IA_BOTTLE_SEA_HORSE - func_8082F594, // PLAYER_IA_BOTTLE_MUSHROOM - func_8082F594, // PLAYER_IA_BOTTLE_HYLIAN_LOACH - func_8082F594, // PLAYER_IA_BOTTLE_BUG - func_8082F594, // PLAYER_IA_BOTTLE_POE - func_8082F594, // PLAYER_IA_BOTTLE_BIG_POE - func_8082F594, // PLAYER_IA_BOTTLE_POTION_RED - func_8082F594, // PLAYER_IA_BOTTLE_POTION_BLUE - func_8082F594, // PLAYER_IA_BOTTLE_POTION_GREEN - func_8082F594, // PLAYER_IA_BOTTLE_MILK - func_8082F594, // PLAYER_IA_BOTTLE_MILK_HALF - func_8082F594, // PLAYER_IA_BOTTLE_CHATEAU - func_8082F594, // PLAYER_IA_BOTTLE_FAIRY - func_8082F594, // PLAYER_IA_MOONS_TEAR - func_8082F594, // PLAYER_IA_DEED_LAND - func_8082F594, // PLAYER_IA_ROOM_KEY - func_8082F594, // PLAYER_IA_LETTER_TO_KAFEI - func_8082F594, // PLAYER_IA_MAGIC_BEANS - func_8082F594, // PLAYER_IA_DEED_SWAMP - func_8082F594, // PLAYER_IA_DEED_MOUNTAIN - func_8082F594, // PLAYER_IA_DEED_OCEAN - func_8082F594, // PLAYER_IA_32 - func_8082F594, // PLAYER_IA_LETTER_MAMA - func_8082F594, // PLAYER_IA_34 - func_8082F594, // PLAYER_IA_35 - func_8082F594, // PLAYER_IA_PENDANT_MEMORIES - func_8082F594, // PLAYER_IA_37 - func_8082F594, // PLAYER_IA_38 - func_8082F594, // PLAYER_IA_39 - func_8082F594, // PLAYER_IA_MASK_TRUTH - func_8082F594, // PLAYER_IA_MASK_KAFEIS_MASK - func_8082F594, // PLAYER_IA_MASK_ALL_NIGHT - func_8082F594, // PLAYER_IA_MASK_BUNNY - func_8082F594, // PLAYER_IA_MASK_KEATON - func_8082F594, // PLAYER_IA_MASK_GARO - func_8082F594, // PLAYER_IA_MASK_ROMANI - func_8082F594, // PLAYER_IA_MASK_CIRCUS_LEADER - func_8082F594, // PLAYER_IA_MASK_POSTMAN - func_8082F594, // PLAYER_IA_MASK_COUPLE - func_8082F594, // PLAYER_IA_MASK_GREAT_FAIRY - func_8082F594, // PLAYER_IA_MASK_GIBDO - func_8082F594, // PLAYER_IA_MASK_DON_GERO - func_8082F594, // PLAYER_IA_MASK_KAMARO - func_8082F594, // PLAYER_IA_MASK_CAPTAIN - func_8082F594, // PLAYER_IA_MASK_STONE - func_8082F594, // PLAYER_IA_MASK_BREMEN - func_8082F594, // PLAYER_IA_MASK_BLAST - func_8082F594, // PLAYER_IA_MASK_SCENTS - func_8082F594, // PLAYER_IA_MASK_GIANT - func_8082F594, // PLAYER_IA_MASK_FIERCE_DEITY - func_8082F594, // PLAYER_IA_MASK_GORON - func_8082F594, // PLAYER_IA_MASK_ZORA - func_8082F594, // PLAYER_IA_MASK_DEKU - func_8082F594, // PLAYER_IA_LENS_OF_TRUTH -}; - void func_8082F5FC(Player* this, Actor* actor) { this->heldActor = actor; this->interactRangeActor = actor; @@ -3204,7 +3203,7 @@ ExplosiveInfo sPlayerExplosiveInfo[PLAYER_EXPLOSIVE_MAX] = { { ITEM_BOMBCHU, ACTOR_EN_BOM_CHU }, // PLAYER_EXPLOSIVE_BOMBCHU }; -void Player_SpawnExplosive(PlayState* play, Player* this) { +void Player_InitItemAction_SpawnExplosive(PlayState* play, Player* this) { PlayerExplosive explosiveType; ExplosiveInfo* explosiveInfo; Actor* explosiveActor; @@ -3245,8 +3244,7 @@ void Player_SpawnExplosive(PlayState* play, Player* this) { } } -// SpawnHookshot? -void func_8082F7F4(PlayState* play, Player* this) { +void Player_InitItemAction_SpawnHookshot(PlayState* play, Player* this) { ArmsHook* armsHook; this->stateFlags1 |= PLAYER_STATE1_8; @@ -3266,7 +3264,7 @@ void func_8082F7F4(PlayState* play, Player* this) { armsHook->unk_208 = this->transformation; } -void func_8082F8A0(PlayState* play, Player* this) { +void Player_InitItemAction_5(PlayState* play, Player* this) { this->stateFlags1 |= PLAYER_STATE1_1000000; } @@ -3280,7 +3278,7 @@ void func_8082F8BC(PlayState* play, Player* this, PlayerItemAction itemAction) { this->unk_B0C = 0.0f; this->unk_B28 = 0; - D_8085CB3C[itemAction](play, this); + sPlayerInitItemActionFuncs[itemAction](play, this); Player_SetModelGroup(this, this->modelGroup); } @@ -3666,7 +3664,7 @@ void func_808302CC(Player* this, PlayState* play) { f32 endFrame; f32 frameSpeed; - func_8082F43C(play, this, func_80848808); + Player_SetUpperAction(play, this, Player_UpperAction_2); nextModelAnimType = gPlayerModelTypes[this->nextModelGroup].modelAnimType; var_v1 = D_8085CD00[gPlayerModelTypes[this->modelGroup].modelAnimType][nextModelAnimType]; @@ -3773,7 +3771,7 @@ s32 func_808306F8(Player* this, PlayState* play) { (gSaveContext.magicState != MAGIC_STATE_IDLE)) { Audio_PlaySfx(NA_SE_SY_ERROR); } else { - func_8082F43C(play, this, func_80848BF4); + Player_SetUpperAction(play, this, Player_UpperAction_7); this->stateFlags3 |= PLAYER_STATE3_40; this->unk_ACC = 14; @@ -3846,11 +3844,11 @@ void func_808308DC(PlayState* play, Player* this) { } void func_808309CC(PlayState* play, Player* this) { - if (func_80848808 == this->unk_AC4) { + if (Player_UpperAction_2 == this->upperActionFunc) { func_808308DC(play, this); } - func_8082F43C(play, this, D_8085C9F0[this->heldItemAction]); + Player_SetUpperAction(play, this, D_8085C9F0[this->heldItemAction]); this->unk_ACC = 0; this->unk_AA4 = 0; func_8082DCA0(play, this); @@ -3879,7 +3877,7 @@ PlayerAnimationHeader* D_8085CFDC[2] = { }; PlayerAnimationHeader* func_80830A58(PlayState* play, Player* this) { - func_8082F43C(play, this, func_8084894C); + Player_SetUpperAction(play, this, Player_UpperAction_3); func_8082DCA0(play, this); if (this->unk_B40 < 0.5f) { @@ -3935,7 +3933,7 @@ s32 func_80830B88(PlayState* play, Player* this) { } void func_80830CE8(PlayState* play, Player* this) { - func_8082F43C(play, this, func_80848AB0); + Player_SetUpperAction(play, this, Player_UpperAction_5); if (this->itemAction <= PLAYER_IA_MINUS1) { func_80123C58(this); @@ -3969,7 +3967,7 @@ s32 func_80830DF0(Player* this, PlayState* play) { s32 func_80830E30(Player* this, PlayState* play) { if ((this->heldItemAction == PLAYER_IA_11) || (this->transformation == PLAYER_FORM_ZORA)) { - func_8082F43C(play, this, func_8084923C); + Player_SetUpperAction(play, this, Player_UpperAction_12); PlayerAnimation_PlayOnce(play, &this->unk_284, (this->meleeWeaponAnimation == PLAYER_MWA_ZORA_PUNCH_LEFT) @@ -4107,7 +4105,7 @@ s32 func_808313A8(PlayState* play, Player* this, Actor* actor) { void func_808313F0(Player* this, PlayState* play) { if (!func_808313A8(play, this, this->heldActor)) { - func_8082F43C(play, this, func_808490B4); + Player_SetUpperAction(play, this, Player_UpperAction_10); PlayerAnimation_PlayLoop(play, &this->unk_284, &gPlayerAnim_link_normal_carryB_wait); } } @@ -4132,11 +4130,11 @@ s32 Player_SetAction(PlayState* play, Player* this, PlayerActionFunc actionFunc, if (this->actor.flags & ACTOR_FLAG_20000000) { AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF); this->actor.flags &= ~ACTOR_FLAG_20000000; - } else if ((func_80857BE8 == this->actionFunc) || (func_808561B0 == this->actionFunc)) { + } else if ((Player_Action_96 == this->actionFunc) || (Player_Action_93 == this->actionFunc)) { this->actor.shape.shadowDraw = ActorShadow_DrawFeet; this->actor.shape.shadowScale = this->ageProperties->shadowScale; this->unk_ABC = 0.0f; - if (func_80857BE8 == this->actionFunc) { + if (Player_Action_96 == this->actionFunc) { if (this->stateFlags3 & PLAYER_STATE3_80000) { Magic_Reset(play); } @@ -4203,7 +4201,7 @@ s32 Player_SetAction(PlayState* play, Player* this, PlayerActionFunc actionFunc, return true; } -void func_8083172C(PlayState* play, Player* this, PlayerActionFunc actionFunc, s32 arg3) { +void Player_SetAction_PreserveMoveFlags(PlayState* play, Player* this, PlayerActionFunc actionFunc, s32 arg3) { s32 moveFlags = this->skelAnime.moveFlags; this->skelAnime.moveFlags = 0; @@ -4211,7 +4209,7 @@ void func_8083172C(PlayState* play, Player* this, PlayerActionFunc actionFunc, s this->skelAnime.moveFlags = moveFlags; } -void func_80831760(PlayState* play, Player* this, PlayerActionFunc actionFunc, s32 arg3) { +void Player_SetAction_PreserveItemAction(PlayState* play, Player* this, PlayerActionFunc actionFunc, s32 arg3) { if (this->itemAction > PLAYER_IA_MINUS1) { PlayerItemAction heldItemAction = this->itemAction; @@ -4381,7 +4379,7 @@ void func_80831F34(PlayState* play, Player* this, PlayerAnimationHeader* anim) { s32 sp24 = func_801242B4(this); func_8082DE50(play, this); - Player_SetAction(play, this, sp24 ? func_80851BD4 : func_8084BFDC, 0); + Player_SetAction(play, this, sp24 ? Player_Action_62 : Player_Action_24, 0); Player_AnimationPlayOnce(play, this, anim); if (anim == &gPlayerAnim_link_derth_rebirth) { @@ -4416,21 +4414,21 @@ void func_80831F34(PlayState* play, Player* this, PlayerAnimationHeader* anim) { } s32 func_80832090(Player* this) { - return (!(func_8084D770 == this->actionFunc) || + return (!(Player_Action_34 == this->actionFunc) || (((this->stateFlags3 & PLAYER_STATE3_40000000)) && ((this->heldItemId == ITEM_FC) || (this->heldItemId == ITEM_NONE)))) && - (!(func_80848808 == this->unk_AC4) || + (!(Player_UpperAction_2 == this->upperActionFunc) || Player_ItemToItemAction(this, this->heldItemId) == this->heldItemAction); } // Whether action is Bremen marching or Kamaro dancing s32 func_8083213C(Player* this) { - return (func_8084AC84 == this->actionFunc) || (func_8084AEEC == this->actionFunc); + return (Player_Action_11 == this->actionFunc) || (Player_Action_12 == this->actionFunc); } s32 func_8083216C(Player* this, PlayState* play) { if (!(this->stateFlags1 & PLAYER_STATE1_800000) && (this->actor.parent != NULL) && Player_IsHoldingHookshot(this)) { - Player_SetAction(play, this, func_80855E08, 1); + Player_SetAction(play, this, Player_Action_92, 1); this->stateFlags3 |= PLAYER_STATE3_80; Player_AnimationPlayOnce(play, this, &gPlayerAnim_link_hook_fly_start); func_8082E920(play, this, (ANIM_FLAG_1 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_8 | ANIM_FLAG_NOMOVE | ANIM_FLAG_80)); @@ -4444,12 +4442,12 @@ s32 func_8083216C(Player* this, PlayState* play) { if (func_80832090(this)) { func_808304BC(this, play); - if (func_80852B28 == this->actionFunc) { + if (Player_Action_64 == this->actionFunc) { return true; } } - if (!this->unk_AC4(this, play)) { + if (!this->upperActionFunc(this, play)) { return false; } @@ -4511,7 +4509,7 @@ s32 func_8083249C(Player* this) { s32 func_808324EC(PlayState* play, Player* this, PlayerFuncD58 arg2, s32 csId) { this->unk_D58 = arg2; this->csId = csId; - Player_SetAction(play, this, func_8084D770, 0); + Player_SetAction(play, this, Player_Action_34, 0); func_8083249C(this); this->stateFlags2 |= PLAYER_STATE2_40; return func_8082DE14(play, this); @@ -4649,7 +4647,7 @@ void func_80832888(Player* this, PlayState* play) { } this->stateFlags1 &= ~PLAYER_STATE1_40000000; } else if (!(this->stateFlags1 & (PLAYER_STATE1_20000 | PLAYER_STATE1_40000000)) && - (func_808573A4 != this->actionFunc)) { + (Player_Action_95 != this->actionFunc)) { func_8083133C(this); } } @@ -4780,7 +4778,7 @@ s32 func_80833058(PlayState* play, Player* this, s8* arg2, s32 arg3) { if (!(this->stateFlags1 & (PLAYER_STATE1_1 | PLAYER_STATE1_80 | PLAYER_STATE1_20000000)) && !func_8082DA90(play)) { if (arg3) { D_80862B04 = func_8083216C(this, play); - if (func_80852B28 == this->actionFunc) { + if (Player_Action_64 == this->actionFunc) { return true; } } @@ -4790,7 +4788,7 @@ s32 func_80833058(PlayState* play, Player* this, s8* arg2, s32 arg3) { return true; } - if (!(this->stateFlags3 & PLAYER_STATE3_40000000) && (func_80848808 != this->unk_AC4)) { + if (!(this->stateFlags3 & PLAYER_STATE3_40000000) && (Player_UpperAction_2 != this->upperActionFunc)) { while (*arg2 >= 0) { if (D_8085D054[*arg2](this, play)) { return true; @@ -4916,7 +4914,7 @@ void func_808334D4(PlayState* play, Player* this) { } void func_808335B0(PlayState* play, Player* this) { - Player_SetAction(play, this, func_8084CCEC, 1); + Player_SetAction(play, this, Player_Action_30, 1); func_808334D4(play, this); } @@ -5028,7 +5026,7 @@ void func_8083375C(Player* this, PlayerMeleeWeaponAnimation meleeWeaponAnim) { void func_80833864(PlayState* play, Player* this, PlayerMeleeWeaponAnimation meleeWeaponAnim) { func_8083375C(this, meleeWeaponAnim); - Player_SetAction(play, this, func_808548B8, 0); + Player_SetAction(play, this, Player_Action_84, 0); this->unk_AE8 = 0; if ((meleeWeaponAnim < PLAYER_MWA_FLIPSLASH_FINISH) || (meleeWeaponAnim > PLAYER_MWA_ZORA_JUMPKICK_FINISH)) { @@ -5094,7 +5092,7 @@ void func_80833A64(Player* this) { } void func_80833AA0(Player* this, PlayState* play) { - if (Player_SetAction(play, this, func_8084C16C, 0)) { + if (Player_SetAction(play, this, Player_Action_25, 0)) { Player_AnimationPlayLoop(play, this, &gPlayerAnim_link_normal_landing_wait); this->unk_AE8 = 1; } @@ -5145,7 +5143,7 @@ void func_80833B18(PlayState* play, Player* this, s32 arg2, f32 speed, f32 veloc } if (arg2 == 3) { - Player_SetAction(play, this, func_808546D0, 0); + Player_SetAction(play, this, Player_Action_82, 0); anim = &gPlayerAnim_link_normal_ice_down; func_8082DAD4(this); this->actor.velocity.y = 0.0f; @@ -5155,7 +5153,7 @@ void func_80833B18(PlayState* play, Player* this, s32 arg2, f32 speed, f32 veloc Player_PlaySfx(this, NA_SE_PL_FREEZE_S); Player_AnimSfx_PlayVoice(this, NA_SE_VO_LI_FREEZE); } else if (arg2 == 4) { - Player_SetAction(play, this, func_80854800, 0); + Player_SetAction(play, this, Player_Action_83, 0); func_8082DB60(play, this, &gPlayerAnim_link_normal_electric_shock); func_8082DAD4(this); @@ -5167,7 +5165,7 @@ void func_80833B18(PlayState* play, Player* this, s32 arg2, f32 speed, f32 veloc arg5 -= this->actor.shape.rot.y; if (this->stateFlags1 & PLAYER_STATE1_8000000) { - Player_SetAction(play, this, func_80851B58, 0); + Player_SetAction(play, this, Player_Action_61, 0); Player_RequestRumble(play, this, 180, 20, 50, SQ(0)); if (arg2 == 1) { @@ -5183,7 +5181,7 @@ void func_80833B18(PlayState* play, Player* this, s32 arg2, f32 speed, f32 veloc } else if ((arg2 == 1) || (arg2 == 2) || !(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (this->stateFlags1 & (PLAYER_STATE1_4 | PLAYER_STATE1_2000 | PLAYER_STATE1_4000 | PLAYER_STATE1_200000))) { - Player_SetAction(play, this, func_8084BC64, 0); + Player_SetAction(play, this, Player_Action_21, 0); this->stateFlags3 |= PLAYER_STATE3_2; @@ -5222,7 +5220,7 @@ void func_80833B18(PlayState* play, Player* this, s32 arg2, f32 speed, f32 veloc } else { PlayerAnimationHeader** animPtr = D_8085D0D4; - Player_SetAction(play, this, func_8084BBF0, 0); + Player_SetAction(play, this, Player_Action_20, 0); func_8082FC60(this); if (this->actor.colChkInfo.damage < 5) { @@ -5278,7 +5276,7 @@ s32 func_808340D4(FloorType floorType) { } void func_80834104(PlayState* play, Player* this) { - Player_SetAction(play, this, func_8085421C, 0); + Player_SetAction(play, this, Player_Action_77, 0); this->stateFlags1 |= PLAYER_STATE1_20000000 | PLAYER_STATE1_80000000; } @@ -5445,14 +5443,14 @@ s32 func_80834600(Player* this, PlayState* play) { Player_RequestRumble(play, this, 180, 20, 100, SQ(0)); if ((this->invincibilityTimer >= 0) && !Player_IsGoronOrDeku(this)) { - sp64 = (func_8084B5C0 == this->actionFunc); + sp64 = (Player_Action_18 == this->actionFunc); if (!func_801242B4(this)) { - Player_SetAction(play, this, func_8084BAA4, 0); + Player_SetAction(play, this, Player_Action_19, 0); } this->unk_AE7 = sp64; if ((s8)sp64 == 0) { - func_8082F43C(play, this, func_80848A0C); + Player_SetUpperAction(play, this, Player_UpperAction_4); var_a2 = (this->unk_B40 < 0.5f) ? D_8085CFD4[Player_IsHoldingTwoHandedWeapon(this)] : D_8085CFCC[Player_IsHoldingTwoHandedWeapon(this)]; PlayerAnimation_PlayOnce(play, &this->unk_284, var_a2); @@ -5557,7 +5555,7 @@ void func_80834CD0(Player* this, f32 arg1, u16 sfxId) { } void func_80834D50(PlayState* play, Player* this, PlayerAnimationHeader* anim, f32 speed, u16 sfxId) { - Player_SetAction(play, this, func_8084C16C, 1); + Player_SetAction(play, this, Player_Action_25, 1); if (anim != NULL) { func_8082DB90(play, this, anim); } @@ -5608,7 +5606,7 @@ s32 func_80834DFC(Player* this, PlayState* play) { } if (var_v1) { - Player_SetAction(play, this, func_8084D4EC, 0); + Player_SetAction(play, this, Player_Action_33, 0); yDistToLedge = this->yDistToLedge; if (this->ageProperties->unk_14 <= yDistToLedge) { @@ -5675,7 +5673,7 @@ s32 func_80834DFC(Player* this, PlayState* play) { } void func_80835324(PlayState* play, Player* this, f32 arg2, s16 arg3) { - Player_SetAction(play, this, func_8084D820, 0); + Player_SetAction(play, this, Player_Action_35, 0); func_8082DD2C(play, this); this->csId = CS_ID_NONE; @@ -5689,7 +5687,7 @@ void func_80835324(PlayState* play, Player* this, f32 arg2, s16 arg3) { } void func_808353DC(PlayState* play, Player* this) { - Player_SetAction(play, this, func_808508C8, 0); + Player_SetAction(play, this, Player_Action_54, 0); func_8082E634(play, this, &gPlayerAnim_link_swimer_swim_wait); } @@ -5876,7 +5874,7 @@ s32 Player_HandleExitsAndVoids(PlayState* play, Player* this, CollisionPoly* pol } if (this->floorProperty == FLOOR_PROPERTY_13) { - Player_SetAction(play, this, func_808497A0, 0); + Player_SetAction(play, this, Player_Action_1, 0); this->stateFlags1 |= PLAYER_STATE1_20000000; } else { func_80834104(play, this); @@ -6105,7 +6103,7 @@ void Player_Door_Knob(PlayState* play, Player* this, Actor* door) { } } - Player_SetAction(play, this, func_8084E034, 0); + Player_SetAction(play, this, Player_Action_36, 0); this->stateFlags2 |= PLAYER_STATE2_800000; func_8082DE14(play, this); if (this->doorDirection < 0) { @@ -6167,7 +6165,7 @@ s32 func_808365DC(Player* this, PlayState* play) { ((((this->doorType <= PLAYER_DOORTYPE_TALKING) && CutsceneManager_IsNext(CS_ID_GLOBAL_TALK)) || ((this->doorType >= PLAYER_DOORTYPE_HANDLE) && CutsceneManager_IsNext(CS_ID_GLOBAL_DOOR))) && (!(this->stateFlags1 & PLAYER_STATE1_800) && - (CHECK_BTN_ALL(sPlayerControlInput->press.button, BTN_A) || (func_8085437C == this->actionFunc) || + (CHECK_BTN_ALL(sPlayerControlInput->press.button, BTN_A) || (Player_Action_78 == this->actionFunc) || (this->doorType == PLAYER_DOORTYPE_STAIRCASE) || (this->doorType == PLAYER_DOORTYPE_PROXIMITY))))) { Actor* doorActor = this->doorActor; Actor* var_v0_3; @@ -6222,7 +6220,7 @@ s32 func_808365DC(Player* this, PlayState* play) { void func_80836888(Player* this, PlayState* play) { PlayerAnimationHeader* anim; - Player_SetAction(play, this, func_80849A9C, 1); + Player_SetAction(play, this, Player_Action_2, 1); if (this->unk_B40 < 0.5f) { anim = func_8082EF54(this); @@ -6238,7 +6236,7 @@ void func_80836888(Player* this, PlayState* play) { } void func_8083692C(Player* this, PlayState* play) { - Player_SetAction(play, this, func_80849DD0, 1); + Player_SetAction(play, this, Player_Action_3, 1); func_8082E438(play, this, func_8082ED20(this)); this->currentYaw = this->actor.shape.rot.y; } @@ -6257,11 +6255,11 @@ void func_808369F4(Player* this, PlayState* play) { PlayerActionFunc actionFunc; if (func_80123420(this)) { - actionFunc = func_80849A9C; + actionFunc = Player_Action_2; } else if (func_80123434(this)) { - actionFunc = func_80849DD0; + actionFunc = Player_Action_3; } else { - actionFunc = func_80849FE0; + actionFunc = Player_Action_4; } Player_SetAction(play, this, actionFunc, 1); } @@ -6279,7 +6277,7 @@ void func_80836A98(Player* this, PlayerAnimationHeader* anim, PlayState* play) { } void func_80836AD8(PlayState* play, Player* this) { - Player_SetAction(play, this, func_80857BE8, 0); + Player_SetAction(play, this, Player_Action_96, 0); this->unk_B28 = 0; this->unk_B86[1] = 0; this->unk_AF0[0].x = 0.0f; @@ -6301,7 +6299,7 @@ void func_80836B3C(PlayState* play, Player* this, f32 arg2) { } else { PlayerAnimationHeader* anim = D_8085BE84[PLAYER_ANIMGROUP_15][this->modelAnimType]; - Player_SetAction(play, this, func_8084C6EC, 0); + Player_SetAction(play, this, Player_Action_26, 0); PlayerAnimation_Change(play, &this->skelAnime, anim, 1.25f * D_8085C3E4, arg2, Animation_GetLastFrame(anim), ANIMMODE_ONCE, 0.0f); } @@ -6338,7 +6336,7 @@ void func_80836D8C(Player* this) { s32 func_80836DC0(PlayState* play, Player* this) { if ((MREG(48) != 0) || func_800C9DDC(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId)) { - Player_SetAction(play, this, func_808561B0, 0); + Player_SetAction(play, this, Player_Action_93, 0); this->stateFlags1 &= ~(PLAYER_STATE1_20000 | PLAYER_STATE1_40000000); func_8082E438(play, this, &gPlayerAnim_pn_attack); Player_StopHorizontalMovement(this); @@ -6635,12 +6633,12 @@ void func_808379C0(PlayState* play, Player* this) { PlayerAnimationHeader* anim; if ((interactRangeActor->id == ACTOR_EN_ISHI) && (ENISHI_GET_1(interactRangeActor) != 0)) { - Player_SetAction(play, this, func_8084E334, 0); + Player_SetAction(play, this, Player_Action_38, 0); anim = &gPlayerAnim_link_silver_carry; } else if (((interactRangeActor->id == ACTOR_EN_BOMBF) || (interactRangeActor->id == ACTOR_EN_KUSA) || (interactRangeActor->id == ACTOR_EN_KUSA2) || (interactRangeActor->id == ACTOR_OBJ_GRASS_CARRY)) && (Player_GetStrength() <= PLAYER_STRENGTH_DEKU)) { - Player_SetAction(play, this, func_8084E4E4, 0); + Player_SetAction(play, this, Player_Action_40, 0); anim = &gPlayerAnim_link_normal_nocarry_free; this->actor.world.pos.x = @@ -6650,7 +6648,7 @@ void func_808379C0(PlayState* play, Player* this) { this->currentYaw = this->actor.shape.rot.y = interactRangeActor->yawTowardsPlayer + 0x8000; } else { - Player_SetAction(play, this, func_8084E25C, 0); + Player_SetAction(play, this, Player_Action_37, 0); anim = D_8085BE84[PLAYER_ANIMGROUP_12][this->modelAnimType]; } @@ -6662,7 +6660,7 @@ void func_808379C0(PlayState* play, Player* this) { } void func_80837B60(PlayState* play, Player* this) { - func_8083172C(play, this, func_8084E980, 0); + Player_SetAction_PreserveMoveFlags(play, this, Player_Action_44, 0); this->exchangeItemId = PLAYER_IA_NONE; this->stateFlags1 |= (PLAYER_STATE1_40 | PLAYER_STATE1_20000000); @@ -6673,18 +6671,18 @@ void func_80837B60(PlayState* play, Player* this) { } void func_80837BD0(PlayState* play, Player* this) { - func_8083172C(play, this, func_8084FE7C, 0); + Player_SetAction_PreserveMoveFlags(play, this, Player_Action_52, 0); } void func_80837BF8(PlayState* play, Player* this) { - Player_SetAction(play, this, func_8084ED9C, 0); + Player_SetAction(play, this, Player_Action_45, 0); } void func_80837C20(PlayState* play, Player* this) { s32 sp1C = this->unk_AE8; s32 sp18 = this->unk_AE7; - func_8083172C(play, this, func_8084F4E8, 0); + Player_SetAction_PreserveMoveFlags(play, this, Player_Action_50, 0); this->actor.velocity.y = 0.0f; this->unk_AE8 = sp1C; @@ -6692,7 +6690,7 @@ void func_80837C20(PlayState* play, Player* this) { } void func_80837C78(PlayState* play, Player* this) { - func_8083172C(play, this, func_80852C04, 0); + Player_SetAction_PreserveMoveFlags(play, this, Player_Action_65, 0); this->stateFlags1 |= (PLAYER_STATE1_400 | PLAYER_STATE1_20000000); if (this->getItemId == GI_HEART_CONTAINER) { @@ -6708,7 +6706,7 @@ void func_80837CEC(PlayState* play, Player* this, CollisionPoly* arg2, f32 arg3, f32 nx = COLPOLY_GET_NORMAL(arg2->normal.x); f32 nz = COLPOLY_GET_NORMAL(arg2->normal.z); - Player_SetAction(play, this, func_8084F1B8, 0); + Player_SetAction(play, this, Player_Action_48, 0); func_8082DE50(play, this); Player_AnimationPlayOnce(play, this, anim); @@ -6814,7 +6812,7 @@ s32 func_80837DEC(Player* this, PlayState* play) { } void func_808381A0(Player* this, PlayerAnimationHeader* anim, PlayState* play) { - Player_SetAction(play, this, func_8084F3DC, 0); + Player_SetAction(play, this, Player_Action_49, 0); PlayerAnimation_PlayOnceSetSpeed(play, &this->skelAnime, anim, 1.3f); } @@ -6863,9 +6861,9 @@ void func_8083827C(Player* this, PlayState* play) { return; } - if ((func_8084C16C == this->actionFunc) || (func_8084C94C == this->actionFunc) || - (func_8084CA24 == this->actionFunc) || (func_80857BE8 == this->actionFunc) || - (func_808546D0 == this->actionFunc) || (func_80854800 == this->actionFunc)) { + if ((Player_Action_25 == this->actionFunc) || (Player_Action_27 == this->actionFunc) || + (Player_Action_28 == this->actionFunc) || (Player_Action_96 == this->actionFunc) || + (Player_Action_82 == this->actionFunc) || (Player_Action_83 == this->actionFunc)) { return; } @@ -6880,7 +6878,7 @@ void func_8083827C(Player* this, PlayState* play) { } temp_t0 = BINANG_SUB(this->currentYaw, this->actor.shape.rot.y); - Player_SetAction(play, this, func_8084C16C, 1); + Player_SetAction(play, this, Player_Action_25, 1); func_8082DD2C(play, this); this->floorSfxOffset = this->prevFloorSfxOffset; @@ -6904,7 +6902,7 @@ void func_8083827C(Player* this, PlayState* play) { if (WaterBox_GetSurface1(play, &play->colCtx, sp4C.x, sp4C.z, &sp44, &sp58) && ((sp44 - sp48) > 50.0f)) { func_80834DB8(this, &gPlayerAnim_link_normal_run_jump_water_fall, 6.0f, play); - Player_SetAction(play, this, func_8084C94C, 0); + Player_SetAction(play, this, Player_Action_27, 0); return; } } @@ -6964,7 +6962,7 @@ s32 func_808387A0(PlayState* play, Player* this) { if (this->unk_AA5 == PLAYER_UNKAA5_4) { Player_StopCutscene(this); this->actor.flags &= ~ACTOR_FLAG_TALK_REQUESTED; - Player_SetAction(play, this, func_8085B08C, 0); + Player_SetAction(play, this, Player_Action_97, 0); if (this->unk_3BA) { this->stateFlags1 |= PLAYER_STATE1_20000000; } @@ -6997,7 +6995,7 @@ PlayerAnimationHeader* D_8085D160[PLAYER_FORM_MAX] = { void func_808388B8(PlayState* play, Player* this, PlayerTransformation playerForm) { func_8082DE50(play, this); - func_80831760(play, this, func_808553F4, 0); + Player_SetAction_PreserveItemAction(play, this, Player_Action_86, 0); func_8082E4A4(play, this, D_8085D160[this->transformation]); gSaveContext.save.playerForm = playerForm; this->stateFlags1 |= PLAYER_STATE1_2; @@ -7008,14 +7006,14 @@ void func_808388B8(PlayState* play, Player* this, PlayerTransformation playerFor } void func_808389BC(PlayState* play, Player* this) { - func_80831760(play, this, func_80855AF4, 0); + Player_SetAction_PreserveItemAction(play, this, Player_Action_89, 0); func_8082E4A4(play, this, &gPlayerAnim_cl_setmask); this->stateFlags1 |= (PLAYER_STATE1_100 | PLAYER_STATE1_20000000); func_8082DAD4(this); } void func_80838A20(PlayState* play, Player* this) { - func_80831760(play, this, func_80855B9C, 0); + Player_SetAction_PreserveItemAction(play, this, Player_Action_90, 0); func_8082DB90(play, this, &gPlayerAnim_cl_maskoff); this->currentMask = PLAYER_MASK_NONE; this->stateFlags1 |= (PLAYER_STATE1_100 | PLAYER_STATE1_20000000); @@ -7194,7 +7192,7 @@ s32 func_80838A90(Player* this, PlayState* play) { Player_StopCutscene(this); this->itemAction = PLAYER_IA_NONE; - func_80831760(play, this, func_80853A5C, 0); + Player_SetAction_PreserveItemAction(play, this, Player_Action_71, 0); talkActor = this->talkActor; this->itemAction = heldItemTemp; this->csId = CS_ID_NONE; @@ -7206,7 +7204,7 @@ s32 func_80838A90(Player* this, PlayState* play) { this->stateFlags1 |= (PLAYER_STATE1_20000000 | PLAYER_STATE1_40); if (this->exchangeItemId == PLAYER_IA_MAGIC_BEANS) { Inventory_ChangeAmmo(ITEM_MAGIC_BEANS, -1); - func_80831760(play, this, func_8084B4A8, 0); + Player_SetAction_PreserveItemAction(play, this, Player_Action_17, 0); this->currentYaw = talkActor->yawTowardsPlayer + 0x8000; this->actor.shape.rot.y = this->currentYaw; if (talkActor->xzDistToPlayer < 40.0f) { @@ -7245,14 +7243,14 @@ s32 func_80838A90(Player* this, PlayState* play) { if (bottleAction > PLAYER_BOTTLE_NONE) { Player_StopCutscene(this); if (bottleAction >= PLAYER_BOTTLE_FAIRY) { - func_80831760(play, this, func_80853754, 0); + Player_SetAction_PreserveItemAction(play, this, Player_Action_69, 0); func_8082DB90(play, this, &gPlayerAnim_link_bottle_bug_out); } else if ((bottleAction > PLAYER_BOTTLE_EMPTY) && (bottleAction < PLAYER_BOTTLE_POE)) { - func_80831760(play, this, func_80853850, 0); + Player_SetAction_PreserveItemAction(play, this, Player_Action_70, 0); func_8082DB90(play, this, &gPlayerAnim_link_bottle_fish_out); this->csId = play->playerCsIds[PLAYER_CS_ID_ITEM_BOTTLE]; } else { - func_80831760(play, this, func_80853194, 0); + Player_SetAction_PreserveItemAction(play, this, Player_Action_67, 0); func_8082E4A4(play, this, (this->transformation == PLAYER_FORM_DEKU) ? &gPlayerAnim_pn_drinkstart @@ -7269,7 +7267,7 @@ s32 func_80838A90(Player* this, PlayState* play) { } else { this->csId = CS_ID_NONE; } - func_80831760(play, this, func_8085269C, 0); + Player_SetAction_PreserveItemAction(play, this, Player_Action_63, 0); if ((this->skelAnime.playSpeed < 0.0f) || ((this->skelAnime.animation != D_8085D17C[this->transformation]) && (this->skelAnime.animation != D_8085D190[this->transformation]))) { @@ -7290,7 +7288,7 @@ s32 func_80838A90(Player* this, PlayState* play) { if (func_8083868C(play, this) != CAM_MODE_NORMAL) { Player_StopCutscene(this); if (!(this->stateFlags1 & PLAYER_STATE1_800000)) { - Player_SetAction(play, this, func_8084E724, 1); + Player_SetAction(play, this, Player_Action_43, 1); this->unk_AE8 = 13; func_80836D8C(this); if (this->unk_AA5 == PLAYER_UNKAA5_2) { @@ -7426,7 +7424,7 @@ void func_808395F0(PlayState* play, Player* this, PlayerMeleeWeaponAnimation mel } func_80833864(play, this, meleeWeaponAnim); - Player_SetAction(play, this, func_8084CB58, 0); + Player_SetAction(play, this, Player_Action_29, 0); this->stateFlags3 |= PLAYER_STATE3_2; this->linearVelocity = linearVelocity; this->currentYaw = this->actor.shape.rot.y; @@ -7496,7 +7494,7 @@ void func_80839860(Player* this, PlayState* play, s32 arg2) { void func_80839978(PlayState* play, Player* this) { if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) { this->itemAction = PLAYER_IA_OCARINA; - func_80831760(play, this, func_8084AC84, 0); + Player_SetAction_PreserveItemAction(play, this, Player_Action_11, 0); func_8082DB60(play, this, &gPlayerAnim_clink_normal_okarina_walk); func_8082E920(play, this, ANIM_FLAG_4 | ANIM_FLAG_200); this->stateFlags3 |= PLAYER_STATE3_20000000; @@ -7508,7 +7506,7 @@ void func_80839978(PlayState* play, Player* this) { void func_80839A10(PlayState* play, Player* this) { if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) { this->itemAction = PLAYER_IA_NONE; - func_80831760(play, this, func_8084AEEC, 0); + Player_SetAction_PreserveItemAction(play, this, Player_Action_12, 0); func_8082DB60(play, this, &gPlayerAnim_alink_dance_loop); this->stateFlags2 |= PLAYER_STATE2_2000000; Audio_PlayFanfare(NA_BGM_KAMARO_DANCE); @@ -7524,7 +7522,7 @@ s32 func_80839A84(PlayState* play, Player* this) { return false; } - Player_SetAction(play, this, func_808573A4, 0); + Player_SetAction(play, this, Player_Action_95, 0); this->stateFlags1 &= ~(PLAYER_STATE1_20000 | PLAYER_STATE1_40000000); this->unk_ADC = 4; func_808373A4(play, this); @@ -7599,13 +7597,13 @@ void func_80839E3C(Player* this, PlayState* play) { } void func_80839E74(Player* this, PlayState* play) { - Player_SetAction(play, this, func_80849FE0, 1); + Player_SetAction(play, this, Player_Action_4, 1); Player_AnimationPlayOnce(play, this, func_8082ED20(this)); this->currentYaw = this->actor.shape.rot.y; } void func_80839ED0(Player* this, PlayState* play) { - if (!(this->stateFlags3 & PLAYER_STATE3_80) && (func_80852B28 != this->actionFunc) && !func_8083213C(this)) { + if (!(this->stateFlags3 & PLAYER_STATE3_80) && (Player_Action_64 != this->actionFunc) && !func_8083213C(this)) { func_80836D8C(this); if (!(this->stateFlags1 & PLAYER_STATE1_40)) { if (func_801242B4(this)) { @@ -7641,7 +7639,7 @@ void func_8083A04C(Player* this) { if (CHECK_BTN_ALL(sPlayerControlInput->press.button, BTN_A)) { this->currentBoots = PLAYER_BOOTS_ZORA_LAND; } - if (func_808508C8 == this->actionFunc) { + if (Player_Action_54 == this->actionFunc) { this->unk_AE8 = 20; } } else { @@ -7692,7 +7690,7 @@ s32 func_8083A274(Player* this, PlayState* play) { !func_80123434(this) && (this->targetedActor == NULL))) { func_8082DC38(this); func_8082DCA0(play, this); - if (Player_SetAction(play, this, func_8084B5C0, 0)) { + if (Player_SetAction(play, this, Player_Action_18, 0)) { this->stateFlags1 |= PLAYER_STATE1_400000; if (this->transformation != PLAYER_FORM_GORON) { PlayerAnimationHeader* anim; @@ -7775,7 +7773,7 @@ s32 func_8083A580(Player* this, PlayState* play) { s32 func_8083A658(PlayState* play, Player* this) { if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) { - Player_SetAction(play, this, func_80852B28, 0); + Player_SetAction(play, this, Player_Action_64, 0); Player_AnimationPlayOnce(play, this, &gPlayerAnim_link_normal_light_bom); this->unk_AA5 = PLAYER_UNKAA5_0; return true; @@ -7791,7 +7789,7 @@ struct_8085D200 D_8085D200[] = { s32 func_8083A6C0(PlayState* play, Player* this) { if (D_80862B48 != 0) { if (Player_GetBottleHeld(this) > PLAYER_BOTTLE_NONE) { - Player_SetAction(play, this, func_808534C0, 0); + Player_SetAction(play, this, Player_Action_68, 0); if (this->actor.depthInWater > 12.0f) { this->unk_AE8 = 1; } @@ -7806,14 +7804,14 @@ s32 func_8083A6C0(PlayState* play, Player* this) { } void func_8083A794(Player* this, PlayState* play) { - if ((func_8084AF9C != this->actionFunc) && (func_8084B0EC != this->actionFunc)) { + if ((Player_Action_13 != this->actionFunc) && (Player_Action_14 != this->actionFunc)) { this->unk_B70 = 0; this->unk_B34 = 0.0f; this->unk_B38 = 0.0f; func_8082E514(play, this, D_8085BE84[PLAYER_ANIMGROUP_2][this->modelAnimType]); } - Player_SetAction(play, this, func_8082FBE8(this) ? func_8084B0EC : func_8084AF9C, 1); + Player_SetAction(play, this, func_8082FBE8(this) ? Player_Action_14 : Player_Action_13, 1); } void func_8083A844(Player* this, PlayState* play, s16 currentYaw) { @@ -7830,7 +7828,7 @@ s32 func_8083A878(PlayState* play, Player* this, f32 arg2) { &waterBox)) { ySurface -= this->actor.world.pos.y; if (this->ageProperties->unk_24 <= ySurface) { - Player_SetAction(play, this, func_80850B18, 0); + Player_SetAction(play, this, Player_Action_55, 0); func_8082E634(play, this, &gPlayerAnim_link_swimer_swim); this->stateFlags1 |= (PLAYER_STATE1_8000000 | PLAYER_STATE1_20000000); this->unk_AE8 = 20; @@ -7994,7 +7992,7 @@ void Player_InitMode_F(PlayState* play, Player* this) { } void func_8083AECC(Player* this, s16 currentYaw, PlayState* play) { - Player_SetAction(play, this, func_8084A5C0, 1); + Player_SetAction(play, this, Player_Action_6, 1); PlayerAnimation_CopyJointToMorph(play, &this->skelAnime); this->unk_B38 = 0.0f; this->unk_B34 = 0.0f; @@ -8002,12 +8000,12 @@ void func_8083AECC(Player* this, s16 currentYaw, PlayState* play) { } void func_8083AF30(Player* this, PlayState* play) { - Player_SetAction(play, this, func_8084A26C, 1); + Player_SetAction(play, this, Player_Action_5, 1); func_8082E514(play, this, D_8085BE84[PLAYER_ANIMGROUP_1][this->modelAnimType]); } void func_8083AF8C(Player* this, s16 currentYaw, PlayState* play) { - Player_SetAction(play, this, func_8084B288, 1); + Player_SetAction(play, this, Player_Action_15, 1); PlayerAnimation_Change(play, &this->skelAnime, &gPlayerAnim_link_anchor_back_walk, 1.0f, 0.0f, Animation_GetLastFrame(&gPlayerAnim_link_anchor_back_walk), ANIMMODE_ONCE, -6.0f); this->linearVelocity = 8.0f; @@ -8015,19 +8013,19 @@ void func_8083AF8C(Player* this, s16 currentYaw, PlayState* play) { } void func_8083B030(Player* this, PlayState* play) { - Player_SetAction(play, this, func_8084A8E8, 1); + Player_SetAction(play, this, Player_Action_9, 1); func_8082E514(play, this, D_8085BE84[PLAYER_ANIMGROUP_24][this->modelAnimType]); this->unk_B38 = 0.0f; } void func_8083B090(Player* this, PlayState* play) { - Player_SetAction(play, this, func_8084B3B8, 1); + Player_SetAction(play, this, Player_Action_16, 1); PlayerAnimation_PlayOnceSetSpeed(play, &this->skelAnime, &gPlayerAnim_link_anchor_back_brake, 6.0f / 3.0f); } void func_8083B0E4(PlayState* play, Player* this, s16 currentYaw) { this->currentYaw = currentYaw; - Player_SetAction(play, this, func_8084AB4C, 1); + Player_SetAction(play, this, Player_Action_10, 1); this->unk_B4E = 1200; this->unk_B4E *= D_8085C3E4; PlayerAnimation_Change(play, &this->skelAnime, D_8085BE84[PLAYER_ANIMGROUP_25][this->modelAnimType], 1.0f, 0.0f, @@ -8037,7 +8035,7 @@ void func_8083B0E4(PlayState* play, Player* this, s16 currentYaw) { void func_8083B1A0(Player* this, PlayState* play) { PlayerAnimationHeader* anim; - Player_SetAction(play, this, func_80849FE0, 1); + Player_SetAction(play, this, Player_Action_4, 1); if (this->unk_B40 < 0.5f) { anim = D_8085BE84[PLAYER_ANIMGROUP_27][this->modelAnimType]; } else { @@ -8048,7 +8046,7 @@ void func_8083B1A0(Player* this, PlayState* play) { } void func_8083B23C(Player* this, PlayState* play) { - Player_SetAction(play, this, func_80849A9C, 1); + Player_SetAction(play, this, Player_Action_2, 1); func_8082E438(play, this, D_8085BE84[PLAYER_ANIMGROUP_6][this->modelAnimType]); this->unk_AE8 = 1; } @@ -8089,8 +8087,8 @@ s32 func_8083B3B4(PlayState* play, Player* this, Input* input) { ((ABS_ALT(this->unk_AAA) < 0x2EE0) && (this->currentBoots < PLAYER_BOOTS_ZORA_UNDERWATER) && ((s32)SurfaceType_GetConveyorSpeed(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId) <= CONVEYOR_SPEED_SLOW))))) { - if (func_8085B08C != this->actionFunc) { - Player_SetAction(play, this, func_808516B4, 0); + if (Player_Action_97 != this->actionFunc) { + Player_SetAction(play, this, Player_Action_59, 0); } Player_AnimationPlayOnce(play, this, &gPlayerAnim_link_swimer_swim_deep_start); @@ -8108,7 +8106,7 @@ s32 func_8083B3B4(PlayState* play, Player* this, Input* input) { if ((this->transformation != PLAYER_FORM_DEKU) && ((this->stateFlags1 & PLAYER_STATE1_400) || ((this->stateFlags2 & PLAYER_STATE2_400) && - (((func_80850D68 != this->actionFunc) && !(this->stateFlags3 & PLAYER_STATE3_8000)) || + (((Player_Action_56 != this->actionFunc) && !(this->stateFlags3 & PLAYER_STATE3_8000)) || (this->unk_AAA < -0x1555)))) && ((this->actor.depthInWater - this->actor.velocity.y) < this->ageProperties->unk_30)) { s32 temp_v0_3; @@ -8121,7 +8119,7 @@ s32 func_8083B3B4(PlayState* play, Player* this, Input* input) { if (this->stateFlags3 & PLAYER_STATE3_8000) { sp2A = this->unk_B86[1]; sp24 = this->unk_B48 * 1.5f; - Player_SetAction(play, this, func_8084CA24, 1); + Player_SetAction(play, this, Player_Action_28, 1); this->stateFlags3 |= PLAYER_STATE3_8000; this->stateFlags1 &= ~PLAYER_STATE1_8000000; sp24 = CLAMP_MAX(sp24, 13.5f); @@ -8139,7 +8137,7 @@ s32 func_8083B3B4(PlayState* play, Player* this, Input* input) { } if (input != NULL) { - Player_SetAction(play, this, func_808519FC, 1); + Player_SetAction(play, this, Player_Action_60, 1); if (this->stateFlags1 & PLAYER_STATE1_400) { this->stateFlags1 |= (PLAYER_STATE1_400 | PLAYER_STATE1_800 | PLAYER_STATE1_20000000); } @@ -8156,7 +8154,7 @@ s32 func_8083B3B4(PlayState* play, Player* this, Input* input) { } void func_8083B73C(PlayState* play, Player* this, s16 currentYaw) { - Player_SetAction(play, this, func_808513EC, 0); + Player_SetAction(play, this, Player_Action_57, 0); func_8082E634(play, this, &gPlayerAnim_link_swimer_swim); this->actor.shape.rot.y = currentYaw; this->currentYaw = currentYaw; @@ -8164,7 +8162,7 @@ void func_8083B73C(PlayState* play, Player* this, s16 currentYaw) { void func_8083B798(PlayState* play, Player* this) { if (this->transformation == PLAYER_FORM_ZORA) { - Player_SetAction(play, this, func_808513EC, 0); + Player_SetAction(play, this, Player_Action_57, 0); PlayerAnimation_Change(play, &this->skelAnime, &gPlayerAnim_link_swimer_swim, 1.0f, Animation_GetLastFrame(&gPlayerAnim_link_swimer_swim), 0.0f, ANIMMODE_LOOP, 0.0f); this->unk_B48 = 2.0f; @@ -8179,7 +8177,7 @@ void func_8083B798(PlayState* play, Player* this) { void func_8083B850(PlayState* play, Player* this) { this->currentBoots = PLAYER_BOOTS_ZORA_LAND; this->prevBoots = PLAYER_BOOTS_ZORA_LAND; - Player_SetAction(play, this, func_80850D68, 0); + Player_SetAction(play, this, Player_Action_56, 0); this->unk_B48 = sqrtf(SQ(this->linearVelocity) + SQ(this->actor.velocity.y)); Player_OverrideBlureColors(play, this, 1, 8); this->currentBoots = PLAYER_BOOTS_ZORA_LAND; @@ -8199,13 +8197,13 @@ void func_8083B930(PlayState* play, Player* this) { PlayerAnimationHeader* var_a2; if ((this->currentBoots < PLAYER_BOOTS_ZORA_UNDERWATER) || !(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || - (func_80857BE8 == this->actionFunc)) { + (Player_Action_96 == this->actionFunc)) { func_8082DE50(play, this); - if (func_8084CA24 == this->actionFunc) { + if (Player_Action_28 == this->actionFunc) { func_8083B850(play, this); this->stateFlags3 |= PLAYER_STATE3_8000; - } else if ((this->transformation == PLAYER_FORM_ZORA) && (func_8084C94C == this->actionFunc)) { + } else if ((this->transformation == PLAYER_FORM_ZORA) && (Player_Action_27 == this->actionFunc)) { func_8083B850(play, this); this->stateFlags3 |= PLAYER_STATE3_8000; func_8082DB60(play, this, &gPlayerAnim_pz_fishswim); @@ -8213,11 +8211,11 @@ void func_8083B930(PlayState* play, Player* this) { this->stateFlags2 &= ~PLAYER_STATE2_400; func_8083B3B4(play, this, NULL); this->unk_AE7 = 1; - } else if (func_8084C94C == this->actionFunc) { - Player_SetAction(play, this, func_808516B4, 0); + } else if (Player_Action_27 == this->actionFunc) { + Player_SetAction(play, this, Player_Action_59, 0); func_8083B798(play, this); } else { - Player_SetAction(play, this, func_808508C8, 1); + Player_SetAction(play, this, Player_Action_54, 1); func_8082E438(play, this, (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) ? &gPlayerAnim_link_swimer_wait2swim_wait : &gPlayerAnim_link_swimer_land2swim_wait); @@ -8253,8 +8251,9 @@ void func_8083BB4C(PlayState* play, Player* this) { } } - if ((this->actor.parent == NULL) && (func_8084D4EC != this->actionFunc) && (func_8084F3DC != this->actionFunc) && - ((func_8084CA24 != this->actionFunc) || (this->actor.velocity.y < -2.0f))) { + if ((this->actor.parent == NULL) && (Player_Action_33 != this->actionFunc) && + (Player_Action_49 != this->actionFunc) && + ((Player_Action_28 != this->actionFunc) || (this->actor.velocity.y < -2.0f))) { if (this->ageProperties->unk_2C < this->actor.depthInWater) { if (this->transformation == PLAYER_FORM_GORON) { func_80834140(play, this, &gPlayerAnim_link_swimer_swim_down); @@ -8280,7 +8279,7 @@ void func_8083BB4C(PlayState* play, Player* this) { func_80169EFC(&play->state); func_808345C8(); } else { - Player_SetAction(play, this, func_808497A0, 0); + Player_SetAction(play, this, Player_Action_1, 0); this->stateFlags1 |= PLAYER_STATE1_20000000; } func_8083B8D0(play, this); @@ -8288,16 +8287,16 @@ void func_8083BB4C(PlayState* play, Player* this) { } else if (!(this->stateFlags1 & PLAYER_STATE1_8000000) || (((this->currentBoots < PLAYER_BOOTS_ZORA_UNDERWATER) || !(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) && - (func_8084E724 != this->actionFunc) && (func_80851B58 != this->actionFunc) && - (func_80851BD4 != this->actionFunc) && (func_808508C8 != this->actionFunc) && - (func_808513EC != this->actionFunc) && (func_80851588 != this->actionFunc) && - (func_808516B4 != this->actionFunc) && (func_808519FC != this->actionFunc) && - (func_80850B18 != this->actionFunc) && (func_80850D68 != this->actionFunc))) { + (Player_Action_43 != this->actionFunc) && (Player_Action_61 != this->actionFunc) && + (Player_Action_62 != this->actionFunc) && (Player_Action_54 != this->actionFunc) && + (Player_Action_57 != this->actionFunc) && (Player_Action_58 != this->actionFunc) && + (Player_Action_59 != this->actionFunc) && (Player_Action_60 != this->actionFunc) && + (Player_Action_55 != this->actionFunc) && (Player_Action_56 != this->actionFunc))) { func_8083B930(play, this); } } else if ((this->stateFlags1 & PLAYER_STATE1_8000000) && (this->actor.depthInWater < this->ageProperties->unk_24) && - (((func_80850D68 != this->actionFunc) && !(this->stateFlags3 & PLAYER_STATE3_8000)) || + (((Player_Action_56 != this->actionFunc) && !(this->stateFlags3 & PLAYER_STATE3_8000)) || (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND))) { if (this->skelAnime.moveFlags == 0) { func_8083B0E4(play, this, this->actor.shape.rot.y); @@ -8422,7 +8421,7 @@ void func_8083BF54(PlayState* play, Player* this) { var_fv1 = (this->stateFlags1 & PLAYER_STATE1_4000000) ? -fabsf(this->linearVelocity) - : ((func_80850D68 == this->actionFunc) + : ((Player_Action_56 == this->actionFunc) ? (ABS_ALT(this->unk_B8A) * -0.004f) + (this->unk_B48 * -0.38f) : this->actor.velocity.y); @@ -8668,7 +8667,7 @@ PlayerAnimationHeader* sPlayerSlopeSlipAnims[] = { s32 Player_HandleSlopes(PlayState* play, Player* this) { if (!Player_InBlockingCsMode(play, this) && !(this->cylinder.base.ocFlags1 & OC1_HIT)) { - if ((func_80853D68 != this->actionFunc) && (func_80857BE8 != this->actionFunc) && + if ((Player_Action_73 != this->actionFunc) && (Player_Action_96 != this->actionFunc) && (sPlayerFloorEffect == FLOOR_EFFECT_1)) { s16 playerVelYaw = Math_Atan2S_XY(this->actor.velocity.z, this->actor.velocity.x); Vec3f slopeNormal; @@ -8683,7 +8682,7 @@ s32 Player_HandleSlopes(PlayState* play, Player* this) { velYawToDownwardSlope = downwardSlopeYaw - playerVelYaw; if (ABS_ALT(velYawToDownwardSlope) > 0x3E80) { // 87.9 degrees - var_fa1 = (func_80857BE8 == this->actionFunc) ? Math_CosS(this->floorPitch) : slopeNormal.y; + var_fa1 = (Player_Action_96 == this->actionFunc) ? Math_CosS(this->floorPitch) : slopeNormal.y; slopeSlowdownSpeed = (1.0f - var_fa1) * 40.0f; temp_fv1 = fabsf(this->actor.speed) + slopeSlowdownSpeed; slopeSlowdownSpeedStep = SQ(temp_fv1) * 0.011f; @@ -8693,7 +8692,7 @@ s32 Player_HandleSlopes(PlayState* play, Player* this) { this->pushedYaw = downwardSlopeYaw; Math_StepToF(&this->pushedSpeed, slopeSlowdownSpeed, slopeSlowdownSpeedStep); } else { - Player_SetAction(play, this, func_80853D68, 0); + Player_SetAction(play, this, Player_Action_73, 0); func_8082DE50(play, this); func_8082E514(play, this, sPlayerSlopeSlipAnims[this->unk_AE7]); this->linearVelocity = sqrtf(SQXZ(this->actor.velocity)); @@ -8841,7 +8840,7 @@ s32 func_8083D23C(Player* this, PlayState* play) { // Player_SetAction_Throwing void func_8083D6DC(Player* this, PlayState* play) { - Player_SetAction(play, this, func_8084E65C, 1); + Player_SetAction(play, this, Player_Action_42, 1); Player_AnimationPlayOnce(play, this, D_8085BE84[PLAYER_ANIMGROUP_28][this->modelAnimType]); } @@ -8860,7 +8859,7 @@ s32 func_8083D78C(Player* this, PlayState* play) { CHECK_BTN_ANY(sPlayerControlInput->press.button, BTN_CRIGHT | BTN_CLEFT | BTN_CDOWN | BTN_B | BTN_A)) { if (!func_808313A8(play, this, this->heldActor)) { if (!func_8083D738(this, this->heldActor)) { - Player_SetAction(play, this, func_8084E58C, 1); + Player_SetAction(play, this, Player_Action_41, 1); Player_AnimationPlayOnce(play, this, D_8085BE84[PLAYER_ANIMGROUP_29][this->modelAnimType]); return true; } @@ -8989,7 +8988,7 @@ s32 func_8083D860(Player* this, PlayState* play) { } void func_8083DCC4(Player* this, PlayerAnimationHeader* anim, PlayState* play) { - func_8083172C(play, this, func_8084FC0C, 0); + Player_SetAction_PreserveMoveFlags(play, this, Player_Action_51, 0); PlayerAnimation_PlayOnceSetSpeed(play, &this->skelAnime, anim, 4.0f / 3.0f); } @@ -9042,7 +9041,7 @@ void func_8083DEE4(PlayState* play, Player* this) { void func_8083DF38(Player* this, PlayerAnimationHeader* anim, PlayState* play) { if (!func_80832558(play, this, func_80837BF8)) { - Player_SetAction(play, this, func_8084ED9C, 0); + Player_SetAction(play, this, Player_Action_45, 0); } Player_AnimationPlayOnce(play, this, anim); @@ -9106,13 +9105,13 @@ s32 func_8083E14C(PlayState* play, Player* this) { } void func_8083E234(Player* this, PlayState* play) { - Player_SetAction(play, this, func_8084EE50, 0); + Player_SetAction(play, this, Player_Action_46, 0); Player_AnimationPlayOnce(play, this, &gPlayerAnim_link_normal_push_start); this->stateFlags2 |= PLAYER_STATE2_10; } void func_8083E28C(Player* this, PlayState* play) { - Player_SetAction(play, this, func_8084EF9C, 0); + Player_SetAction(play, this, Player_Action_47, 0); Player_AnimationPlayOnce(play, this, D_8085BE84[PLAYER_ANIMGROUP_34][this->modelAnimType]); this->stateFlags2 |= PLAYER_STATE2_10; } @@ -9407,7 +9406,7 @@ void func_8083EE60(Player* this, PlayState* play) { } void func_8083F144(Player* this, PlayState* play) { - Player_SetAction(play, this, func_8084A794, 1); + Player_SetAction(play, this, Player_Action_7, 1); func_8082E438(play, this, &gPlayerAnim_link_normal_back_brake); } @@ -9429,7 +9428,7 @@ s32 func_8083F190(Player* this, f32* arg1, s16* arg2, PlayState* play) { } void func_8083F230(Player* this, PlayState* play) { - Player_SetAction(play, this, func_8084A884, 1); + Player_SetAction(play, this, Player_Action_8, 1); Player_AnimationPlayOnce(play, this, &gPlayerAnim_link_normal_back_brake_end); } @@ -9723,20 +9722,20 @@ PlayerAnimationHeader* D_8085D294[] = { }; void func_808400CC(PlayState* play, Player* this) { - if (func_8084B5C0 != this->actionFunc) { + if (Player_Action_18 != this->actionFunc) { func_8082DD2C(play, this); if ((this->transformation != PLAYER_FORM_HUMAN) && (this->transformation != PLAYER_FORM_FIERCE_DEITY)) { u8 moveFlags = this->skelAnime.moveFlags; s32 pad; this->skelAnime.moveFlags = 0; - Player_SetAction(play, this, func_80854C70, 0); + Player_SetAction(play, this, Player_Action_85, 0); this->skelAnime.moveFlags = moveFlags; } else { s32 var_v1; s32 pad; - Player_SetAction(play, this, func_80854C70, 0); + Player_SetAction(play, this, Player_Action_85, 0); if (func_80123420(this)) { var_v1 = 2; } else { @@ -9979,13 +9978,13 @@ s32 func_80840A30(PlayState* play, Player* this, f32* arg2, f32 arg3) { } if (!(this->stateFlags3 & PLAYER_STATE3_1000)) { - if ((this->stateFlags3 & PLAYER_STATE3_8000) && (func_8084CA24 != this->actionFunc)) { - Player_SetAction(play, this, func_80851B58, 0); + if ((this->stateFlags3 & PLAYER_STATE3_8000) && (Player_Action_28 != this->actionFunc)) { + Player_SetAction(play, this, Player_Action_61, 0); func_8082DB90(play, this, &gPlayerAnim_link_swimer_swim_hit); func_8082DD2C(play, this); this->linearVelocity *= 0.2f; } else { - Player_SetAction(play, this, func_8084C6EC, 0); + Player_SetAction(play, this, Player_Action_26, 0); Player_AnimationPlayOnce(play, this, D_8085BE84[PLAYER_ANIMGROUP_16][this->modelAnimType]); this->unk_AE8 = 1; } @@ -10029,11 +10028,11 @@ s32 func_80840CD4(Player* this, PlayState* play) { } void func_80840DEC(Player* this, PlayState* play) { - Player_SetAction(play, this, func_8084CE84, 1); + Player_SetAction(play, this, Player_Action_31, 1); } void func_80840E24(Player* this, PlayState* play) { - Player_SetAction(play, this, func_8084D18C, 1); + Player_SetAction(play, this, Player_Action_32, 1); } void func_80840E5C(Player* this, PlayState* play) { @@ -10044,7 +10043,7 @@ void func_80840E5C(Player* this, PlayState* play) { } void func_80840EC0(Player* this, PlayState* play) { - Player_SetAction(play, this, func_8084CCEC, 1); + Player_SetAction(play, this, Player_Action_30, 1); Player_AnimationPlayLoop(play, this, D_8085CF60[Player_IsHoldingTwoHandedWeapon(this)]); this->unk_AE8 = 1; this->unk_B38 = 0.0f; @@ -10120,7 +10119,7 @@ void Player_InitMode_0(PlayState* play, Player* this) { } void Player_InitMode_2(PlayState* play, Player* this) { - Player_SetAction(play, this, func_80854118, 0); + Player_SetAction(play, this, Player_Action_76, 0); this->stateFlags1 |= PLAYER_STATE1_20000000; PlayerAnimation_Change(play, &this->skelAnime, &gPlayerAnim_link_okarina_warp_goal, 2.0f / 3.0f, 0.0f, 24.0f, ANIMMODE_ONCE, 0.0f); @@ -10154,7 +10153,7 @@ void func_80841358(PlayState* play, Player* this, s32 arg2) { Vec3f D_8085D2B4 = { -1.0f, 69.0f, 20.0f }; void Player_InitMode_1(PlayState* play, Player* this) { - Player_SetAction(play, this, func_80852FD4, 0); + Player_SetAction(play, this, Player_Action_66, 0); this->stateFlags1 |= PLAYER_STATE1_20000000; Math_Vec3f_Copy(&this->actor.world.pos, &D_8085D2B4); this->currentYaw = this->actor.shape.rot.y = -0x8000; @@ -10169,13 +10168,13 @@ void Player_InitMode_1(PlayState* play, Player* this) { } void Player_InitMode_3(PlayState* play, Player* this) { - Player_SetAction(play, this, func_8085437C, 0); + Player_SetAction(play, this, Player_Action_78, 0); func_8082E920(play, this, ANIM_FLAG_1 | ANIM_FLAG_UPDATE_Y | ANIM_FLAG_8 | ANIM_FLAG_NOMOVE | ANIM_FLAG_80); } void Player_InitMode_4(PlayState* play, Player* this) { func_80834DB8(this, &gPlayerAnim_link_normal_jump, 12.0f, play); - Player_SetAction(play, this, func_8085439C, 0); + Player_SetAction(play, this, Player_Action_79, 0); this->stateFlags1 |= PLAYER_STATE1_20000000; this->fallStartHeight = this->actor.world.pos.y; } @@ -10185,20 +10184,20 @@ void Player_InitMode_7(PlayState* play, Player* this) { } void Player_InitMode_5(PlayState* play, Player* this) { - Player_SetAction(play, this, func_808540A0, 0); + Player_SetAction(play, this, Player_Action_75, 0); this->actor.draw = NULL; this->stateFlags1 |= PLAYER_STATE1_20000000; } void Player_InitMode_6(PlayState* play, Player* this) { if (gSaveContext.save.isOwlSave) { - Player_SetAction(play, this, func_808496AC, 0); + Player_SetAction(play, this, Player_Action_0, 0); func_8082E514(play, this, D_8085BE84[PLAYER_ANIMGROUP_43][this->modelAnimType]); this->stateFlags1 |= PLAYER_STATE1_20000000; this->unk_AE8 = 0x28; gSaveContext.save.isOwlSave = false; } else { - Player_SetAction(play, this, func_80849FE0, 0); + Player_SetAction(play, this, Player_Action_4, 0); func_8082E514(play, this, D_8085BE84[PLAYER_ANIMGROUP_43][this->modelAnimType]); this->stateFlags1 |= PLAYER_STATE1_20000000; this->stateFlags2 |= PLAYER_STATE2_20000000; @@ -10209,7 +10208,7 @@ void Player_InitMode_6(PlayState* play, Player* this) { // InitModes 0x8 and 0x9 void func_80841744(PlayState* play, Player* this) { - Player_SetAction(play, this, func_80855C28, 0); + Player_SetAction(play, this, Player_Action_91, 0); if (PLAYER_GET_INITMODE(&this->actor) == PLAYER_INITMODE_8) { Player_AnimationPlayOnceReverse(play, this, D_8085D17C[this->transformation]); this->itemAction = PLAYER_IA_OCARINA; @@ -10418,10 +10417,10 @@ void Player_Init(Actor* thisx, PlayState* play) { } if ((this->csMode == PLAYER_CSMODE_9) || (this->csMode == PLAYER_CSMODE_93)) { - Player_SetAction(play, this, func_8085B08C, 0); + Player_SetAction(play, this, Player_Action_97, 0); this->stateFlags1 |= PLAYER_STATE1_20000000; } else { - Player_SetAction(play, this, func_80855818, 0); + Player_SetAction(play, this, Player_Action_87, 0); this->actor.shape.rot.y = this->currentYaw; if (this->prevMask != PLAYER_MASK_NONE) { @@ -10456,7 +10455,7 @@ void Player_Init(Actor* thisx, PlayState* play) { if (this->actor.shape.rot.x != 0) { this->actor.shape.rot.x = 0; this->csMode = PLAYER_CSMODE_68; - Player_SetAction(play, this, func_8085B08C, 0); + Player_SetAction(play, this, Player_Action_97, 0); this->stateFlags1 |= PLAYER_STATE1_20000000; return; } @@ -10619,7 +10618,7 @@ void Player_SetDoAction(PlayState* play, Player* this) { } doActionB = -1; - sp38 = func_801242B4(this) || (func_8084CA24 == this->actionFunc); + sp38 = func_801242B4(this) || (Player_Action_28 == this->actionFunc); // Set B do action if (this->transformation == PLAYER_FORM_GORON) { @@ -10674,7 +10673,7 @@ void Player_SetDoAction(PlayState* play, Player* this) { doActionA = DO_ACTION_SNAP; } else if (Player_InBlockingCsMode(play, this) || (this->actor.flags & ACTOR_FLAG_20000000) || (this->stateFlags1 & PLAYER_STATE1_1000) || (this->stateFlags3 & PLAYER_STATE3_80000) || - (func_80854430 == this->actionFunc)) { + (Player_Action_80 == this->actionFunc)) { doActionA = DO_ACTION_NONE; } else if (this->stateFlags1 & PLAYER_STATE1_100000) { doActionA = DO_ACTION_RETURN; @@ -10701,7 +10700,7 @@ void Player_SetDoAction(PlayState* play, Player* this) { (!(this->stateFlags1 & PLAYER_STATE1_800000) && (this->rideActor != NULL))) { doActionA = DO_ACTION_CLIMB; } else if ((this->stateFlags1 & PLAYER_STATE1_800000) && - (!EN_HORSE_CHECK_4((EnHorse*)this->rideActor) && (func_808505D0 != this->actionFunc))) { + (!EN_HORSE_CHECK_4((EnHorse*)this->rideActor) && (Player_Action_53 != this->actionFunc))) { if ((this->stateFlags2 & PLAYER_STATE2_2) && (this->talkActor != NULL)) { if ((this->talkActor->category == ACTORCAT_NPC) || (this->talkActor->id == ACTOR_DM_CHAR08)) { doActionA = DO_ACTION_SPEAK; @@ -10848,7 +10847,7 @@ void Player_ProcessSceneCollision(PlayState* play, Player* this) { f32 speedScale; f32 ceilingCheckHeight; u32 updBgCheckInfoFlags; - s32 spAC = (func_8084D820 == this->actionFunc) && (this->unk_397 == 4); + s32 spAC = (Player_Action_35 == this->actionFunc) && (this->unk_397 == 4); sPlayerPrevFloorProperty = this->floorProperty; @@ -10867,7 +10866,7 @@ void Player_ProcessSceneCollision(PlayState* play, Player* this) { updBgCheckInfoFlags = UPDBGCHECKINFO_FLAG_1 | UPDBGCHECKINFO_FLAG_8 | UPDBGCHECKINFO_FLAG_10 | UPDBGCHECKINFO_FLAG_20; } else if (!(this->stateFlags1 & PLAYER_STATE1_1) && - ((func_8084E034 == this->actionFunc) || (func_8084D820 == this->actionFunc))) { + ((Player_Action_36 == this->actionFunc) || (Player_Action_35 == this->actionFunc))) { updBgCheckInfoFlags = UPDBGCHECKINFO_FLAG_4 | UPDBGCHECKINFO_FLAG_8 | UPDBGCHECKINFO_FLAG_10 | UPDBGCHECKINFO_FLAG_20; this->actor.bgCheckFlags &= ~(BGCHECKFLAG_WALL | BGCHECKFLAG_PLAYER_WALL_INTERACT); @@ -10876,7 +10875,7 @@ void Player_ProcessSceneCollision(PlayState* play, Player* this) { UPDBGCHECKINFO_FLAG_8 | UPDBGCHECKINFO_FLAG_10 | UPDBGCHECKINFO_FLAG_20; } } else { - if (func_808561B0 == this->actionFunc) { + if (Player_Action_93 == this->actionFunc) { updBgCheckInfoFlags = UPDBGCHECKINFO_FLAG_4 | UPDBGCHECKINFO_FLAG_10 | UPDBGCHECKINFO_FLAG_800; } else if ((this->stateFlags3 & (PLAYER_STATE3_1000 | PLAYER_STATE3_80000)) && (this->linearVelocity >= 8.0f)) { updBgCheckInfoFlags = UPDBGCHECKINFO_FLAG_1 | UPDBGCHECKINFO_FLAG_2 | UPDBGCHECKINFO_FLAG_4 | @@ -11158,7 +11157,7 @@ void Player_UpdateCamAndSeqModes(PlayState* play, Player* this) { if ((this->actor.parent != NULL) && (this->stateFlags3 & PLAYER_STATE3_80)) { camMode = CAM_MODE_HOOKSHOT; Camera_SetViewParam(camera, CAM_VIEW_TARGET, this->actor.parent); - } else if (func_8084BC64 == this->actionFunc) { + } else if (Player_Action_21 == this->actionFunc) { camMode = CAM_MODE_STILL; } else if (this->stateFlags3 & PLAYER_STATE3_8000) { if (this->stateFlags1 & PLAYER_STATE1_8000000) { @@ -11222,12 +11221,12 @@ void Player_UpdateCamAndSeqModes(PlayState* play, Player* this) { camMode = CAM_MODE_CLIMB; } else if (this->stateFlags1 & PLAYER_STATE1_80000) { camMode = CAM_MODE_FREEFALL; - } else if (((func_808548B8 == this->actionFunc) && + } else if (((Player_Action_84 == this->actionFunc) && (this->meleeWeaponAnimation >= PLAYER_MWA_FORWARD_SLASH_1H) && (this->meleeWeaponAnimation <= PLAYER_MWA_ZORA_PUNCH_KICK)) || (this->stateFlags3 & PLAYER_STATE3_8) || - ((func_8084FE7C == this->actionFunc) && (this->unk_AE8 == 0)) || - (func_808505D0 == this->actionFunc)) { + ((Player_Action_52 == this->actionFunc) && (this->unk_AE8 == 0)) || + (Player_Action_53 == this->actionFunc)) { camMode = CAM_MODE_STILL; } else { camMode = CAM_MODE_NORMAL; @@ -11489,7 +11488,7 @@ void func_80844784(PlayState* play, Player* this) { ((this->pushedSpeed != 0.0f) || (this->windSpeed != 0.0f) || (play->envCtx.windSpeed >= 50.0f)) && (!Player_InCsMode(play)) && !(this->stateFlags1 & (PLAYER_STATE1_4 | PLAYER_STATE1_2000 | PLAYER_STATE1_4000 | PLAYER_STATE1_200000)) && - !(this->stateFlags3 & PLAYER_STATE3_100) && (func_8084D4EC != this->actionFunc) && + !(this->stateFlags3 & PLAYER_STATE3_100) && (Player_Action_33 != this->actionFunc) && (this->actor.id == ACTOR_PLAYER)) { this->actor.velocity.x += this->pushedSpeed * Math_SinS(this->pushedYaw); this->actor.velocity.z += this->pushedSpeed * Math_CosS(this->pushedYaw); @@ -11504,7 +11503,7 @@ void func_80844784(PlayState* play, Player* this) { if ((sp50 > 0.0f) && (this->transformation == PLAYER_FORM_DEKU) && !(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) { - if (Player_SetAction(play, this, func_80856918, 1)) { + if (Player_SetAction(play, this, Player_Action_94, 1)) { this->stateFlags3 |= PLAYER_STATE3_2000 | PLAYER_STATE3_1000000; func_8082E1F0(this, NA_SE_IT_DEKUNUTS_FLOWER_OPEN); Audio_SetSfxTimerLerpInterval(4, 2); @@ -11699,7 +11698,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND))) { func_8083B930(play, this); this->stateFlags2 &= ~PLAYER_STATE2_400; - if (func_808508C8 == this->actionFunc) { + if (Player_Action_54 == this->actionFunc) { this->unk_AE8 = 20; } } @@ -11779,7 +11778,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { Math_StepToF(&this->pushedSpeed, 0.0f, (this->stateFlags1 & PLAYER_STATE1_8000000) ? 0.5f : 2.0f); } if (!(this->stateFlags1 & (PLAYER_STATE1_80 | PLAYER_STATE1_20000000)) && - !(this->stateFlags3 & PLAYER_STATE3_80) && (func_80854430 != this->actionFunc)) { + !(this->stateFlags3 & PLAYER_STATE3_80) && (Player_Action_80 != this->actionFunc)) { func_8083BB4C(play, this); if (!Play_InCsMode(play)) { if ((this->actor.id == ACTOR_PLAYER) && !(this->stateFlags1 & PLAYER_STATE1_80000000) && @@ -11810,7 +11809,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { Player_DetectSecrets(play, this); } } - } else if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && (func_8084D820 == this->actionFunc) && + } else if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && (Player_Action_35 == this->actionFunc) && (this->unk_397 == 4)) { this->actor.world.pos.y = this->actor.prevPos.y; } @@ -11836,14 +11835,14 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { if ((this->csMode != PLAYER_CSMODE_END) || !(this->stateFlags1 & (PLAYER_STATE1_4 | PLAYER_STATE1_2000 | PLAYER_STATE1_4000 | PLAYER_STATE1_200000 | PLAYER_STATE1_4000000))) { - if (func_8085B08C != this->actionFunc) { + if (Player_Action_97 != this->actionFunc) { this->unk_AA5 = PLAYER_UNKAA5_4; if (this->csMode == PLAYER_CSMODE_5) { func_808387A0(play, this); func_8082DAD4(this); } } - } else if (func_8085B08C != this->actionFunc) { + } else if (Player_Action_97 != this->actionFunc) { Player_CsAction_End(play, this, NULL); } } else { @@ -11996,7 +11995,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { if (!(this->stateFlags1 & (PLAYER_STATE1_4 | PLAYER_STATE1_80 | PLAYER_STATE1_2000 | PLAYER_STATE1_4000 | PLAYER_STATE1_800000)) && !(this->stateFlags3 & PLAYER_STATE3_10000000)) { - if ((func_808561B0 != this->actionFunc) && (func_80853D68 != this->actionFunc) && + if ((Player_Action_93 != this->actionFunc) && (Player_Action_73 != this->actionFunc) && (this->actor.draw != NULL)) { if ((this->actor.id != ACTOR_PLAYER) && (this->csMode == PLAYER_CSMODE_110)) { this->cylinder.dim.radius = 8; @@ -12005,8 +12004,8 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { } } if (!(this->stateFlags1 & (PLAYER_STATE1_80 | PLAYER_STATE1_4000000)) && (this->invincibilityTimer <= 0)) { - if ((func_808561B0 != this->actionFunc) && - ((func_80857BE8 != this->actionFunc) || (this->unk_AE7 != 1))) { + if ((Player_Action_93 != this->actionFunc) && + ((Player_Action_96 != this->actionFunc) || (this->unk_AE7 != 1))) { if (this->cylinder.base.atFlags != AT_NONE) { CollisionCheck_SetAT(play, &play->colChkCtx, &this->cylinder.base); } @@ -12565,14 +12564,14 @@ void func_808477D0(PlayState* play, Player* this, Input* input, f32 arg3) { s32 func_80847880(PlayState* play, Player* this) { if (play->unk_1887C != 0) { if (play->sceneId == SCENE_20SICHITAI) { - Player_SetAction(play, this, func_80854430, 0); + Player_SetAction(play, this, Player_Action_80, 0); play->unk_1887C = 0; this->csMode = PLAYER_CSMODE_NONE; return true; } func_8082DE50(play, this); - Player_SetAction(play, this, func_80854614, 0); + Player_SetAction(play, this, Player_Action_81, 0); if (!func_800B7118(this) || Player_IsHoldingHookshot(this)) { func_80831990(play, this, ITEM_BOW); } @@ -12684,7 +12683,7 @@ s32 func_80847BF0(Player* this, PlayState* play) { (EN_HORSE_CHECK_4(rideActor) && CHECK_BTN_ALL(sPlayerControlInput->press.button, BTN_A))) { rideActor->actor.child = NULL; - func_8083172C(play, this, func_808505D0, 0); + Player_SetAction_PreserveMoveFlags(play, this, Player_Action_53, 0); this->unk_B48 = sp34 - rideActor->actor.world.pos.y; Player_AnimationPlayOnce(play, this, @@ -12756,7 +12755,7 @@ void func_80847FF8(Player* this, f32* arg1, f32 arg2, s16 arg3) { } void func_80848048(PlayState* play, Player* this) { - Player_SetAction(play, this, func_80851588, 0); + Player_SetAction(play, this, Player_Action_58, 0); func_8082E634(play, this, &gPlayerAnim_link_swimer_swim); } @@ -12946,30 +12945,30 @@ void func_80848640(PlayState* play, Player* this) { } } -s32 func_80848780(Player* this, PlayState* play) { +s32 Player_UpperAction_0(Player* this, PlayState* play) { if (func_80830B88(play, this)) { return true; } return false; } -s32 func_808487B8(Player* this, PlayState* play) { +s32 Player_UpperAction_1(Player* this, PlayState* play) { if (func_80830B88(play, this) || func_80830DF0(this, play)) { return true; } return false; } -s32 func_80848808(Player* this, PlayState* play) { +s32 Player_UpperAction_2(Player* this, PlayState* play) { if (PlayerAnimation_Update(play, &this->unk_284) || ((Player_ItemToItemAction(this, this->heldItemId) == this->heldItemAction) && (D_80862B48 = D_80862B48 || ((this->modelAnimType != PLAYER_ANIMTYPE_3) && (this->heldItemAction != PLAYER_IA_DEKU_STICK) && (play->unk_1887C == 0))))) { - func_8082F43C(play, this, D_8085C9F0[this->heldItemAction]); + Player_SetUpperAction(play, this, D_8085C9F0[this->heldItemAction]); this->unk_ACC = 0; this->unk_AA4 = 0; D_80862B4C = D_80862B48; - return this->unk_AC4(this, play); + return this->upperActionFunc(this, play); } if (func_8082ED94(this) != 0) { @@ -12982,7 +12981,7 @@ s32 func_80848808(Player* this, PlayState* play) { return true; } -s32 func_8084894C(Player* this, PlayState* play) { +s32 Player_UpperAction_3(Player* this, PlayState* play) { PlayerAnimation_Update(play, &this->unk_284); if (!CHECK_BTN_ALL(sPlayerControlInput->cur.button, BTN_R)) { func_80830CE8(play, this); @@ -12996,7 +12995,7 @@ s32 func_8084894C(Player* this, PlayState* play) { return true; } -s32 func_80848A0C(Player* this, PlayState* play) { +s32 Player_UpperAction_4(Player* this, PlayState* play) { if (PlayerAnimation_Update(play, &this->unk_284)) { PlayerAnimationHeader* anim; f32 lastFrame; @@ -13011,20 +13010,20 @@ s32 func_80848A0C(Player* this, PlayState* play) { return true; } -s32 func_80848AB0(Player* this, PlayState* play) { +s32 Player_UpperAction_5(Player* this, PlayState* play) { // possibly a case of if ((D_80862B48 = D_80862B4C) || PlayerAnimation_Update(play, &this->unk_284)) D_80862B48 = D_80862B4C; if ((D_80862B48 != 0) || PlayerAnimation_Update(play, &this->unk_284)) { - func_8082F43C(play, this, D_8085C9F0[this->heldItemAction]); + Player_SetUpperAction(play, this, D_8085C9F0[this->heldItemAction]); PlayerAnimation_PlayLoop(play, &this->unk_284, D_8085BE84[PLAYER_ANIMGROUP_0][this->modelAnimType]); this->unk_AA4 = 0; - this->unk_AC4(this, play); + this->upperActionFunc(this, play); return false; } return true; } -s32 func_80848B6C(Player* this, PlayState* play) { +s32 Player_UpperAction_6(Player* this, PlayState* play) { if (this->unk_B28 >= 0) { this->unk_B28 = -this->unk_B28; } @@ -13056,7 +13055,7 @@ u16 D_8085D5FC[] = { NA_SE_NONE, }; -s32 func_80848BF4(Player* this, PlayState* play) { +s32 Player_UpperAction_7(Player* this, PlayState* play) { s32 index; s32 temp; @@ -13089,7 +13088,7 @@ s32 func_80848BF4(Player* this, PlayState* play) { func_80831010(this, play); if ((this->unk_ACE > 0) && ((this->unk_B28 < 0) || ((D_80862B4C == 0) && !func_80830FD4(play)))) { - func_8082F43C(play, this, func_80848E4C); + Player_SetUpperAction(play, this, Player_UpperAction_8); if (this->unk_B28 >= 0) { if (index != 0) { if (!func_80831194(play, this)) { @@ -13112,7 +13111,7 @@ s32 func_80848BF4(Player* this, PlayState* play) { return 1; } -s32 func_80848E4C(Player* this, PlayState* play) { +s32 Player_UpperAction_8(Player* this, PlayState* play) { s32 animFinished = PlayerAnimation_Update(play, &this->unk_284); if (Player_IsHoldingHookshot(this) && !func_80831124(play, this)) { @@ -13148,9 +13147,9 @@ s32 func_80848E4C(Player* this, PlayState* play) { } if (Player_IsHoldingHookshot(this)) { - func_8082F43C(play, this, func_80848B6C); + Player_SetUpperAction(play, this, Player_UpperAction_6); } else { - func_8082F43C(play, this, func_80849054); + Player_SetUpperAction(play, this, Player_UpperAction_9); PlayerAnimation_PlayOnce(play, &this->unk_284, (this->transformation == PLAYER_FORM_DEKU) ? &gPlayerAnim_pn_tamahakidf : &gPlayerAnim_link_bow_bow_shoot_end); @@ -13161,14 +13160,14 @@ s32 func_80848E4C(Player* this, PlayState* play) { return true; } -s32 func_80849054(Player* this, PlayState* play) { +s32 Player_UpperAction_9(Player* this, PlayState* play) { if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || PlayerAnimation_Update(play, &this->unk_284)) { - func_8082F43C(play, this, func_80848B6C); + Player_SetUpperAction(play, this, Player_UpperAction_6); } return true; } -s32 func_808490B4(Player* this, PlayState* play) { +s32 Player_UpperAction_10(Player* this, PlayState* play) { Actor* heldActor = this->heldActor; if (heldActor == NULL) { @@ -13191,16 +13190,16 @@ s32 func_808490B4(Player* this, PlayState* play) { } return true; } - return func_80848780(this, play); + return Player_UpperAction_0(this, play); } -s32 func_808491B4(Player* this, PlayState* play) { +s32 Player_UpperAction_11(Player* this, PlayState* play) { if (func_80830B88(play, this)) { return true; } if (this->stateFlags1 & PLAYER_STATE1_2000000) { - func_8082F43C(play, this, func_80849570); + Player_SetUpperAction(play, this, Player_UpperAction_15); } else if (func_80831094(this, play)) { return true; } @@ -13208,9 +13207,9 @@ s32 func_808491B4(Player* this, PlayState* play) { return false; } -s32 func_8084923C(Player* this, PlayState* play) { +s32 Player_UpperAction_12(Player* this, PlayState* play) { if (PlayerAnimation_Update(play, &this->unk_284)) { - func_8082F43C(play, this, func_808492C4); + Player_SetUpperAction(play, this, Player_UpperAction_13); PlayerAnimation_PlayLoop(play, &this->unk_284, &gPlayerAnim_pz_cutterwaitanim); } if (this->unk_284.animation == &gPlayerAnim_pz_cutterwaitanim) { @@ -13219,19 +13218,19 @@ s32 func_8084923C(Player* this, PlayState* play) { return true; } -s32 func_808492C4(Player* this, PlayState* play) { +s32 Player_UpperAction_13(Player* this, PlayState* play) { PlayerAnimation_Update(play, &this->unk_284); func_80831010(this, play); if (D_80862B4C == 0) { - func_8082F43C(play, this, func_8084933C); + Player_SetUpperAction(play, this, Player_UpperAction_14); PlayerAnimation_PlayOnce(play, &this->unk_284, &gPlayerAnim_pz_cutterattack); } return true; } -s32 func_8084933C(Player* this, PlayState* play) { +s32 Player_UpperAction_14(Player* this, PlayState* play) { if (PlayerAnimation_Update(play, &this->unk_284)) { - func_8082F43C(play, this, func_80849570); + Player_SetUpperAction(play, this, Player_UpperAction_15); this->unk_ACC = 0; } else if (PlayerAnimation_OnFrame(&this->unk_284, 6.0f)) { Vec3f pos; @@ -13290,13 +13289,13 @@ s32 func_8084933C(Player* this, PlayState* play) { return true; } -s32 func_80849570(Player* this, PlayState* play) { +s32 Player_UpperAction_15(Player* this, PlayState* play) { if (func_80830B88(play, this)) { return true; } if (this->stateFlags3 & PLAYER_STATE3_800000) { - func_8082F43C(play, this, func_80849620); + Player_SetUpperAction(play, this, Player_UpperAction_16); PlayerAnimation_PlayOnce(play, &this->unk_284, &gPlayerAnim_pz_cuttercatch); this->stateFlags3 &= ~PLAYER_STATE3_800000; Player_PlaySfx(this, NA_SE_PL_CATCH_BOOMERANG); @@ -13307,26 +13306,26 @@ s32 func_80849570(Player* this, PlayState* play) { return false; } -s32 func_80849620(Player* this, PlayState* play) { - if (!func_808491B4(this, play) && PlayerAnimation_Update(play, &this->unk_284)) { +s32 Player_UpperAction_16(Player* this, PlayState* play) { + if (!Player_UpperAction_11(this, play) && PlayerAnimation_Update(play, &this->unk_284)) { if (this->stateFlags1 & PLAYER_STATE1_2000000) { - func_8082F43C(play, this, func_80849570); + Player_SetUpperAction(play, this, Player_UpperAction_15); this->unk_ACC = 0; } else { - func_8082F43C(play, this, func_80848780); + Player_SetUpperAction(play, this, Player_UpperAction_0); } } return true; } -void func_808496AC(Player* this, PlayState* play) { +void Player_Action_0(Player* this, PlayState* play) { PlayerAnimation_Update(play, &this->skelAnime); func_808323C0(this, play->playerCsIds[PLAYER_CS_ID_ITEM_BOTTLE]); if (DECR(this->unk_AE8) == 0) { if (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) { Player_StopCutscene(this); - Player_SetAction(play, this, func_80849FE0, 0); + Player_SetAction(play, this, Player_Action_4, 0); this->stateFlags1 &= ~PLAYER_STATE1_20000000; } } else if (this->unk_AE8 == 30) { @@ -13338,7 +13337,7 @@ void func_808496AC(Player* this, PlayState* play) { } } -void func_808497A0(Player* this, PlayState* play) { +void Player_Action_1(Player* this, PlayState* play) { this->stateFlags3 |= PLAYER_STATE3_10000000; PlayerAnimation_Update(play, &this->skelAnime); func_8083216C(this, play); @@ -13410,7 +13409,7 @@ void func_808497A0(Player* this, PlayState* play) { } } -void func_80849A9C(Player* this, PlayState* play) { +void Player_Action_2(Player* this, PlayState* play) { f32 sp44; s16 sp42; s32 temp_v0; @@ -13432,7 +13431,7 @@ void func_80849A9C(Player* this, PlayState* play) { return; } - if (!func_8082FB68(this) && (!func_80123434(this) || (func_8084894C != this->unk_AC4))) { + if (!func_8082FB68(this) && (!func_80123434(this) || (Player_UpperAction_3 != this->upperActionFunc))) { func_8083B29C(this, play); return; } @@ -13471,7 +13470,7 @@ void func_80849A9C(Player* this, PlayState* play) { } } -void func_80849DD0(Player* this, PlayState* play) { +void Player_Action_3(Player* this, PlayState* play) { f32 sp3C; s16 sp3A; s32 temp_v0; @@ -13492,11 +13491,11 @@ void func_80849DD0(Player* this, PlayState* play) { return; } if (!func_80123434(this)) { - func_8083172C(play, this, func_80849FE0, 1); + Player_SetAction_PreserveMoveFlags(play, this, Player_Action_4, 1); this->currentYaw = this->actor.shape.rot.y; return; } - if (func_8084894C == this->unk_AC4) { + if (Player_UpperAction_3 == this->upperActionFunc) { func_8083B23C(this, play); return; } @@ -13522,7 +13521,7 @@ void func_80849DD0(Player* this, PlayState* play) { } } -void func_80849FE0(Player* this, PlayState* play) { +void Player_Action_4(Player* this, PlayState* play) { s32 temp_v0 = func_8082ED94(this); s32 animFinished = PlayerAnimation_Update(play, &this->skelAnime); f32 sp3C; @@ -13580,7 +13579,7 @@ void func_80849FE0(Player* this, PlayState* play) { } } -void func_8084A26C(Player* this, PlayState* play) { +void Player_Action_5(Player* this, PlayState* play) { f32 var_fv0; s16 temp_v0_3; f32 sp44; @@ -13662,7 +13661,7 @@ void func_8084A26C(Player* this, PlayState* play) { } } -void func_8084A5C0(Player* this, PlayState* play) { +void Player_Action_6(Player* this, PlayState* play) { f32 sp34; s16 sp32; s32 sp2C; @@ -13701,7 +13700,7 @@ void func_8084A5C0(Player* this, PlayState* play) { } } -void func_8084A794(Player* this, PlayState* play) { +void Player_Action_7(Player* this, PlayState* play) { s32 animFinished = PlayerAnimation_Update(play, &this->skelAnime); f32 sp30; s16 sp2E; @@ -13725,7 +13724,7 @@ void func_8084A794(Player* this, PlayState* play) { } } -void func_8084A884(Player* this, PlayState* play) { +void Player_Action_8(Player* this, PlayState* play) { s32 animFinished = PlayerAnimation_Update(play, &this->skelAnime); if (func_80833058(play, this, D_8085D004, 1)) { @@ -13737,7 +13736,7 @@ void func_8084A884(Player* this, PlayState* play) { } } -void func_8084A8E8(Player* this, PlayState* play) { +void Player_Action_9(Player* this, PlayState* play) { f32 sp3C; s16 sp3A; s32 var_v0; @@ -13794,7 +13793,7 @@ void func_8084A8E8(Player* this, PlayState* play) { } } -void func_8084AB4C(Player* this, PlayState* play) { +void Player_Action_10(Player* this, PlayState* play) { f32 sp34; s16 sp32; @@ -13824,7 +13823,7 @@ void func_8084AB4C(Player* this, PlayState* play) { this->currentYaw = this->actor.shape.rot.y; } -void func_8084AC84(Player* this, PlayState* play) { +void Player_Action_11(Player* this, PlayState* play) { this->stateFlags2 |= PLAYER_STATE2_20; if (this->linearVelocity < 1.0f) { @@ -13835,7 +13834,7 @@ void func_8084AC84(Player* this, PlayState* play) { PlayerAnimation_Update(play, &this->skelAnime); if (!func_80847880(play, this) && - (!func_80833058(play, this, D_8085D01C, 1) || (func_8084AC84 == this->actionFunc))) { + (!func_80833058(play, this, D_8085D01C, 1) || (Player_Action_11 == this->actionFunc))) { f32 sp3C; f32 temp_fv0; f32 temp_fv1; @@ -13870,12 +13869,12 @@ void func_8084AC84(Player* this, PlayState* play) { } } -void func_8084AEEC(Player* this, PlayState* play) { +void Player_Action_12(Player* this, PlayState* play) { this->stateFlags2 |= PLAYER_STATE2_20; PlayerAnimation_Update(play, &this->skelAnime); func_80832F24(this); if (!func_80847880(play, this)) { - if (!func_80833058(play, this, D_8085D01C, 0) || (func_8084AEEC == this->actionFunc)) { + if (!func_80833058(play, this, D_8085D01C, 0) || (Player_Action_12 == this->actionFunc)) { if (!CHECK_BTN_ALL(sPlayerControlInput->cur.button, BTN_B)) { func_80839E74(this, play); } @@ -13883,7 +13882,7 @@ void func_8084AEEC(Player* this, PlayState* play) { } } -void func_8084AF9C(Player* this, PlayState* play) { +void Player_Action_13(Player* this, PlayState* play) { f32 sp2C; // player speed? s16 sp2A; @@ -13912,7 +13911,7 @@ void func_8084AF9C(Player* this, PlayState* play) { } } -void func_8084B0EC(Player* this, PlayState* play) { +void Player_Action_14(Player* this, PlayState* play) { f32 sp2C; s16 sp2A; @@ -13943,7 +13942,7 @@ void func_8084B0EC(Player* this, PlayState* play) { } } -void func_8084B288(Player* this, PlayState* play) { +void Player_Action_15(Player* this, PlayState* play) { s32 animFinished = PlayerAnimation_Update(play, &this->skelAnime); f32 sp30; s16 sp2E; @@ -13968,7 +13967,7 @@ void func_8084B288(Player* this, PlayState* play) { } } -void func_8084B3B8(Player* this, PlayState* play) { +void Player_Action_16(Player* this, PlayState* play) { s32 animFinished = PlayerAnimation_Update(play, &this->skelAnime); f32 sp30; s16 sp2E; @@ -13989,7 +13988,7 @@ void func_8084B3B8(Player* this, PlayState* play) { } } -void func_8084B4A8(Player* this, PlayState* play) { +void Player_Action_17(Player* this, PlayState* play) { if (this->skelAnime.animation == &gPlayerAnim_link_normal_backspace) { if (PlayerAnimation_Update(play, &this->skelAnime)) { func_8082E794(this); @@ -14009,7 +14008,7 @@ void func_8084B4A8(Player* this, PlayState* play) { } // Player_Action_Shielding -void func_8084B5C0(Player* this, PlayState* play) { +void Player_Action_18(Player* this, PlayState* play) { func_80832F24(this); if (this->transformation == PLAYER_FORM_GORON) { @@ -14115,12 +14114,12 @@ void func_8084B5C0(Player* this, PlayState* play) { this->unk_AA6 |= 0xC1; } -void func_8084BAA4(Player* this, PlayState* play) { +void Player_Action_19(Player* this, PlayState* play) { func_80832F24(this); if (this->unk_AE7 == 0) { D_80862B04 = func_8083216C(this, play); - if ((func_8084894C == this->unk_AC4) || (func_808331FC(play, this, &this->unk_284, 4.0f) > 0)) { - Player_SetAction(play, this, func_80849A9C, 1); + if ((Player_UpperAction_3 == this->upperActionFunc) || (func_808331FC(play, this, &this->unk_284, 4.0f) > 0)) { + Player_SetAction(play, this, Player_Action_2, 1); } } else { s32 temp_v0; @@ -14131,7 +14130,7 @@ void func_8084BAA4(Player* this, PlayState* play) { PlayerAnimationHeader* anim; f32 lastFrame; - Player_SetAction(play, this, func_8084B5C0, 1); + Player_SetAction(play, this, Player_Action_18, 1); Player_SetModelsForHoldingShield(this); anim = D_8085BE84[PLAYER_ANIMGROUP_19][this->modelAnimType]; lastFrame = Animation_GetLastFrame(anim); @@ -14140,7 +14139,7 @@ void func_8084BAA4(Player* this, PlayState* play) { } } -void func_8084BBF0(Player* this, PlayState* play) { +void Player_Action_20(Player* this, PlayState* play) { s32 temp_v0; func_80832F24(this); @@ -14152,7 +14151,7 @@ void func_8084BBF0(Player* this, PlayState* play) { } } -void func_8084BC64(Player* this, PlayState* play) { +void Player_Action_21(Player* this, PlayState* play) { this->stateFlags2 |= PLAYER_STATE2_20 | PLAYER_STATE2_40; func_808345A8(this); @@ -14185,7 +14184,7 @@ void func_8084BC64(Player* this, PlayState* play) { if (this->stateFlags1 & PLAYER_STATE1_20000000) { this->unk_AE8++; } else { - Player_SetAction(play, this, func_8084BE40, 0); + Player_SetAction(play, this, Player_Action_22, 0); this->stateFlags1 |= PLAYER_STATE1_4000000; } @@ -14202,7 +14201,7 @@ void func_8084BC64(Player* this, PlayState* play) { } } -void func_8084BE40(Player* this, PlayState* play) { +void Player_Action_22(Player* this, PlayState* play) { this->stateFlags2 |= (PLAYER_STATE2_20 | PLAYER_STATE2_40); func_808345A8(this); func_80832F24(this); @@ -14210,7 +14209,7 @@ void func_8084BE40(Player* this, PlayState* play) { if (this->stateFlags1 & PLAYER_STATE1_20000000) { this->unk_AE8++; } else { - Player_SetAction(play, this, func_8084BF28, 0); + Player_SetAction(play, this, Player_Action_23, 0); this->stateFlags1 |= PLAYER_STATE1_4000000; } @@ -14226,7 +14225,7 @@ AnimSfxEntry D_8085D604[] = { ANIMSFX(ANIMSFX_TYPE_8, 30, NA_SE_NONE, STOP), }; -void func_8084BF28(Player* this, PlayState* play) { +void Player_Action_23(Player* this, PlayState* play) { this->stateFlags2 |= PLAYER_STATE2_20; func_808345A8(this); @@ -14252,7 +14251,7 @@ AnimSfxEntry D_8085D60C[] = { ANIMSFX(ANIMSFX_TYPE_8, 170, NA_SE_NONE, STOP), }; -void func_8084BFDC(Player* this, PlayState* play) { +void Player_Action_24(Player* this, PlayState* play) { if ((this->transformation != PLAYER_FORM_GORON) && (this->actor.depthInWater <= 0.0f)) { if ((play->roomCtx.curRoom.behaviorType2 == ROOM_BEHAVIOR_TYPE2_HOT) || (sPlayerFloorType == FLOOR_TYPE_9) || ((func_808340AC(sPlayerFloorType) >= 0) && @@ -14282,7 +14281,7 @@ s32 func_8084C124(PlayState* play, Player* this) { return false; } -void func_8084C16C(Player* this, PlayState* play) { +void Player_Action_25(Player* this, PlayState* play) { f32 sp44; s16 sp42; Actor* heldActor; @@ -14394,7 +14393,7 @@ AnimSfxEntry D_8085D61C[] = { }; // Player_Action_Rolling // Handles bonking too? -void func_8084C6EC(Player* this, PlayState* play) { +void Player_Action_26(Player* this, PlayState* play) { s32 animFinished; this->stateFlags2 |= PLAYER_STATE2_20; @@ -14455,7 +14454,7 @@ void func_8084C6EC(Player* this, PlayState* play) { } } -void func_8084C94C(Player* this, PlayState* play) { +void Player_Action_27(Player* this, PlayState* play) { this->stateFlags2 |= PLAYER_STATE2_20; if (PlayerAnimation_Update(play, &this->skelAnime)) { @@ -14473,7 +14472,7 @@ void func_8084C94C(Player* this, PlayState* play) { } } -void func_8084CA24(Player* this, PlayState* play) { +void Player_Action_28(Player* this, PlayState* play) { this->stateFlags2 |= PLAYER_STATE2_20; if (PlayerAnimation_Update(play, &this->skelAnime)) { @@ -14497,7 +14496,7 @@ void func_8084CA24(Player* this, PlayState* play) { } } -void func_8084CB58(Player* this, PlayState* play) { +void Player_Action_29(Player* this, PlayState* play) { AttackAnimInfo* attackInfoEntry = &sMeleeAttackAnimInfo[this->meleeWeaponAnimation]; f32 sp38; s16 sp36; @@ -14527,7 +14526,7 @@ void func_8084CB58(Player* this, PlayState* play) { } } -void func_8084CCEC(Player* this, PlayState* play) { +void Player_Action_30(Player* this, PlayState* play) { f32 sp34; s16 sp32; s32 temp_v0; @@ -14563,7 +14562,7 @@ void func_8084CCEC(Player* this, PlayState* play) { } } -void func_8084CE84(Player* this, PlayState* play) { +void Player_Action_31(Player* this, PlayState* play) { s32 var_v1; s32 temp_v0_2; f32 temp_ft4; @@ -14623,7 +14622,7 @@ void func_8084CE84(Player* this, PlayState* play) { } } -void func_8084D18C(Player* this, PlayState* play) { +void Player_Action_32(Player* this, PlayState* play) { f32 sp5C = fabsf(this->linearVelocity); f32 var_fa0; @@ -14682,7 +14681,7 @@ void func_8084D18C(Player* this, PlayState* play) { } } -void func_8084D4EC(Player* this, PlayState* play) { +void Player_Action_33(Player* this, PlayState* play) { s32 animFinished; f32 frame; s32 temp_v0; @@ -14749,7 +14748,7 @@ void func_8084D4EC(Player* this, PlayState* play) { } } -void func_8084D770(Player* this, PlayState* play) { +void Player_Action_34(Player* this, PlayState* play) { s32 temp_v0; this->stateFlags2 |= (PLAYER_STATE2_20 | PLAYER_STATE2_40); @@ -14767,7 +14766,7 @@ void func_8084D770(Player* this, PlayState* play) { } } -void func_8084D820(Player* this, PlayState* play) { +void Player_Action_35(Player* this, PlayState* play) { if (func_80838A90(this, play) == 0) { if ((this->stateFlags3 & PLAYER_STATE3_10) && !(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) { func_80833AA0(this, play); @@ -14918,7 +14917,7 @@ void func_8084D820(Player* this, PlayState* play) { if (play->unk_1887C != 0) { play->func_18780(this, play); - Player_SetAction(play, this, func_80854430, 0); + Player_SetAction(play, this, Player_Action_80, 0); if (play->sceneId == 0x45) { play->unk_1887C = 0; } @@ -14935,7 +14934,7 @@ void func_8084D820(Player* this, PlayState* play) { } // door stuff -void func_8084E034(Player* this, PlayState* play) { +void Player_Action_36(Player* this, PlayState* play) { EnDoor* doorActor = (EnDoor*)this->doorActor; s32 sp38 = (doorActor != NULL) && (doorActor->doorType == ENDOOR_TYPE_7); s32 animFinished; @@ -14984,7 +14983,7 @@ void func_8084E034(Player* this, PlayState* play) { } // grab/hold an actor (?) -void func_8084E25C(Player* this, PlayState* play) { +void Player_Action_37(Player* this, PlayState* play) { func_80832F24(this); if (PlayerAnimation_Update(play, &this->skelAnime)) { @@ -15008,7 +15007,7 @@ void func_8084E25C(Player* this, PlayState* play) { } // grab/hold an actor (?) -void func_8084E334(Player* this, PlayState* play) { +void Player_Action_38(Player* this, PlayState* play) { func_80832F24(this); if (PlayerAnimation_Update(play, &this->skelAnime)) { @@ -15025,13 +15024,13 @@ void func_8084E334(Player* this, PlayState* play) { Player_AnimSfx_PlayVoice(this, NA_SE_VO_LI_SWORD_L); } } else if (CHECK_BTN_ANY(sPlayerControlInput->press.button, BTN_CRIGHT | BTN_CLEFT | BTN_CDOWN | BTN_B | BTN_A)) { - Player_SetAction(play, this, func_8084E434, 1); + Player_SetAction(play, this, Player_Action_39, 1); Player_AnimationPlayOnce(play, this, &gPlayerAnim_link_silver_throw); } } // throw held actor (?) -void func_8084E434(Player* this, PlayState* play) { +void Player_Action_39(Player* this, PlayState* play) { if (PlayerAnimation_Update(play, &this->skelAnime)) { func_80836988(this, play); } else if (PlayerAnimation_OnFrame(&this->skelAnime, 6.0f)) { @@ -15046,7 +15045,7 @@ void func_8084E434(Player* this, PlayState* play) { } } -void func_8084E4E4(Player* this, PlayState* play) { +void Player_Action_40(Player* this, PlayState* play) { if (PlayerAnimation_Update(play, &this->skelAnime)) { Player_AnimationPlayLoop(play, this, &gPlayerAnim_link_normal_nocarry_free_wait); this->unk_AE8 = 15; @@ -15061,7 +15060,7 @@ void func_8084E4E4(Player* this, PlayState* play) { } // Player_Action_PutDownObject? -void func_8084E58C(Player* this, PlayState* play) { +void Player_Action_41(Player* this, PlayState* play) { func_80832F24(this); if (PlayerAnimation_Update(play, &this->skelAnime)) { @@ -15081,7 +15080,7 @@ void func_8084E58C(Player* this, PlayState* play) { } // Player_Action_Throwing -void func_8084E65C(Player* this, PlayState* play) { +void Player_Action_42(Player* this, PlayState* play) { f32 sp34; s16 yaw; @@ -15095,7 +15094,7 @@ void func_8084E65C(Player* this, PlayState* play) { } } -void func_8084E724(Player* this, PlayState* play) { +void Player_Action_43(Player* this, PlayState* play) { if (this->stateFlags1 & PLAYER_STATE1_8000000) { func_808475B4(this); func_8084748C(this, &this->linearVelocity, 0.0f, this->actor.shape.rot.y); @@ -15136,7 +15135,7 @@ void func_8084E724(Player* this, PlayState* play) { this->currentYaw = this->actor.shape.rot.y; } -void func_8084E980(Player* this, PlayState* play) { +void Player_Action_44(Player* this, PlayState* play) { this->stateFlags2 |= PLAYER_STATE2_20; func_8083249C(this); @@ -15168,9 +15167,9 @@ void func_8084E980(Player* this, PlayState* play) { } if (this->stateFlags1 & PLAYER_STATE1_800000) { - func_8084FE7C(this, play); + Player_Action_52(this, play); } else if (func_801242B4(this)) { - func_808508C8(this, play); + Player_Action_54(this, play); if (this->actor.depthInWater > 100.0f) { this->actor.velocity.y = 0.0f; this->actor.gravity = 0.0f; @@ -15218,7 +15217,7 @@ void func_8084E980(Player* this, PlayState* play) { } } -void func_8084ED9C(Player* this, PlayState* play) { +void Player_Action_45(Player* this, PlayState* play) { f32 sp34; s16 sp32; s32 temp_v0; @@ -15242,7 +15241,7 @@ AnimSfxEntry D_8085D650[] = { ANIMSFX(ANIMSFX_TYPE_FLOOR, 21, NA_SE_PL_SLIP, STOP), }; -void func_8084EE50(Player* this, PlayState* play) { +void Player_Action_46(Player* this, PlayState* play) { this->stateFlags2 |= (PLAYER_STATE2_1 | PLAYER_STATE2_40 | PLAYER_STATE2_100); if (func_8082E67C(play, this, &gPlayerAnim_link_normal_pushing)) { @@ -15283,7 +15282,7 @@ AnimSfxEntry D_8085D658[] = { Vec3f D_8085D660 = { 0.0f, 268 * 0.1f, -60.0f }; -void func_8084EF9C(Player* this, PlayState* play) { +void Player_Action_47(Player* this, PlayState* play) { PlayerAnimationHeader* anim = D_8085BE84[PLAYER_ANIMGROUP_35][this->modelAnimType]; this->stateFlags2 |= (PLAYER_STATE2_1 | PLAYER_STATE2_40 | PLAYER_STATE2_100); @@ -15341,7 +15340,7 @@ void func_8084EF9C(Player* this, PlayState* play) { } } -void func_8084F1B8(Player* this, PlayState* play) { +void Player_Action_48(Player* this, PlayState* play) { f32 sp3C; s16 sp3A; @@ -15394,7 +15393,7 @@ void func_8084F1B8(Player* this, PlayState* play) { } } -void func_8084F3DC(Player* this, PlayState* play) { +void Player_Action_49(Player* this, PlayState* play) { this->stateFlags2 |= PLAYER_STATE2_40; if (PlayerAnimation_Update(play, &this->skelAnime)) { @@ -15412,7 +15411,7 @@ void func_8084F3DC(Player* this, PlayState* play) { } } -void func_8084F4E8(Player* this, PlayState* play) { +void Player_Action_50(Player* this, PlayState* play) { s32 yStick = sPlayerControlInput->rel.stick_y; s32 xStick = sPlayerControlInput->rel.stick_x; f32 var_fv0; @@ -15562,7 +15561,7 @@ AnimSfxEntry D_8085D67C[] = { ANIMSFX(ANIMSFX_TYPE_SURFACE, 30, NA_SE_PL_WALK_LADDER, STOP), }; -void func_8084FC0C(Player* this, PlayState* play) { +void Player_Action_51(Player* this, PlayState* play) { s32 temp_v0; this->stateFlags2 |= PLAYER_STATE2_40; @@ -15667,7 +15666,7 @@ AnimSfxEntry D_8085D6E8[] = { ANIMSFX(ANIMSFX_TYPE_GENERAL, 136, NA_SE_PL_CALM_PAT, STOP), }; -void func_8084FE7C(Player* this, PlayState* play) { +void Player_Action_52(Player* this, PlayState* play) { EnHorse* rideActor = (EnHorse*)this->rideActor; this->stateFlags2 |= PLAYER_STATE2_40; @@ -15846,7 +15845,7 @@ AnimSfxEntry D_8085D708[] = { ANIMSFX(ANIMSFX_TYPE_GENERAL, 25, NA_SE_PL_SLIPDOWN, STOP), }; -void func_808505D0(Player* this, PlayState* play) { +void Player_Action_53(Player* this, PlayState* play) { this->stateFlags2 |= PLAYER_STATE2_40; func_80847E2C(this, 1.0f, 10.0f); @@ -15904,7 +15903,7 @@ s32 func_80850854(PlayState* play, Player* this) { return false; } -void func_808508C8(Player* this, PlayState* play) { +void Player_Action_54(Player* this, PlayState* play) { f32 sp34; s16 sp32; @@ -15959,7 +15958,7 @@ void func_808508C8(Player* this, PlayState* play) { } } -void func_80850B18(Player* this, PlayState* play) { +void Player_Action_55(Player* this, PlayState* play) { if (!func_80838A90(this, play)) { this->stateFlags2 |= PLAYER_STATE2_20; func_808477D0(play, this, NULL, this->linearVelocity); @@ -15993,7 +15992,7 @@ void func_80850D20(PlayState* play, Player* this) { func_8083F8A8(play, this, 12.0f, -1, 1.0f, 160, 20, true); } -void func_80850D68(Player* this, PlayState* play) { +void Player_Action_56(Player* this, PlayState* play) { f32 sp44; s16 sp42; s16 sp40; @@ -16124,7 +16123,7 @@ void func_80850D68(Player* this, PlayState* play) { func_80850BA8(this); } -void func_808513EC(Player* this, PlayState* play) { +void Player_Action_57(Player* this, PlayState* play) { f32 sp34; s16 sp32; s16 sp30; @@ -16157,7 +16156,7 @@ void func_808513EC(Player* this, PlayState* play) { } } -void func_80851588(Player* this, PlayState* play) { +void Player_Action_58(Player* this, PlayState* play) { f32 sp2C; s16 sp2A; @@ -16180,7 +16179,7 @@ void func_80851588(Player* this, PlayState* play) { } } -void func_808516B4(Player* this, PlayState* play) { +void Player_Action_59(Player* this, PlayState* play) { this->stateFlags2 |= PLAYER_STATE2_20; this->actor.gravity = 0.0f; @@ -16244,7 +16243,7 @@ void func_808516B4(Player* this, PlayState* play) { } } -void func_808519FC(Player* this, PlayState* play) { +void Player_Action_60(Player* this, PlayState* play) { this->stateFlags2 |= PLAYER_STATE2_20; func_8082F164(this, BTN_R); @@ -16268,7 +16267,7 @@ void func_808519FC(Player* this, PlayState* play) { func_8084748C(this, &this->linearVelocity, 0.0f, this->actor.shape.rot.y); } -void func_80851B58(Player* this, PlayState* play) { +void Player_Action_61(Player* this, PlayState* play) { func_808475B4(this); Math_StepToF(&this->linearVelocity, 0.0f, 0.4f); if (PlayerAnimation_Update(play, &this->skelAnime) && (this->linearVelocity < 10.0f)) { @@ -16276,7 +16275,7 @@ void func_80851B58(Player* this, PlayState* play) { } } -void func_80851BD4(Player* this, PlayState* play) { +void Player_Action_62(Player* this, PlayState* play) { func_808475B4(this); if (PlayerAnimation_Update(play, &this->skelAnime) && (this == GET_PLAYER(play))) { func_80840770(play, this); @@ -16492,7 +16491,7 @@ void func_808525C4(PlayState* play, Player* this) { } } -void func_8085269C(Player* this, PlayState* play) { +void Player_Action_63(Player* this, PlayState* play) { if ((this->unk_AA5 != PLAYER_UNKAA5_4) && ((PlayerAnimation_Update(play, &this->skelAnime) && (this->skelAnime.animation == D_8085D17C[this->transformation])) || ((this->skelAnime.mode == 0) && (this->unk_AE8 == 0)))) { @@ -16558,7 +16557,7 @@ void func_8085269C(Player* this, PlayState* play) { CutsceneManager_Stop(play->playerCsIds[PLAYER_CS_ID_ITEM_OCARINA]); this->actor.flags &= ~ACTOR_FLAG_20000000; - func_80831760(play, this, func_80855A7C, 0); + Player_SetAction_PreserveItemAction(play, this, Player_Action_88, 0); this->stateFlags1 |= PLAYER_STATE1_10000000 | PLAYER_STATE1_20000000; } else if (this->unk_AA5 == PLAYER_UNKAA5_4) { f32 temp_fa0 = this->skelAnime.jointTable[PLAYER_LIMB_ROOT - 1].x; @@ -16580,7 +16579,7 @@ void func_8085269C(Player* this, PlayState* play) { } } -void func_80852B28(Player* this, PlayState* play) { +void Player_Action_64(Player* this, PlayState* play) { func_80832F24(this); if (PlayerAnimation_Update(play, &this->skelAnime)) { @@ -16612,7 +16611,7 @@ AnimSfxEntry D_8085D74C[] = { ANIMSFX(ANIMSFX_TYPE_FLOOR_LAND, 120, NA_SE_NONE, STOP), }; -void func_80852C04(Player* this, PlayState* play) { +void Player_Action_65(Player* this, PlayState* play) { func_8083249C(this); if (PlayerAnimation_Update(play, &this->skelAnime)) { @@ -16709,7 +16708,7 @@ AnimSfxEntry D_8085D75C[] = { ANIMSFX(ANIMSFX_TYPE_FLOOR_LAND, 15, NA_SE_NONE, STOP), }; -void func_80852FD4(Player* this, PlayState* play) { +void Player_Action_66(Player* this, PlayState* play) { if (PlayerAnimation_Update(play, &this->skelAnime)) { if (this->unk_AE7 == 0) { if (DECR(this->unk_AE8) == 0) { @@ -16756,7 +16755,7 @@ u8 D_8085D790[] = { 1 | 2, // PLAYER_IA_BOTTLE_CHATEAU }; -void func_80853194(Player* this, PlayState* play) { +void Player_Action_67(Player* this, PlayState* play) { func_808323C0(this, play->playerCsIds[PLAYER_CS_ID_ITEM_BOTTLE]); if (PlayerAnimation_Update(play, &this->skelAnime)) { @@ -16854,7 +16853,7 @@ struct_8085D798 D_8085D798[] = { { ACTOR_EN_ELF, 6, ITEM_FAIRY, PLAYER_IA_BOTTLE_FAIRY, 0x5E }, }; -void func_808534C0(Player* this, PlayState* play) { +void Player_Action_68(Player* this, PlayState* play) { struct_8085D200* sp24 = &D_8085D200[this->unk_AE8]; func_80832F24(this); @@ -16928,7 +16927,7 @@ void func_808534C0(Player* this, PlayState* play) { Vec3f D_8085D7EC = { 0.0f, 0.0f, 5.0f }; -void func_80853754(Player* this, PlayState* play) { +void Player_Action_69(Player* this, PlayState* play) { func_808323C0(this, play->playerCsIds[PLAYER_CS_ID_ITEM_BOTTLE]); if (PlayerAnimation_Update(play, &this->skelAnime)) { @@ -16949,7 +16948,7 @@ void func_80853754(Player* this, PlayState* play) { } } -void func_80853850(Player* this, PlayState* play) { +void Player_Action_70(Player* this, PlayState* play) { static Vec3f D_8085D7F8 = { 10.0f, 268 * 0.1f, 30.0f }; static s8 D_8085D804[PLAYER_FORM_MAX] = { 0x2D, // PLAYER_FORM_FIERCE_DEITY @@ -17023,7 +17022,7 @@ AnimSfxEntry D_8085D840[] = { ANIMSFX(ANIMSFX_TYPE_GENERAL, 30, NA_SE_PL_PUT_OUT_ITEM, STOP), }; -void func_80853A5C(Player* this, PlayState* play) { +void Player_Action_71(Player* this, PlayState* play) { this->stateFlags2 |= PLAYER_STATE2_20; this->stateFlags3 |= PLAYER_STATE3_4000000; @@ -17079,7 +17078,7 @@ void func_80853A5C(Player* this, PlayState* play) { } } -void func_80853CC0(Player* this, PlayState* play) { +void Player_Action_72(Player* this, PlayState* play) { this->stateFlags2 |= (PLAYER_STATE2_20 | PLAYER_STATE2_40); if (PlayerAnimation_Update(play, &this->skelAnime)) { @@ -17096,7 +17095,7 @@ void func_80853CC0(Player* this, PlayState* play) { } } -void func_80853D68(Player* this, PlayState* play) { +void Player_Action_73(Player* this, PlayState* play) { CollisionPoly* floorPoly; f32 var_fv0; f32 temp_fv1; @@ -17158,23 +17157,23 @@ void func_80853D68(Player* this, PlayState* play) { void func_80859CE0(PlayState* play, Player* this, s32 arg2); -void func_80854010(Player* this, PlayState* play) { +void Player_Action_74(Player* this, PlayState* play) { if ((DECR(this->unk_AE8) == 0) && func_808387A0(play, this)) { func_80859CE0(play, this, 0); - Player_SetAction(play, this, func_8085B08C, 0); - func_8085B08C(this, play); + Player_SetAction(play, this, Player_Action_97, 0); + Player_Action_97(this, play); } } -void func_808540A0(Player* this, PlayState* play) { - Player_SetAction(play, this, func_80854010, 0); +void Player_Action_75(Player* this, PlayState* play) { + Player_SetAction(play, this, Player_Action_74, 0); this->unk_AE8 = 0x28; Actor_Spawn(&play->actorCtx, play, ACTOR_DEMO_KANKYO, 0.0f, 0.0f, 0.0f, 0, 0, 0, 0x10); } void Player_Cutscene_SetPosAndYawToStart(Player* this, CsCmdActorCue* cue); -void func_80854118(Player* this, PlayState* play) { +void Player_Action_76(Player* this, PlayState* play) { if (sPlayerYDistToFloor < 150.0f) { if (PlayerAnimation_Update(play, &this->skelAnime)) { if (this->unk_AE8 == 0) { @@ -17202,7 +17201,7 @@ void func_80854118(Player* this, PlayState* play) { } } -void func_8085421C(Player* this, PlayState* play) { +void Player_Action_77(Player* this, PlayState* play) { if (this->skelAnime.animation == NULL) { this->stateFlags2 |= PLAYER_STATE2_4000; } else { @@ -17238,11 +17237,11 @@ void func_8085421C(Player* this, PlayState* play) { } } -void func_8085437C(Player* this, PlayState* play) { +void Player_Action_78(Player* this, PlayState* play) { func_808365DC(this, play); } -void func_8085439C(Player* this, PlayState* play) { +void Player_Action_79(Player* this, PlayState* play) { this->actor.gravity = -1.0f; PlayerAnimation_Update(play, &this->skelAnime); @@ -17253,7 +17252,7 @@ void func_8085439C(Player* this, PlayState* play) { } } -void func_80854430(Player* this, PlayState* play) { +void Player_Action_80(Player* this, PlayState* play) { if (play->unk_1887C < 0) { play->unk_1887C = 0; func_80839ED0(this, play); @@ -17261,7 +17260,7 @@ void func_80854430(Player* this, PlayState* play) { if ((play->sceneId != SCENE_20SICHITAI) && CHECK_BTN_ALL(sPlayerControlInput->press.button, BTN_B)) { play->unk_1887C = 10; func_80847880(play, this); - Player_SetAction(play, this, func_80854430, 1); + Player_SetAction(play, this, Player_Action_80, 1); this->unk_AE7 = 1; } else { play->unk_1887C = 0; @@ -17283,16 +17282,16 @@ void func_80854430(Player* this, PlayState* play) { } else if (CHECK_BTN_ANY(sPlayerControlInput->press.button, BTN_CRIGHT | BTN_CLEFT | BTN_CDOWN | BTN_CUP | BTN_R | BTN_A)) { play->unk_1887C = -1; - func_80854614(this, play); - Player_SetAction(play, this, func_80854430, 0); + Player_Action_81(this, play); + Player_SetAction(play, this, Player_Action_80, 0); this->unk_AE7 = 0; } else { play->unk_1887C = 10; - func_80854614(this, play); + Player_Action_81(this, play); } } -void func_80854614(Player* this, PlayState* play) { +void Player_Action_81(Player* this, PlayState* play) { this->unk_AA5 = PLAYER_UNKAA5_3; func_8083868C(play, this); PlayerAnimation_Update(play, &this->skelAnime); @@ -17308,7 +17307,7 @@ void func_80854614(Player* this, PlayState* play) { } } -void func_808546D0(Player* this, PlayState* play) { +void Player_Action_82(Player* this, PlayState* play) { if (this->unk_AE7 >= 0) { if (this->unk_AE7 < 6) { this->unk_AE7++; @@ -17338,7 +17337,7 @@ void func_808546D0(Player* this, PlayState* play) { } } -void func_80854800(Player* this, PlayState* play) { +void Player_Action_83(Player* this, PlayState* play) { PlayerAnimation_Update(play, &this->skelAnime); func_808345A8(this); @@ -17353,7 +17352,7 @@ void func_80854800(Player* this, PlayState* play) { this->ageProperties->voiceSfxIdOffset + (NA_SE_VO_LI_TAKEN_AWAY - SFX_FLAG)); } -void func_808548B8(Player* this, PlayState* play) { +void Player_Action_84(Player* this, PlayState* play) { AttackAnimInfo* attackInfoEntry = &sMeleeAttackAnimInfo[this->meleeWeaponAnimation]; if (this->skelAnime.curFrame < (this->skelAnime.endFrame - 6.0f)) { @@ -17417,7 +17416,7 @@ void func_808548B8(Player* this, PlayState* play) { } this->skelAnime.moveFlags = 0; - Player_SetAction(play, this, func_80849FE0, 1); + Player_SetAction(play, this, Player_Action_4, 1); func_8082EC9C(play, this, anim); this->currentYaw = this->actor.shape.rot.y; this->skelAnime.moveFlags = moveFlags; @@ -17433,7 +17432,7 @@ void func_808548B8(Player* this, PlayState* play) { } } -void func_80854C70(Player* this, PlayState* play) { +void Player_Action_85(Player* this, PlayState* play) { PlayerAnimation_Update(play, &this->skelAnime); func_80832F24(this); @@ -17643,7 +17642,7 @@ struct_8085D910 D_8085D910[] = { { 9, 0x32, 0xA, 0xD }, }; -void func_808553F4(Player* this, PlayState* play) { +void Player_Action_86(Player* this, PlayState* play) { struct_8085D910* sp4C = D_8085D910; s32 sp48 = false; @@ -17726,7 +17725,7 @@ void func_808553F4(Player* this, PlayState* play) { func_808550D0(play, this, this->unk_B10[4], this->unk_B10[5], (this->transformation == PLAYER_FORM_HUMAN) ? 0 : 1); } -void func_80855818(Player* this, PlayState* play) { +void Player_Action_87(Player* this, PlayState* play) { Camera_ChangeMode(play->cameraPtrs[play->activeCamId], (this->prevMask == PLAYER_MASK_NONE) ? CAM_MODE_NORMAL : CAM_MODE_JUMP); @@ -17767,7 +17766,7 @@ void func_80855818(Player* this, PlayState* play) { func_808550D0(play, this, 0, this->unk_B10[5], (this->prevMask == PLAYER_MASK_NONE) ? 0 : 1); } -void func_80855A7C(Player* this, PlayState* play) { +void Player_Action_88(Player* this, PlayState* play) { if (this->unk_AE8++ > 90) { play->msgCtx.ocarinaMode = 4; func_8085B384(this, play); @@ -17777,7 +17776,7 @@ void func_80855A7C(Player* this, PlayState* play) { } // Giant's Mask -void func_80855AF4(Player* this, PlayState* play) { +void Player_Action_89(Player* this, PlayState* play) { this->stateFlags2 |= PLAYER_STATE2_40; func_80855218(play, this, NULL); @@ -17794,7 +17793,7 @@ void func_80855AF4(Player* this, PlayState* play) { } } -void func_80855B9C(Player* this, PlayState* play) { +void Player_Action_90(Player* this, PlayState* play) { this->stateFlags2 |= PLAYER_STATE2_40; PlayerAnimation_Update(play, &this->skelAnime); @@ -17811,7 +17810,7 @@ void func_80855B9C(Player* this, PlayState* play) { } } -void func_80855C28(Player* this, PlayState* play) { +void Player_Action_91(Player* this, PlayState* play) { s16 sp3E; s32 pad; PlayerAnimationHeader* sp34; @@ -17853,7 +17852,7 @@ void func_80855C28(Player* this, PlayState* play) { } } -void func_80855E08(Player* this, PlayState* play) { +void Player_Action_92(Player* this, PlayState* play) { this->stateFlags2 |= PLAYER_STATE2_20; if (PlayerAnimation_Update(play, &this->skelAnime)) { @@ -17931,7 +17930,7 @@ void func_80856110(PlayState* play, Player* this, f32 arg2, f32 arg3, f32 arg4, } // Deku Flower related -void func_808561B0(Player* this, PlayState* play) { +void Player_Action_93(Player* this, PlayState* play) { DynaPolyActor* dyna; s32 aux = 0xAE; f32 temp_fv0_2; @@ -18023,7 +18022,7 @@ void func_808561B0(Player* this, PlayState* play) { this->unk_ABC = 0.0f; this->actor.world.pos.y += temp_fv0_2 * this->actor.scale.y; func_80834DB8(this, &gPlayerAnim_pn_kakku, speed, play); - Player_SetAction(play, this, func_80856918, 1); + Player_SetAction(play, this, Player_Action_94, 1); this->boomerangActor = NULL; this->stateFlags3 |= PLAYER_STATE3_200; @@ -18119,7 +18118,7 @@ Vec3f D_8085D960 = { -30.0f, 50.0f, 0.0f }; Vec3f D_8085D96C = { 30.0f, 50.0f, 0.0f }; // Flying as Deku? -void func_80856918(Player* this, PlayState* play) { +void Player_Action_94(Player* this, PlayState* play) { if ((this->boomerangActor != NULL) && (this->boomerangActor->update == NULL)) { this->boomerangActor = NULL; } @@ -18310,7 +18309,7 @@ void func_80856918(Player* this, PlayState* play) { } // Deku spinning related -void func_808573A4(Player* this, PlayState* play) { +void Player_Action_95(Player* this, PlayState* play) { this->stateFlags2 |= PLAYER_STATE2_20 | PLAYER_STATE2_40; PlayerAnimation_Update(play, &this->skelAnime); @@ -18410,7 +18409,7 @@ void func_808577E0(Player* this) { s32 func_80857950(PlayState* play, Player* this) { if (((this->unk_B86[1] == 0) && !CHECK_BTN_ALL(sPlayerControlInput->cur.button, BTN_A)) || ((this->unk_AE7 == 3) && (this->actor.velocity.y < 0.0f))) { - Player_SetAction(play, this, func_80849FE0, 1); + Player_SetAction(play, this, Player_Action_4, 1); Math_Vec3f_Copy(&this->actor.world.pos, &this->actor.prevPos); PlayerAnimation_Change(play, &this->skelAnime, &gPlayerAnim_pg_maru_change, -2.0f / 3.0f, 7.0f, 0.0f, ANIMMODE_ONCE, 0.0f); @@ -18464,7 +18463,7 @@ void func_80857AEC(PlayState* play, Player* this) { } // Goron rolling related -void func_80857BE8(Player* this, PlayState* play) { +void Player_Action_96(Player* this, PlayState* play) { if (func_80833058(play, this, D_8085D050, 0)) { return; } @@ -18484,7 +18483,7 @@ void func_80857BE8(Player* this, PlayState* play) { s32 spD8; if (func_80840A30(play, this, &this->unk_B08, (this->doorType == PLAYER_DOORTYPE_STAIRCASE) ? 0.0f : 12.0f)) { - if (func_80857BE8 != this->actionFunc) { + if (Player_Action_96 != this->actionFunc) { return; } @@ -20050,7 +20049,7 @@ void Player_CsAction_48(PlayState* play, Player* this, CsCmdActorCue* cue) { } } -void func_8085B08C(Player* this, PlayState* play) { +void Player_Action_97(Player* this, PlayState* play) { if (this->csMode != this->prevCsMode) { D_80862B6C = this->skelAnime.moveFlags; func_8082E794(this); @@ -20074,7 +20073,7 @@ s32 Player_StartFishing(PlayState* play) { // Player_GrabPlayerImpl? Player_GrabPlayerNoChecks? void func_8085B170(PlayState* play, Player* this) { func_8082DE50(play, this); - Player_SetAction(play, this, func_80853CC0, 0); + Player_SetAction(play, this, Player_Action_72, 0); Player_AnimationPlayOnce(play, this, &gPlayerAnim_link_normal_re_dead_attack); this->stateFlags2 |= PLAYER_STATE2_80; func_8082DAD4(this); @@ -20100,7 +20099,7 @@ s32 func_8085B28C(PlayState* play, Player* this, PlayerCsMode csMode) { if (this != NULL) { if (csMode == PLAYER_CSMODE_NONE) { - return func_8084E034 == this->actionFunc; + return Player_Action_36 == this->actionFunc; } if ((this->actor.id == ACTOR_EN_TEST3) && (csMode < 0)) { @@ -20115,7 +20114,7 @@ s32 func_8085B28C(PlayState* play, Player* this, PlayerCsMode csMode) { if ((player->actor.id == ACTOR_EN_TEST3) || !Player_InBlockingCsMode(play, player)) { func_8082DE50(play, player); - Player_SetAction(play, player, func_8085B08C, 0); + Player_SetAction(play, player, Player_Action_97, 0); player->csMode = csMode; player->csActor = &this->actor; func_8082DAD4(player); @@ -20127,7 +20126,7 @@ s32 func_8085B28C(PlayState* play, Player* this, PlayerCsMode csMode) { } void func_8085B384(Player* this, PlayState* play) { - Player_SetAction(play, this, func_80849FE0, 1); + Player_SetAction(play, this, Player_Action_4, 1); func_8082E438(play, this, func_8082ED20(this)); this->currentYaw = this->actor.shape.rot.y; } @@ -20262,7 +20261,7 @@ PlayerItemAction func_8085B854(PlayState* play, Player* this, ItemId itemId) { this->itemAction = PLAYER_IA_NONE; this->actionFunc = NULL; - func_80831760(play, this, func_80853A5C, 0); + Player_SetAction_PreserveItemAction(play, this, Player_Action_71, 0); this->csId = CS_ID_GLOBAL_TALK; this->itemAction = itemAction; Player_AnimationPlayOnce(play, this, &gPlayerAnim_link_normal_give_other); diff --git a/tools/disasm/functions.txt b/tools/disasm/functions.txt index c897532615..220695b001 100644 --- a/tools/disasm/functions.txt +++ b/tools/disasm/functions.txt @@ -4313,16 +4313,16 @@ 0x8082F0E4:("Player_SetCylinderForAttack",), 0x8082F164:("func_8082F164",), 0x8082F1AC:("func_8082F1AC",), - 0x8082F43C:("func_8082F43C",), + 0x8082F43C:("Player_SetUpperAction",), 0x8082F470:("func_8082F470",), 0x8082F524:("Player_ItemToItemAction",), - 0x8082F594:("func_8082F594",), - 0x8082F5A4:("func_8082F5A4",), - 0x8082F5C0:("func_8082F5C0",), + 0x8082F594:("Player_InitItemAction_DoNothing",), + 0x8082F5A4:("Player_InitItemAction_DekuStick",), + 0x8082F5C0:("Player_InitItemAction_2",), 0x8082F5FC:("func_8082F5FC",), - 0x8082F62C:("Player_SpawnExplosive",), - 0x8082F7F4:("func_8082F7F4",), - 0x8082F8A0:("func_8082F8A0",), + 0x8082F62C:("Player_InitItemAction_SpawnExplosive",), + 0x8082F7F4:("Player_InitItemAction_SpawnHookshot",), + 0x8082F8A0:("Player_InitItemAction_5",), 0x8082F8BC:("func_8082F8BC",), 0x8082F938:("Player_OverrideBlureColors",), 0x8082FA5C:("func_8082FA5C",), @@ -4360,8 +4360,8 @@ 0x808313F0:("func_808313F0",), 0x80831454:("func_80831454",), 0x80831494:("Player_SetAction",), - 0x8083172C:("func_8083172C",), - 0x80831760:("func_80831760",), + 0x8083172C:("Player_SetAction_PreserveMoveFlags",), + 0x80831760:("Player_SetAction_PreserveItemAction",), 0x808317C4:("func_808317C4",), 0x80831814:("func_80831814",), 0x808318C0:("func_808318C0",), @@ -4644,94 +4644,94 @@ 0x808484F0:("func_808484F0",), 0x80848570:("func_80848570",), 0x80848640:("func_80848640",), - 0x80848780:("func_80848780",), - 0x808487B8:("func_808487B8",), - 0x80848808:("func_80848808",), - 0x8084894C:("func_8084894C",), - 0x80848A0C:("func_80848A0C",), - 0x80848AB0:("func_80848AB0",), - 0x80848B6C:("func_80848B6C",), - 0x80848BF4:("func_80848BF4",), - 0x80848E4C:("func_80848E4C",), - 0x80849054:("func_80849054",), - 0x808490B4:("func_808490B4",), - 0x808491B4:("func_808491B4",), - 0x8084923C:("func_8084923C",), - 0x808492C4:("func_808492C4",), - 0x8084933C:("func_8084933C",), - 0x80849570:("func_80849570",), - 0x80849620:("func_80849620",), - 0x808496AC:("func_808496AC",), - 0x808497A0:("func_808497A0",), - 0x80849A9C:("func_80849A9C",), - 0x80849DD0:("func_80849DD0",), - 0x80849FE0:("func_80849FE0",), - 0x8084A26C:("func_8084A26C",), - 0x8084A5C0:("func_8084A5C0",), - 0x8084A794:("func_8084A794",), - 0x8084A884:("func_8084A884",), - 0x8084A8E8:("func_8084A8E8",), - 0x8084AB4C:("func_8084AB4C",), - 0x8084AC84:("func_8084AC84",), - 0x8084AEEC:("func_8084AEEC",), - 0x8084AF9C:("func_8084AF9C",), - 0x8084B0EC:("func_8084B0EC",), - 0x8084B288:("func_8084B288",), - 0x8084B3B8:("func_8084B3B8",), - 0x8084B4A8:("func_8084B4A8",), - 0x8084B5C0:("func_8084B5C0",), - 0x8084BAA4:("func_8084BAA4",), - 0x8084BBF0:("func_8084BBF0",), - 0x8084BC64:("func_8084BC64",), - 0x8084BE40:("func_8084BE40",), - 0x8084BF28:("func_8084BF28",), - 0x8084BFDC:("func_8084BFDC",), + 0x80848780:("Player_UpperAction_0",), + 0x808487B8:("Player_UpperAction_1",), + 0x80848808:("Player_UpperAction_2",), + 0x8084894C:("Player_UpperAction_3",), + 0x80848A0C:("Player_UpperAction_4",), + 0x80848AB0:("Player_UpperAction_5",), + 0x80848B6C:("Player_UpperAction_6",), + 0x80848BF4:("Player_UpperAction_7",), + 0x80848E4C:("Player_UpperAction_8",), + 0x80849054:("Player_UpperAction_9",), + 0x808490B4:("Player_UpperAction_10",), + 0x808491B4:("Player_UpperAction_11",), + 0x8084923C:("Player_UpperAction_12",), + 0x808492C4:("Player_UpperAction_13",), + 0x8084933C:("Player_UpperAction_14",), + 0x80849570:("Player_UpperAction_15",), + 0x80849620:("Player_UpperAction_16",), + 0x808496AC:("Player_Action_0",), + 0x808497A0:("Player_Action_1",), + 0x80849A9C:("Player_Action_2",), + 0x80849DD0:("Player_Action_3",), + 0x80849FE0:("Player_Action_4",), + 0x8084A26C:("Player_Action_5",), + 0x8084A5C0:("Player_Action_6",), + 0x8084A794:("Player_Action_7",), + 0x8084A884:("Player_Action_8",), + 0x8084A8E8:("Player_Action_9",), + 0x8084AB4C:("Player_Action_10",), + 0x8084AC84:("Player_Action_11",), + 0x8084AEEC:("Player_Action_12",), + 0x8084AF9C:("Player_Action_13",), + 0x8084B0EC:("Player_Action_14",), + 0x8084B288:("Player_Action_15",), + 0x8084B3B8:("Player_Action_16",), + 0x8084B4A8:("Player_Action_17",), + 0x8084B5C0:("Player_Action_18",), + 0x8084BAA4:("Player_Action_19",), + 0x8084BBF0:("Player_Action_20",), + 0x8084BC64:("Player_Action_21",), + 0x8084BE40:("Player_Action_22",), + 0x8084BF28:("Player_Action_23",), + 0x8084BFDC:("Player_Action_24",), 0x8084C124:("func_8084C124",), - 0x8084C16C:("func_8084C16C",), - 0x8084C6EC:("func_8084C6EC",), - 0x8084C94C:("func_8084C94C",), - 0x8084CA24:("func_8084CA24",), - 0x8084CB58:("func_8084CB58",), - 0x8084CCEC:("func_8084CCEC",), - 0x8084CE84:("func_8084CE84",), - 0x8084D18C:("func_8084D18C",), - 0x8084D4EC:("func_8084D4EC",), - 0x8084D770:("func_8084D770",), - 0x8084D820:("func_8084D820",), - 0x8084E034:("func_8084E034",), - 0x8084E25C:("func_8084E25C",), - 0x8084E334:("func_8084E334",), - 0x8084E434:("func_8084E434",), - 0x8084E4E4:("func_8084E4E4",), - 0x8084E58C:("func_8084E58C",), - 0x8084E65C:("func_8084E65C",), - 0x8084E724:("func_8084E724",), - 0x8084E980:("func_8084E980",), - 0x8084ED9C:("func_8084ED9C",), - 0x8084EE50:("func_8084EE50",), - 0x8084EF9C:("func_8084EF9C",), - 0x8084F1B8:("func_8084F1B8",), - 0x8084F3DC:("func_8084F3DC",), - 0x8084F4E8:("func_8084F4E8",), - 0x8084FC0C:("func_8084FC0C",), + 0x8084C16C:("Player_Action_25",), + 0x8084C6EC:("Player_Action_26",), + 0x8084C94C:("Player_Action_27",), + 0x8084CA24:("Player_Action_28",), + 0x8084CB58:("Player_Action_29",), + 0x8084CCEC:("Player_Action_30",), + 0x8084CE84:("Player_Action_31",), + 0x8084D18C:("Player_Action_32",), + 0x8084D4EC:("Player_Action_33",), + 0x8084D770:("Player_Action_34",), + 0x8084D820:("Player_Action_35",), + 0x8084E034:("Player_Action_36",), + 0x8084E25C:("Player_Action_37",), + 0x8084E334:("Player_Action_38",), + 0x8084E434:("Player_Action_39",), + 0x8084E4E4:("Player_Action_40",), + 0x8084E58C:("Player_Action_41",), + 0x8084E65C:("Player_Action_42",), + 0x8084E724:("Player_Action_43",), + 0x8084E980:("Player_Action_44",), + 0x8084ED9C:("Player_Action_45",), + 0x8084EE50:("Player_Action_46",), + 0x8084EF9C:("Player_Action_47",), + 0x8084F1B8:("Player_Action_48",), + 0x8084F3DC:("Player_Action_49",), + 0x8084F4E8:("Player_Action_50",), + 0x8084FC0C:("Player_Action_51",), 0x8084FD7C:("func_8084FD7C",), 0x8084FE48:("func_8084FE48",), - 0x8084FE7C:("func_8084FE7C",), - 0x808505D0:("func_808505D0",), + 0x8084FE7C:("Player_Action_52",), + 0x808505D0:("Player_Action_53",), 0x80850734:("func_80850734",), 0x80850854:("func_80850854",), - 0x808508C8:("func_808508C8",), - 0x80850B18:("func_80850B18",), + 0x808508C8:("Player_Action_54",), + 0x80850B18:("Player_Action_55",), 0x80850BA8:("func_80850BA8",), 0x80850BF8:("func_80850BF8",), 0x80850D20:("func_80850D20",), - 0x80850D68:("func_80850D68",), - 0x808513EC:("func_808513EC",), - 0x80851588:("func_80851588",), - 0x808516B4:("func_808516B4",), - 0x808519FC:("func_808519FC",), - 0x80851B58:("func_80851B58",), - 0x80851BD4:("func_80851BD4",), + 0x80850D68:("Player_Action_56",), + 0x808513EC:("Player_Action_57",), + 0x80851588:("Player_Action_58",), + 0x808516B4:("Player_Action_59",), + 0x808519FC:("Player_Action_60",), + 0x80851B58:("Player_Action_61",), + 0x80851BD4:("Player_Action_62",), 0x80851C40:("func_80851C40",), 0x80851D30:("func_80851D30",), 0x80851EAC:("func_80851EAC",), @@ -4741,58 +4741,58 @@ 0x80852290:("func_80852290",), 0x8085255C:("func_8085255C",), 0x808525C4:("func_808525C4",), - 0x8085269C:("func_8085269C",), - 0x80852B28:("func_80852B28",), - 0x80852C04:("func_80852C04",), - 0x80852FD4:("func_80852FD4",), + 0x8085269C:("Player_Action_63",), + 0x80852B28:("Player_Action_64",), + 0x80852C04:("Player_Action_65",), + 0x80852FD4:("Player_Action_66",), 0x808530E0:("func_808530E0",), - 0x80853194:("func_80853194",), - 0x808534C0:("func_808534C0",), - 0x80853754:("func_80853754",), - 0x80853850:("func_80853850",), - 0x80853A5C:("func_80853A5C",), - 0x80853CC0:("func_80853CC0",), - 0x80853D68:("func_80853D68",), - 0x80854010:("func_80854010",), - 0x808540A0:("func_808540A0",), - 0x80854118:("func_80854118",), - 0x8085421C:("func_8085421C",), - 0x8085437C:("func_8085437C",), - 0x8085439C:("func_8085439C",), - 0x80854430:("func_80854430",), - 0x80854614:("func_80854614",), - 0x808546D0:("func_808546D0",), - 0x80854800:("func_80854800",), - 0x808548B8:("func_808548B8",), - 0x80854C70:("func_80854C70",), + 0x80853194:("Player_Action_67",), + 0x808534C0:("Player_Action_68",), + 0x80853754:("Player_Action_69",), + 0x80853850:("Player_Action_70",), + 0x80853A5C:("Player_Action_71",), + 0x80853CC0:("Player_Action_72",), + 0x80853D68:("Player_Action_73",), + 0x80854010:("Player_Action_74",), + 0x808540A0:("Player_Action_75",), + 0x80854118:("Player_Action_76",), + 0x8085421C:("Player_Action_77",), + 0x8085437C:("Player_Action_78",), + 0x8085439C:("Player_Action_79",), + 0x80854430:("Player_Action_80",), + 0x80854614:("Player_Action_81",), + 0x808546D0:("Player_Action_82",), + 0x80854800:("Player_Action_83",), + 0x808548B8:("Player_Action_84",), + 0x80854C70:("Player_Action_85",), 0x80854CD0:("func_80854CD0",), 0x80854EFC:("func_80854EFC",), 0x808550D0:("func_808550D0",), 0x80855218:("func_80855218",), - 0x808553F4:("func_808553F4",), - 0x80855818:("func_80855818",), - 0x80855A7C:("func_80855A7C",), - 0x80855AF4:("func_80855AF4",), - 0x80855B9C:("func_80855B9C",), - 0x80855C28:("func_80855C28",), - 0x80855E08:("func_80855E08",), + 0x808553F4:("Player_Action_86",), + 0x80855818:("Player_Action_87",), + 0x80855A7C:("Player_Action_88",), + 0x80855AF4:("Player_Action_89",), + 0x80855B9C:("Player_Action_90",), + 0x80855C28:("Player_Action_91",), + 0x80855E08:("Player_Action_92",), 0x80855F9C:("func_80855F9C",), 0x80856000:("func_80856000",), 0x80856074:("func_80856074",), 0x80856110:("func_80856110",), - 0x808561B0:("func_808561B0",), + 0x808561B0:("Player_Action_93",), 0x808566C0:("func_808566C0",), 0x8085687C:("func_8085687C",), 0x80856888:("func_80856888",), - 0x80856918:("func_80856918",), - 0x808573A4:("func_808573A4",), + 0x80856918:("Player_Action_94",), + 0x808573A4:("Player_Action_95",), 0x80857640:("func_80857640",), 0x808576BC:("func_808576BC",), 0x808577E0:("func_808577E0",), 0x80857950:("func_80857950",), 0x80857A44:("func_80857A44",), 0x80857AEC:("func_80857AEC",), - 0x80857BE8:("func_80857BE8",), + 0x80857BE8:("Player_Action_96",), 0x80858C84:("func_80858C84",), 0x80858CC8:("func_80858CC8",), 0x80858D48:("func_80858D48",), @@ -4874,7 +4874,7 @@ 0x8085AC9C:("func_8085AC9C",), 0x8085AD5C:("func_8085AD5C",), 0x8085ADA0:("Player_CsAction_48",), - 0x8085B08C:("func_8085B08C",), + 0x8085B08C:("Player_Action_97",), 0x8085B134:("Player_StartFishing",), 0x8085B170:("func_8085B170",), 0x8085B1F0:("Player_GrabPlayer",), diff --git a/tools/disasm/variables.txt b/tools/disasm/variables.txt index 4faf91aea8..6c743d181b 100644 --- a/tools/disasm/variables.txt +++ b/tools/disasm/variables.txt @@ -4947,7 +4947,7 @@ 0x8085C98C:("sZoraBarrierEnvLighting","UNK_TYPE1","",0x1), 0x8085C99C:("sItemActionParams","UNK_TYPE1","",0x1), 0x8085C9F0:("D_8085C9F0","UNK_PTR","",0x4), - 0x8085CB3C:("D_8085CB3C","UNK_PTR","",0x4), + 0x8085CB3C:("sPlayerInitItemActionFuncs","UNK_PTR","",0x4), 0x8085CC88:("D_8085CC88","UNK_TYPE1","",0x1), 0x8085CD00:("D_8085CD00","s8","[36]",0x24), 0x8085CD24:("sPlayerExplosiveInfo","UNK_TYPE1","",0x1),