diff --git a/soh/include/functions.h b/soh/include/functions.h index 1d9895523..2420d2a6a 100644 --- a/soh/include/functions.h +++ b/soh/include/functions.h @@ -472,7 +472,7 @@ void func_8002F6D4(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, void func_8002F71C(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4); void func_8002F758(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4, u32 arg5); void func_8002F7A0(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4); -void func_8002F7DC(Actor* actor, u16 sfxId); +void Player_PlaySfx(Actor* actor, u16 sfxId); void Audio_PlayActorSound2(Actor* actor, u16 sfxId); void func_8002F850(PlayState* play, Actor* actor); void func_8002F8F0(Actor* actor, u16 sfxId); @@ -1132,8 +1132,8 @@ s32 Player_HoldsHookshot(Player* player); s32 Player_HoldsBow(Player* player); s32 Player_HoldsSlingshot(Player* player); s32 func_8008F128(Player* player); -s32 Player_ActionToSword(s32 actionParam); -s32 Player_GetSwordHeld(Player* player); +s32 Player_ActionToMeleeWeapon(s32 actionParam); +s32 Player_GetMeleeWeaponHeld(Player* player); s32 Player_HoldsTwoHandedWeapon(Player* player); s32 Player_HoldsBrokenKnife(Player* player); s32 Player_ActionToBottle(Player* player, s32 actionParam); @@ -1141,19 +1141,19 @@ s32 Player_GetBottleHeld(Player* player); s32 Player_ActionToExplosive(Player* player, s32 actionParam); s32 Player_GetExplosiveHeld(Player* player); s32 func_8008F2BC(Player* player, s32 actionParam); -s32 func_8008F2F8(PlayState* play); -void func_8008F470(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dListCount, s32 lod, s32 tunic, +s32 Player_GetEnvironmentalHazard(PlayState* play); +void Player_DrawImpl(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dListCount, s32 lod, s32 tunic, s32 boots, s32 face, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, void* this); -s32 func_8008FCC8(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* data); -s32 func_80090014(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* data); -s32 func_800902F0(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* data); -s32 func_80090440(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* data); +s32 Player_OverrideLimbDrawGameplayCommon(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* data); +s32 Player_OverrideLimbDrawGameplayDefault(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* data); +s32 Player_OverrideLimbDrawGameplayFirstPerson(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* data); +s32 Player_OverrideLimbDrawGameplayCrawling(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* data); u8 func_80090480(PlayState* play, ColliderQuad* collider, WeaponInfo* weaponDim, Vec3f* newTip, Vec3f* newBase); void Player_DrawGetItem(PlayState* play, Player* player); -void func_80090D20(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* data); +void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* data); u32 func_80091738(PlayState* play, u8* segment, SkelAnime* skelAnime); -void func_8009214C(PlayState* play, u8* segment, SkelAnime* skelAnime, Vec3f* pos, Vec3s* rot, f32 scale, +void Player_DrawPause(PlayState* play, u8* segment, SkelAnime* skelAnime, Vec3f* pos, Vec3s* rot, f32 scale, s32 sword, s32 tunic, s32 shield, s32 boots); void PreNMI_Init(GameState* thisx); Vec3f* Quake_AddVec(Vec3f* dst, Vec3f* arg1, VecSph* arg2); diff --git a/soh/include/variables.h b/soh/include/variables.h index 853cb3a17..8fd457d18 100644 --- a/soh/include/variables.h +++ b/soh/include/variables.h @@ -83,10 +83,10 @@ extern "C" extern s16 gSpoilingItemReverts[3]; extern FlexSkeletonHeader* gPlayerSkelHeaders[2]; extern u8 gPlayerModelTypes[][5]; - extern Gfx* D_80125DE8[]; - extern Gfx* D_80125E08[]; - extern Gfx* D_80125E18[]; - extern Gfx* D_80125EF8[]; + extern Gfx* gPlayerLeftHandBgsDLs[]; + extern Gfx* gPlayerLeftHandOpenDLs[]; + extern Gfx* gPlayerLeftHandClosedDLs[]; + extern Gfx* gPlayerLeftHandBoomerangDLs[]; extern Gfx gCullBackDList[]; extern Gfx gCullFrontDList[]; extern Gfx gEmptyDL[]; diff --git a/soh/include/z64player.h b/soh/include/z64player.h index 4aaf57586..99445f1d7 100644 --- a/soh/include/z64player.h +++ b/soh/include/z64player.h @@ -13,7 +13,7 @@ typedef enum { /* 0 */ PLAYER_SWORD_NONE, /* 1 */ PLAYER_SWORD_KOKIRI, /* 2 */ PLAYER_SWORD_MASTER, - /* 3 */ PLAYER_SWORD_BGS, + /* 3 */ PLAYER_SWORD_BIGGORON, /* 4 */ PLAYER_SWORD_MAX } PlayerSword; @@ -70,8 +70,8 @@ typedef enum { /* 0x02 */ PLAYER_IA_FISHING_POLE, /* 0x03 */ PLAYER_IA_SWORD_MASTER, /* 0x04 */ PLAYER_IA_SWORD_KOKIRI, - /* 0x05 */ PLAYER_IA_SWORD_BGS, - /* 0x06 */ PLAYER_IA_STICK, + /* 0x05 */ PLAYER_IA_SWORD_BIGGORON, + /* 0x06 */ PLAYER_IA_DEKU_STICK, /* 0x07 */ PLAYER_IA_HAMMER, /* 0x08 */ PLAYER_IA_BOW, /* 0x09 */ PLAYER_IA_BOW_FIRE, @@ -92,33 +92,33 @@ typedef enum { /* 0x18 */ PLAYER_IA_FARORES_WIND, /* 0x19 */ PLAYER_IA_NAYRUS_LOVE, /* 0x1A */ PLAYER_IA_DINS_FIRE, - /* 0x1B */ PLAYER_IA_NUT, + /* 0x1B */ PLAYER_IA_DEKU_NUT, /* 0x1C */ PLAYER_IA_OCARINA_FAIRY, - /* 0x1D */ PLAYER_IA_OCARINA_TIME, + /* 0x1D */ PLAYER_IA_OCARINA_OF_TIME, /* 0x1E */ PLAYER_IA_BOTTLE, /* 0x1F */ PLAYER_IA_BOTTLE_FISH, /* 0x20 */ PLAYER_IA_BOTTLE_FIRE, /* 0x21 */ PLAYER_IA_BOTTLE_BUG, /* 0x22 */ PLAYER_IA_BOTTLE_POE, /* 0x23 */ PLAYER_IA_BOTTLE_BIG_POE, - /* 0x24 */ PLAYER_IA_BOTTLE_LETTER, + /* 0x24 */ PLAYER_IA_BOTTLE_RUTOS_LETTER, /* 0x25 */ PLAYER_IA_BOTTLE_POTION_RED, /* 0x26 */ PLAYER_IA_BOTTLE_POTION_BLUE, /* 0x27 */ PLAYER_IA_BOTTLE_POTION_GREEN, - /* 0x28 */ PLAYER_IA_BOTTLE_MILK, + /* 0x28 */ PLAYER_IA_BOTTLE_MILK_FULL, /* 0x29 */ PLAYER_IA_BOTTLE_MILK_HALF, /* 0x2A */ PLAYER_IA_BOTTLE_FAIRY, - /* 0x2B */ PLAYER_IA_LETTER_ZELDA, + /* 0x2B */ PLAYER_IA_ZELDAS_LETTER, /* 0x2C */ PLAYER_IA_WEIRD_EGG, /* 0x2D */ PLAYER_IA_CHICKEN, - /* 0x2E */ PLAYER_IA_BEAN, + /* 0x2E */ PLAYER_IA_MAGIC_BEAN, /* 0x2F */ PLAYER_IA_POCKET_EGG, /* 0x30 */ PLAYER_IA_POCKET_CUCCO, /* 0x31 */ PLAYER_IA_COJIRO, /* 0x32 */ PLAYER_IA_ODD_MUSHROOM, /* 0x33 */ PLAYER_IA_ODD_POTION, - /* 0x34 */ PLAYER_IA_SAW, - /* 0x35 */ PLAYER_IA_SWORD_BROKEN, + /* 0x34 */ PLAYER_IA_POACHERS_SAW, + /* 0x35 */ PLAYER_IA_BROKEN_GORONS_SWORD, /* 0x36 */ PLAYER_IA_PRESCRIPTION, /* 0x37 */ PLAYER_IA_FROG, /* 0x38 */ PLAYER_IA_EYEDROPS, @@ -126,12 +126,12 @@ typedef enum { /* 0x3A */ PLAYER_IA_MASK_KEATON, /* 0x3B */ PLAYER_IA_MASK_SKULL, /* 0x3C */ PLAYER_IA_MASK_SPOOKY, - /* 0x3D */ PLAYER_IA_MASK_BUNNY, + /* 0x3D */ PLAYER_IA_MASK_BUNNY_HOOD, /* 0x3E */ PLAYER_IA_MASK_GORON, /* 0x3F */ PLAYER_IA_MASK_ZORA, /* 0x40 */ PLAYER_IA_MASK_GERUDO, /* 0x41 */ PLAYER_IA_MASK_TRUTH, - /* 0x42 */ PLAYER_IA_LENS, + /* 0x42 */ PLAYER_IA_LENS_OF_TRUTH, // Upstream TODO: Document why these entries were added /* 0x43 */ PLAYER_IA_SHIELD_DEKU, /* 0x44 */ PLAYER_IA_SHIELD_HYLIAN, @@ -303,51 +303,51 @@ typedef enum { } PlayerAnimType; typedef enum { - /* 0x00 */ PLAYER_ANIMGROUP_0, - /* 0x01 */ PLAYER_ANIMGROUP_1, - /* 0x02 */ PLAYER_ANIMGROUP_2, - /* 0x03 */ PLAYER_ANIMGROUP_3, - /* 0x04 */ PLAYER_ANIMGROUP_4, - /* 0x05 */ PLAYER_ANIMGROUP_5, - /* 0x06 */ PLAYER_ANIMGROUP_6, - /* 0x07 */ PLAYER_ANIMGROUP_7, - /* 0x08 */ PLAYER_ANIMGROUP_8, - /* 0x09 */ PLAYER_ANIMGROUP_9, - /* 0x0A */ PLAYER_ANIMGROUP_10, - /* 0x0B */ PLAYER_ANIMGROUP_11, - /* 0x0C */ PLAYER_ANIMGROUP_12, - /* 0x0D */ PLAYER_ANIMGROUP_13, - /* 0x0E */ PLAYER_ANIMGROUP_14, - /* 0x0F */ PLAYER_ANIMGROUP_15, - /* 0x10 */ PLAYER_ANIMGROUP_16, - /* 0x11 */ PLAYER_ANIMGROUP_17, - /* 0x12 */ PLAYER_ANIMGROUP_18, - /* 0x13 */ PLAYER_ANIMGROUP_19, - /* 0x14 */ PLAYER_ANIMGROUP_20, - /* 0x15 */ PLAYER_ANIMGROUP_21, - /* 0x16 */ PLAYER_ANIMGROUP_22, - /* 0x17 */ PLAYER_ANIMGROUP_23, - /* 0x18 */ PLAYER_ANIMGROUP_24, - /* 0x19 */ PLAYER_ANIMGROUP_25, - /* 0x1A */ PLAYER_ANIMGROUP_26, - /* 0x1B */ PLAYER_ANIMGROUP_27, - /* 0x1C */ PLAYER_ANIMGROUP_28, - /* 0x1D */ PLAYER_ANIMGROUP_29, - /* 0x1E */ PLAYER_ANIMGROUP_30, - /* 0x1F */ PLAYER_ANIMGROUP_31, - /* 0x20 */ PLAYER_ANIMGROUP_32, - /* 0x21 */ PLAYER_ANIMGROUP_33, - /* 0x22 */ PLAYER_ANIMGROUP_34, - /* 0x23 */ PLAYER_ANIMGROUP_35, - /* 0x24 */ PLAYER_ANIMGROUP_36, - /* 0x25 */ PLAYER_ANIMGROUP_37, - /* 0x26 */ PLAYER_ANIMGROUP_38, - /* 0x27 */ PLAYER_ANIMGROUP_39, - /* 0x28 */ PLAYER_ANIMGROUP_40, - /* 0x29 */ PLAYER_ANIMGROUP_41, - /* 0x2A */ PLAYER_ANIMGROUP_42, - /* 0x2B */ PLAYER_ANIMGROUP_43, - /* 0x2C */ PLAYER_ANIMGROUP_44, + /* 0x00 */ PLAYER_ANIMGROUP_wait, + /* 0x01 */ PLAYER_ANIMGROUP_walk, + /* 0x02 */ PLAYER_ANIMGROUP_run, + /* 0x03 */ PLAYER_ANIMGROUP_damage_run, + /* 0x04 */ PLAYER_ANIMGROUP_heavy_run, + /* 0x05 */ PLAYER_ANIMGROUP_waitL, + /* 0x06 */ PLAYER_ANIMGROUP_waitR, + /* 0x07 */ PLAYER_ANIMGROUP_wait2waitR, + /* 0x08 */ PLAYER_ANIMGROUP_normal2fighter, + /* 0x09 */ PLAYER_ANIMGROUP_doorA_free, + /* 0x0A */ PLAYER_ANIMGROUP_doorA, + /* 0x0B */ PLAYER_ANIMGROUP_doorB_free, + /* 0x0C */ PLAYER_ANIMGROUP_doorB, + /* 0x0D */ PLAYER_ANIMGROUP_carryB, + /* 0x0E */ PLAYER_ANIMGROUP_landing, + /* 0x0F */ PLAYER_ANIMGROUP_short_landing, + /* 0x10 */ PLAYER_ANIMGROUP_landing_roll, + /* 0x11 */ PLAYER_ANIMGROUP_hip_down, + /* 0x12 */ PLAYER_ANIMGROUP_walk_endL, + /* 0x13 */ PLAYER_ANIMGROUP_walk_endR, + /* 0x14 */ PLAYER_ANIMGROUP_defense, + /* 0x15 */ PLAYER_ANIMGROUP_defense_wait, + /* 0x16 */ PLAYER_ANIMGROUP_defense_end, + /* 0x17 */ PLAYER_ANIMGROUP_side_walk, + /* 0x18 */ PLAYER_ANIMGROUP_side_walkL, + /* 0x19 */ PLAYER_ANIMGROUP_side_walkR, + /* 0x1A */ PLAYER_ANIMGROUP_45_turn, + /* 0x1B */ PLAYER_ANIMGROUP_waitL2wait, + /* 0x1C */ PLAYER_ANIMGROUP_waitR2wait, + /* 0x1D */ PLAYER_ANIMGROUP_throw, + /* 0x1E */ PLAYER_ANIMGROUP_put, + /* 0x1F */ PLAYER_ANIMGROUP_back_walk, + /* 0x20 */ PLAYER_ANIMGROUP_check, + /* 0x21 */ PLAYER_ANIMGROUP_check_wait, + /* 0x22 */ PLAYER_ANIMGROUP_check_end, + /* 0x23 */ PLAYER_ANIMGROUP_pull_start, + /* 0x24 */ PLAYER_ANIMGROUP_pulling, + /* 0x25 */ PLAYER_ANIMGROUP_pull_end, + /* 0x26 */ PLAYER_ANIMGROUP_fall_up, + /* 0x27 */ PLAYER_ANIMGROUP_jump_climb_hold, + /* 0x28 */ PLAYER_ANIMGROUP_jump_climb_wait, + /* 0x29 */ PLAYER_ANIMGROUP_jump_climb_up, + /* 0x2A */ PLAYER_ANIMGROUP_down_slope_slip_end, + /* 0x2B */ PLAYER_ANIMGROUP_up_slope_slip_end, + /* 0x2C */ PLAYER_ANIMGROUP_nwait, /* 0x2D */ PLAYER_ANIMGROUP_MAX } PlayerAnimGroup; @@ -608,7 +608,7 @@ typedef struct Player { /* 0x083E */ s16 targetYaw; /* 0x0840 */ u16 unk_840; /* 0x0842 */ s8 meleeWeaponAnimation; - /* 0x0843 */ s8 swordState; // Upstream TODO: meleeWeaponState + /* 0x0843 */ s8 meleeWeaponState; /* 0x0844 */ s8 unk_844; /* 0x0845 */ u8 unk_845; /* 0x0846 */ u8 unk_846; diff --git a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp index d88771353..0f9c56669 100644 --- a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp +++ b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp @@ -1620,7 +1620,7 @@ void DrawPlayerTab() { gSaveContext.equips.buttonItems[0] = ITEM_SWORD_KNIFE; } - Inventory_ChangeEquipment(EQUIP_SWORD, PLAYER_SWORD_BGS); + Inventory_ChangeEquipment(EQUIP_SWORD, PLAYER_SWORD_BIGGORON); } if (ImGui::Selectable("Fishing Pole")) { player->currentSwordItemId = ITEM_FISHING_POLE; @@ -1725,7 +1725,7 @@ void DrawPlayerTab() { } DrawGroupWithBorder([&]() { ImGui::Text("Sword"); - ImGui::Text(" %d", player->swordState); + ImGui::Text(" %d", player->meleeWeaponState); }); } else { diff --git a/soh/soh/Enhancements/mods.cpp b/soh/soh/Enhancements/mods.cpp index 567853a48..2c647d80d 100644 --- a/soh/soh/Enhancements/mods.cpp +++ b/soh/soh/Enhancements/mods.cpp @@ -140,7 +140,7 @@ void RegisterInfiniteISG() { if (CVarGetInteger("gEzISG", 0) != 0) { Player* player = GET_PLAYER(gPlayState); - player->swordState = 1; + player->meleeWeaponState = 1; } }); } diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c index a8f258c1b..750419966 100644 --- a/soh/src/code/z_actor.c +++ b/soh/src/code/z_actor.c @@ -2174,7 +2174,7 @@ void func_8002F7A0(PlayState* play, Actor* actor, f32 arg2, s16 arg3, f32 arg4) func_8002F758(play, actor, arg2, arg3, arg4, 0); } -void func_8002F7DC(Actor* actor, u16 sfxId) { +void Player_PlaySfx(Actor* actor, u16 sfxId) { if (actor->id != ACTOR_PLAYER || sfxId < NA_SE_VO_LI_SWORD_N || sfxId > NA_SE_VO_LI_ELECTRIC_SHOCK_LV_KID) { Audio_PlaySoundGeneral(sfxId, &actor->projectedPos, 4, &D_801333E0 , &D_801333E0, &D_801333E8); } else { @@ -4514,7 +4514,7 @@ s32 func_800354B4(PlayState* play, Actor* actor, f32 range, s16 arg3, s16 arg4, var1 = (s16)(actor->yawTowardsPlayer + 0x8000) - player->actor.shape.rot.y; var2 = actor->yawTowardsPlayer - arg5; - if ((actor->xzDistToPlayer <= range) && (player->swordState != 0) && (arg4 >= ABS(var1)) && (arg3 >= ABS(var2))) { + if ((actor->xzDistToPlayer <= range) && (player->meleeWeaponState != 0) && (arg4 >= ABS(var1)) && (arg3 >= ABS(var2))) { return true; } else { return false; @@ -4554,7 +4554,7 @@ void func_800355B8(PlayState* play, Vec3f* pos) { u8 func_800355E4(PlayState* play, Collider* collider) { Player* player = GET_PLAYER(play); - if ((collider->acFlags & AC_TYPE_PLAYER) && (player->swordState != 0) && (player->meleeWeaponAnimation == 0x16)) { + if ((collider->acFlags & AC_TYPE_PLAYER) && (player->meleeWeaponState != 0) && (player->meleeWeaponAnimation == 0x16)) { return true; } else { return false; diff --git a/soh/src/code/z_camera.c b/soh/src/code/z_camera.c index 63c5d08a5..783731506 100644 --- a/soh/src/code/z_camera.c +++ b/soh/src/code/z_camera.c @@ -3083,7 +3083,7 @@ s32 Camera_Battle1(Camera* camera) { } anim->roll += (((OREG(36) * camera->speedRatio) * (1.0f - distRatio)) - anim->roll) * PCT(OREG(37)); camera->roll = DEGF_TO_BINANG(anim->roll); - camera->fov = Camera_LERPCeilF((player->swordState != 0 ? 0.8f + camera->fov = Camera_LERPCeilF((player->meleeWeaponState != 0 ? 0.8f : gSaveContext.health <= 0x10 ? 0.8f : 1.0f) * (fov - ((fov * 0.05f) * distRatio)), diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c index 5e7ef5e8e..82cb8a6b6 100644 --- a/soh/src/code/z_parameter.c +++ b/soh/src/code/z_parameter.c @@ -929,7 +929,7 @@ void func_80083108(PlayState* play) { gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] = gSaveContext.buttonStatus[3] = gSaveContext.buttonStatus[5] = gSaveContext.buttonStatus[6] = gSaveContext.buttonStatus[7] = gSaveContext.buttonStatus[8] = BTN_DISABLED; - } else if ((func_8008F2F8(play) >= 2) && (func_8008F2F8(play) < 5)) { + } else if ((Player_GetEnvironmentalHazard(play) >= 2) && (Player_GetEnvironmentalHazard(play) < 5)) { if (gSaveContext.buttonStatus[0] != BTN_DISABLED) { sp28 = 1; } @@ -945,7 +945,7 @@ void func_80083108(PlayState* play) { } gSaveContext.buttonStatus[BUTTON_STATUS_INDEX(i)] = BTN_ENABLED; - } else if (func_8008F2F8(play) == 2) { + } else if (Player_GetEnvironmentalHazard(play) == 2) { if ((gSaveContext.equips.buttonItems[i] != ITEM_HOOKSHOT) && (gSaveContext.equips.buttonItems[i] != ITEM_LONGSHOT)) { if (gSaveContext.buttonStatus[BUTTON_STATUS_INDEX(i)] == BTN_ENABLED) { @@ -3367,7 +3367,7 @@ void Interface_UpdateMagicBar(PlayState* play) { break; } } - if ((gSaveContext.magic == 0) || ((func_8008F2F8(play) >= 2) && (func_8008F2F8(play) < 5)) || + if ((gSaveContext.magic == 0) || ((Player_GetEnvironmentalHazard(play) >= 2) && (Player_GetEnvironmentalHazard(play) < 5)) || !hasLens || !play->actorCtx.lensActive) { play->actorCtx.lensActive = false; @@ -4182,7 +4182,7 @@ void Interface_DrawItemButtons(PlayState* play) { if ((gSaveContext.unk_13EA == 1) || (gSaveContext.unk_13EA == 2) || (gSaveContext.unk_13EA == 5)) { temp = 0; - } else if ((player->stateFlags1 & 0x00200000) || (func_8008F2F8(play) == 4) || + } else if ((player->stateFlags1 & 0x00200000) || (Player_GetEnvironmentalHazard(play) == 4) || (player->stateFlags2 & PLAYER_STATE2_CRAWLING)) { temp = 70; } else { @@ -6396,13 +6396,13 @@ void Interface_Update(PlayState* play) { } HealthMeter_HandleCriticalAlarm(play); - D_80125A58 = func_8008F2F8(play); + D_80125A58 = Player_GetEnvironmentalHazard(play); if (D_80125A58 == 1) { if (CUR_EQUIP_VALUE(EQUIP_TUNIC) == 2 || CVarGetInteger("gSuperTunic", 0) != 0) { D_80125A58 = 0; } - } else if ((func_8008F2F8(play) >= 2) && (func_8008F2F8(play) < 5)) { + } else if ((Player_GetEnvironmentalHazard(play) >= 2) && (Player_GetEnvironmentalHazard(play) < 5)) { if (CUR_EQUIP_VALUE(EQUIP_TUNIC) == 3 || CVarGetInteger("gSuperTunic", 0) != 0) { D_80125A58 = 0; } diff --git a/soh/src/code/z_player_lib.c b/soh/src/code/z_player_lib.c index 4c527ad53..934df5f1b 100644 --- a/soh/src/code/z_player_lib.c +++ b/soh/src/code/z_player_lib.c @@ -53,7 +53,7 @@ u8 gPlayerModelTypes[][5] = { { 0, 0, 13, 18, 20 }, { 0, 0, 14, 18, 20 }, { 0, 7, 8, 18, 20 }, { 0, 2, 8, 19, 20 }, }; -Gfx* D_80125CE8[] = { +Gfx* sPlayerRightHandShieldDLs[] = { gLinkAdultRightHandClosedNearDL, gLinkChildRightHandClosedNearDL, gLinkAdultRightHandClosedFarDL, @@ -72,7 +72,7 @@ Gfx* D_80125CE8[] = { gLinkChildRightHandClosedFarDL, }; -Gfx* D_80125D28[] = { +Gfx* sSheathWithSwordDLs[] = { gLinkAdultMasterSwordAndSheathNearDL, gLinkChildSwordAndSheathNearDL, gLinkAdultMasterSwordAndSheathFarDL, gLinkChildSwordAndSheathFarDL, gLinkAdultMasterSwordAndSheathNearDL, gLinkChildDekuShieldSwordAndSheathNearDL, @@ -87,7 +87,7 @@ Gfx* D_80125D28[] = { NULL, gLinkChildDekuShieldWithMatrixDL, }; -Gfx* D_80125D88[] = { +Gfx* sSheathWithoutSwordDLs[] = { gLinkAdultSheathNearDL, gLinkChildSheathNearDL, gLinkAdultSheathFarDL, @@ -114,162 +114,162 @@ Gfx* D_80125D88[] = { gLinkChildDekuShieldWithMatrixDL, }; -Gfx* D_80125DE8[] = { +Gfx* gPlayerLeftHandBgsDLs[] = { gLinkAdultLeftHandHoldingBgsNearDL, gLinkChildLeftHandHoldingMasterSwordDL, gLinkAdultLeftHandHoldingBgsFarDL, gLinkChildLeftHandHoldingMasterSwordDL, gLinkAdultHandHoldingBrokenGiantsKnifeDL, gLinkChildLeftHandHoldingMasterSwordDL, gLinkAdultHandHoldingBrokenGiantsKnifeFarDL, gLinkChildLeftHandHoldingMasterSwordDL, }; -Gfx* D_80125E08[] = { +Gfx* gPlayerLeftHandOpenDLs[] = { gLinkAdultLeftHandNearDL, gLinkChildLeftHandNearDL, gLinkAdultLeftHandFarDL, gLinkChildLeftHandFarDL, }; -Gfx* D_80125E18[] = { +Gfx* gPlayerLeftHandClosedDLs[] = { gLinkAdultLeftHandClosedNearDL, gLinkChildLeftFistNearDL, gLinkAdultLeftHandClosedFarDL, gLinkChildLeftFistFarDL, }; -Gfx* D_80125E28[] = { +Gfx* sPlayerLeftHandSwordDLs2[] = { gLinkAdultLeftHandHoldingMasterSwordNearDL, gLinkChildLeftFistAndKokiriSwordNearDL, gLinkAdultLeftHandHoldingMasterSwordFarDL, gLinkChildLeftFistAndKokiriSwordFarDL, }; -Gfx* D_80125E38[] = { +Gfx* sPlayerLeftHandSwordDLs[] = { gLinkAdultLeftHandHoldingMasterSwordNearDL, gLinkChildLeftFistAndKokiriSwordNearDL, gLinkAdultLeftHandHoldingMasterSwordFarDL, gLinkChildLeftFistAndKokiriSwordFarDL, }; -Gfx* D_80125E48[] = { +Gfx* sPlayerRightHandOpenDLs[] = { gLinkAdultRightHandNearDL, gLinkChildRightHandNearDL, gLinkAdultRightHandFarDL, gLinkChildRightHandFarDL, }; -Gfx* D_80125E58[] = { +Gfx* sPlayerRightHandClosedDLs[] = { gLinkAdultRightHandClosedNearDL, gLinkChildRightHandClosedNearDL, gLinkAdultRightHandClosedFarDL, gLinkChildRightHandClosedFarDL, }; -Gfx* D_80125E68[] = { +Gfx* sPlayerRightHandBowSlingshotDLs[] = { gLinkAdultRightHandHoldingBowNearDL, gLinkChildRightHandHoldingSlingshotNearDL, gLinkAdultRightHandHoldingBowFarDL, gLinkChildRightHandHoldingSlingshotFarDL, }; -Gfx* D_80125E78[] = { +Gfx* sSwordAndSheathDLs[] = { gLinkAdultMasterSwordAndSheathNearDL, gLinkChildSwordAndSheathNearDL, gLinkAdultMasterSwordAndSheathFarDL, gLinkChildSwordAndSheathFarDL, }; -Gfx* D_80125E88[] = { +Gfx* sSheathDLs[] = { gLinkAdultSheathNearDL, gLinkChildSheathNearDL, gLinkAdultSheathFarDL, gLinkChildSheathFarDL, }; -Gfx* D_80125E98[] = { +Gfx* sPlayerWaistDLs[] = { gLinkAdultWaistNearDL, gLinkChildWaistNearDL, gLinkAdultWaistFarDL, gLinkChildWaistFarDL, }; -Gfx* D_80125EA8[] = { +Gfx* sPlayerRightHandBowSlingshotDLs2[] = { gLinkAdultRightHandHoldingBowNearDL, gLinkChildRightHandHoldingSlingshotNearDL, gLinkAdultRightHandHoldingBowFarDL, gLinkChildRightHandHoldingSlingshotFarDL, }; -Gfx* D_80125EB8[] = { +Gfx* sPlayerRightHandOcarinaDLs[] = { gLinkAdultRightHandHoldingOotNearDL, gLinkChildRightHandHoldingFairyOcarinaNearDL, gLinkAdultRightHandHoldingOotFarDL, gLinkChildRightHandHoldingFairyOcarinaFarDL, }; -Gfx* D_80125EC8[] = { +Gfx* sPlayerRightHandOotDLs[] = { gLinkAdultRightHandHoldingOotNearDL, gLinkChildRightHandAndOotNearDL, gLinkAdultRightHandHoldingOotFarDL, gLinkChildRightHandHoldingOOTFarDL, }; -Gfx* D_80125ED8[] = { +Gfx* sPlayerRightHandHookshotDLs[] = { gLinkAdultRightHandHoldingHookshotNearDL, gLinkChildRightHandNearDL, gLinkAdultRightHandHoldingHookshotNearDL, // The 'far' display list exists but is not used gLinkChildRightHandFarDL, }; -Gfx* D_80125EE8[] = { +Gfx* sPlayerLeftHandHammerDLs[] = { gLinkAdultLeftHandHoldingHammerNearDL, gLinkChildLeftHandNearDL, gLinkAdultLeftHandHoldingHammerFarDL, gLinkChildLeftHandFarDL, }; -Gfx* D_80125EF8[] = { +Gfx* gPlayerLeftHandBoomerangDLs[] = { gLinkAdultLeftHandNearDL, gLinkChildLeftFistAndBoomerangNearDL, gLinkAdultLeftHandFarDL, gLinkChildLeftFistAndBoomerangFarDL, }; -Gfx* D_80125F08[] = { +Gfx* sPlayerLeftHandBottleDLs[] = { gLinkAdultLeftHandOutNearDL, gLinkChildLeftHandUpNearDL, gLinkAdultLeftHandOutNearDL, gLinkChildLeftHandUpNearDL, }; -Gfx* sArmOutDLs[] = { +Gfx* sFirstPersonLeftForearmDLs[] = { gLinkAdultRightArmOutNearDL, NULL, }; -Gfx* sHandOutDLs[] = { +Gfx* sFirstPersonLeftHandDLs[] = { gLinkAdultRightHandOutNearDL, NULL, }; -Gfx* sRightShoulderNearDLs[] = { +Gfx* sFirstPersonRightShoulderDLs[] = { gLinkAdultRightShoulderNearDL, gLinkChildRightShoulderNearDL, }; -Gfx* D_80125F30[] = { +Gfx* sFirstPersonForearmDLs[] = { gLinkAdultLeftArmOutNearDL, NULL, }; -Gfx* sHoldingFirstPersonWeaponDLs[] = { +Gfx* sFirstPersonRightHandHoldingWeaponDLs[] = { gLinkAdultRightHandHoldingBowFirstPersonDL, gLinkChildRightArmStretchedSlingshotDL, }; // Indexed by model types (left hand, right hand, sheath or waist) Gfx** sPlayerDListGroups[] = { - D_80125E08, D_80125E18, D_80125E38, D_80125E28, D_80125DE8, D_80125EE8, D_80125EF8, - D_80125F08, D_80125E48, D_80125E58, D_80125CE8, D_80125E68, D_80125EA8, D_80125EB8, - D_80125EC8, D_80125ED8, D_80125E78, D_80125E88, D_80125D28, D_80125D88, D_80125E98, + gPlayerLeftHandOpenDLs, gPlayerLeftHandClosedDLs, sPlayerLeftHandSwordDLs, sPlayerLeftHandSwordDLs2, gPlayerLeftHandBgsDLs, sPlayerLeftHandHammerDLs, gPlayerLeftHandBoomerangDLs, + sPlayerLeftHandBottleDLs, sPlayerRightHandOpenDLs, sPlayerRightHandClosedDLs, sPlayerRightHandShieldDLs, sPlayerRightHandBowSlingshotDLs, sPlayerRightHandBowSlingshotDLs2, sPlayerRightHandOcarinaDLs, + sPlayerRightHandOotDLs, sPlayerRightHandHookshotDLs, sSwordAndSheathDLs, sSheathDLs, sSheathWithSwordDLs, sSheathWithoutSwordDLs, sPlayerWaistDLs, }; Gfx gCullBackDList[] = { @@ -285,8 +285,8 @@ Gfx gCullFrontDList[] = { Vec3f* D_80160000; s32 sDListsLodOffset; Vec3f sGetItemRefPos; -s32 D_80160014; -s32 D_80160018; +s32 sLeftHandType; +s32 sRightHandType; void Player_SetBootData(PlayState* play, Player* this) { s32 currentBoots; @@ -371,7 +371,7 @@ s32 Player_ActionToModelGroup(Player* this, s32 actionParam) { void Player_SetModelsForHoldingShield(Player* this) { if ((this->stateFlags1 & 0x400000) && ((this->itemAction < 0) || (this->itemAction == this->heldItemAction))) { - if ((CVarGetInteger("gShieldTwoHanded", 0) && (this->heldItemAction != PLAYER_IA_STICK) || + if ((CVarGetInteger("gShieldTwoHanded", 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK) || !Player_HoldsTwoHandedWeapon(this)) && !Player_IsChildWithHylianShield(this)) { this->rightHandType = 10; this->rightHandDLists = &sPlayerDListGroups[10][gSaveContext.linkAge]; @@ -497,7 +497,7 @@ s32 Player_IsBurningStickInRange(PlayState* play, Vec3f* pos, f32 xzRange, f32 y Vec3f diff; s32 pad; - if ((this->heldItemAction == PLAYER_IA_STICK) && (this->unk_860 != 0)) { + if ((this->heldItemAction == PLAYER_IA_DEKU_STICK) && (this->unk_860 != 0)) { Math_Vec3f_Diff(&this->meleeWeaponInfo[0].tip, pos, &diff); return ((SQ(diff.x) + SQ(diff.z)) <= SQ(xzRange)) && (0.0f <= diff.y) && (diff.y <= yRange); } else { @@ -577,7 +577,7 @@ s32 func_8008F128(Player* this) { return Player_HoldsHookshot(this) && (this->heldActor == NULL); } -s32 Player_ActionToSword(s32 actionParam) { +s32 Player_ActionToMeleeWeapon(s32 actionParam) { s32 sword = actionParam - PLAYER_IA_FISHING_POLE; if ((sword > 0) && (sword < 6)) { @@ -587,12 +587,12 @@ s32 Player_ActionToSword(s32 actionParam) { } } -s32 Player_GetSwordHeld(Player* this) { - return Player_ActionToSword(this->heldItemAction); +s32 Player_GetMeleeWeaponHeld(Player* this) { + return Player_ActionToMeleeWeapon(this->heldItemAction); } s32 Player_HoldsTwoHandedWeapon(Player* this) { - if ((this->heldItemAction >= PLAYER_IA_SWORD_BGS) && (this->heldItemAction <= PLAYER_IA_HAMMER)) { + if ((this->heldItemAction >= PLAYER_IA_SWORD_BIGGORON) && (this->heldItemAction <= PLAYER_IA_HAMMER)) { return 1; } else { return 0; @@ -600,7 +600,7 @@ s32 Player_HoldsTwoHandedWeapon(Player* this) { } s32 Player_HoldsBrokenKnife(Player* this) { - return (this->heldItemAction == PLAYER_IA_SWORD_BGS) && (gSaveContext.swordHealth <= 0.0f); + return (this->heldItemAction == PLAYER_IA_SWORD_BIGGORON) && (gSaveContext.swordHealth <= 0.0f); } s32 Player_ActionToBottle(Player* this, s32 actionParam) { @@ -647,7 +647,7 @@ return_neg: return -1; } -s32 func_8008F2F8(PlayState* play) { +s32 Player_GetEnvironmentalHazard(PlayState* play) { Player* this = GET_PLAYER(play); TextTriggerEntry* triggerEntry; s32 var; @@ -747,7 +747,7 @@ Gfx* sBootDListGroups[][2] = { { gLinkAdultLeftHoverBootDL, gLinkAdultRightHoverBootDL }, }; -void func_8008F470(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dListCount, s32 lod, s32 tunic, +void Player_DrawImpl(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dListCount, s32 lod, s32 tunic, s32 boots, s32 face, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, void* data) { Color_RGB8* color; @@ -805,8 +805,8 @@ void func_8008F470(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dLis SkelAnime_DrawFlexLod(play, skeleton, jointTable, dListCount, overrideLimbDraw, postLimbDraw, data, lod); - if (((CVarGetInteger("gFPSGauntlets", 0) && LINK_IS_ADULT) || (overrideLimbDraw != func_800902F0)) && - (overrideLimbDraw != func_80090440) && + if (((CVarGetInteger("gFPSGauntlets", 0) && LINK_IS_ADULT) || (overrideLimbDraw != Player_OverrideLimbDrawGameplayFirstPerson)) && + (overrideLimbDraw != Player_OverrideLimbDrawGameplayCrawling) && (gSaveContext.gameMode != 3)) { if (LINK_IS_ADULT) { s32 strengthUpgrade = CUR_UPG_VALUE(UPG_STRENGTH); @@ -827,9 +827,9 @@ void func_8008F470(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dLis gSPDisplayList(POLY_OPA_DISP++, gLinkAdultLeftGauntletPlate1DL); gSPDisplayList(POLY_OPA_DISP++, gLinkAdultRightGauntletPlate1DL); gSPDisplayList(POLY_OPA_DISP++, - (D_80160014 == 0) ? gLinkAdultLeftGauntletPlate2DL : gLinkAdultLeftGauntletPlate3DL); + (sLeftHandType == 0) ? gLinkAdultLeftGauntletPlate2DL : gLinkAdultLeftGauntletPlate3DL); gSPDisplayList(POLY_OPA_DISP++, - (D_80160018 == 8) ? gLinkAdultRightGauntletPlate2DL : gLinkAdultRightGauntletPlate3DL); + (sRightHandType == 8) ? gLinkAdultRightGauntletPlate2DL : gLinkAdultRightGauntletPlate3DL); } if (boots != 0) { @@ -848,7 +848,7 @@ void func_8008F470(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dLis CLOSE_DISPS(play->state.gfxCtx); } -Vec3f D_8012602C = { 0.0f, 0.0f, 0.0f }; +Vec3f sZeroVec = { 0.0f, 0.0f, 0.0f }; Vec3f D_80126038[] = { { 1304.0f, 0.0f, 0.0f }, @@ -896,10 +896,10 @@ void func_8008F87C(PlayState* play, Player* this, SkelAnime* skelAnime, Vec3f* p Matrix_Push(); Matrix_TranslateRotateZYX(pos, rot); - Matrix_MultVec3f(&D_8012602C, &spA4); + Matrix_MultVec3f(&sZeroVec, &spA4); Matrix_TranslateRotateZYX(&D_80126038[gSaveContext.linkAge], &skelAnime->jointTable[shinLimbIndex]); Matrix_Translate(D_80126050[gSaveContext.linkAge], 0.0f, 0.0f, MTXMODE_APPLY); - Matrix_MultVec3f(&D_8012602C, &sp98); + Matrix_MultVec3f(&sZeroVec, &sp98); Matrix_MultVec3f(&D_80126070, &footprintPos); Matrix_Pop(); @@ -955,12 +955,12 @@ void func_8008F87C(PlayState* play, Player* this, SkelAnime* skelAnime, Vec3f* p } } -s32 func_8008FCC8(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { +s32 Player_OverrideLimbDrawGameplayCommon(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { Player* this = (Player*)thisx; if (limbIndex == PLAYER_LIMB_ROOT) { - D_80160014 = this->leftHandType; - D_80160018 = this->rightHandType; + sLeftHandType = this->leftHandType; + sRightHandType = this->rightHandType; D_80160000 = &this->meleeWeaponInfo[2].base; if (!LINK_IS_ADULT) { @@ -1036,33 +1036,33 @@ s32 func_8008FCC8(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s return false; } -s32 func_80090014(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { +s32 Player_OverrideLimbDrawGameplayDefault(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { Player* this = (Player*)thisx; - if (!func_8008FCC8(play, limbIndex, dList, pos, rot, thisx)) + if (!Player_OverrideLimbDrawGameplayCommon(play, limbIndex, dList, pos, rot, thisx)) { if (limbIndex == PLAYER_LIMB_L_HAND) { Gfx** dLists = this->leftHandDLists; - if ((D_80160014 == 4) && (gSaveContext.swordHealth <= 0.0f)) { + if ((sLeftHandType == 4) && (gSaveContext.swordHealth <= 0.0f)) { dLists += 4; - } else if ((D_80160014 == 6) && (this->stateFlags1 & 0x2000000)) { - dLists = &D_80125E08[gSaveContext.linkAge]; - D_80160014 = 0; + } else if ((sLeftHandType == 6) && (this->stateFlags1 & 0x2000000)) { + dLists = &gPlayerLeftHandOpenDLs[gSaveContext.linkAge]; + sLeftHandType = 0; } else if ((this->leftHandType == 0) && (this->actor.speedXZ > 2.0f) && !(this->stateFlags1 & 0x8000000)) { - dLists = &D_80125E18[gSaveContext.linkAge]; - D_80160014 = 1; + dLists = &gPlayerLeftHandClosedDLs[gSaveContext.linkAge]; + sLeftHandType = 1; } *dList = ResourceMgr_LoadGfxByName(dLists[sDListsLodOffset]); } else if (limbIndex == PLAYER_LIMB_R_HAND) { Gfx** dLists = this->rightHandDLists; - if (D_80160018 == 10) { + if (sRightHandType == 10) { dLists += this->currentShield * 4; } else if ((this->rightHandType == 8) && (this->actor.speedXZ > 2.0f) && !(this->stateFlags1 & 0x8000000)) { - dLists = &D_80125E58[gSaveContext.linkAge]; - D_80160018 = 9; + dLists = &sPlayerRightHandClosedDLs[gSaveContext.linkAge]; + sRightHandType = 9; } *dList = ResourceMgr_LoadGfxByName(dLists[sDListsLodOffset]); @@ -1077,7 +1077,7 @@ s32 func_80090014(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s } } else if (!LINK_IS_ADULT && ((this->sheathType == 16) || (this->sheathType == 17)) && (gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI)) { - dLists = &D_80125D28[16]; + dLists = &sSheathWithSwordDLs[16]; } if (dLists[sDListsLodOffset] != NULL) { @@ -1105,24 +1105,24 @@ s32 func_80090014(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s return false; } -s32 func_800902F0(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { +s32 Player_OverrideLimbDrawGameplayFirstPerson(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { Player* this = (Player*)thisx; - if (!func_8008FCC8(play, limbIndex, dList, pos, rot, thisx)) { + if (!Player_OverrideLimbDrawGameplayCommon(play, limbIndex, dList, pos, rot, thisx)) { if (this->unk_6AD != 2) { *dList = NULL; } else if (limbIndex == PLAYER_LIMB_L_FOREARM) { - *dList = sArmOutDLs[gSaveContext.linkAge]; + *dList = sFirstPersonLeftForearmDLs[gSaveContext.linkAge]; } else if (limbIndex == PLAYER_LIMB_L_HAND) { s32 handOutDlIndex = gSaveContext.linkAge; if (CVarGetInteger("gBowSlingShotAmmoFix", 0) && LINK_IS_ADULT && Player_HoldsSlingshot(this)) { handOutDlIndex = 1; } - *dList = sHandOutDLs[handOutDlIndex]; + *dList = sFirstPersonLeftHandDLs[handOutDlIndex]; } else if (limbIndex == PLAYER_LIMB_R_SHOULDER) { - *dList = sRightShoulderNearDLs[gSaveContext.linkAge]; + *dList = sFirstPersonRightShoulderDLs[gSaveContext.linkAge]; } else if (limbIndex == PLAYER_LIMB_R_FOREARM) { - *dList = D_80125F30[gSaveContext.linkAge]; + *dList = sFirstPersonForearmDLs[gSaveContext.linkAge]; } else if (limbIndex == PLAYER_LIMB_R_HAND) { s32 firstPersonWeaponIndex = gSaveContext.linkAge; if (CVarGetInteger("gBowSlingShotAmmoFix", 0)) { @@ -1133,7 +1133,7 @@ s32 func_800902F0(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s } } *dList = Player_HoldsHookshot(this) ? gLinkAdultRightHandHoldingHookshotFarDL - : sHoldingFirstPersonWeaponDLs[firstPersonWeaponIndex]; + : sFirstPersonRightHandHoldingWeaponDLs[firstPersonWeaponIndex]; } else { *dList = NULL; } @@ -1142,8 +1142,8 @@ s32 func_800902F0(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s return false; } -s32 func_80090440(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - if (!func_8008FCC8(play, limbIndex, dList, pos, rot, thisx)) { +s32 Player_OverrideLimbDrawGameplayCrawling(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { + if (!Player_OverrideLimbDrawGameplayCommon(play, limbIndex, dList, pos, rot, thisx)) { *dList = NULL; } @@ -1179,7 +1179,7 @@ u8 func_80090480(PlayState* play, ColliderQuad* collider, WeaponInfo* weaponInfo } } -void func_80090604(PlayState* play, Player* this, ColliderQuad* collider, Vec3f* quadSrc) { +void Player_UpdateShieldCollider(PlayState* play, Player* this, ColliderQuad* collider, Vec3f* quadSrc) { static u8 shieldColTypes[PLAYER_SHIELD_MAX] = { COLTYPE_METAL, COLTYPE_WOOD, @@ -1226,7 +1226,7 @@ void func_800906D4(PlayState* play, Player* this, Vec3f* newTipPos) { &this->meleeWeaponInfo[0].base); } - if ((this->swordState > 0) && ((this->meleeWeaponAnimation < 0x18) || (this->stateFlags2 & 0x20000))) { + if ((this->meleeWeaponState > 0) && ((this->meleeWeaponAnimation < 0x18) || (this->stateFlags2 & 0x20000))) { func_80090480(play, &this->meleeWeaponQuads[0], &this->meleeWeaponInfo[1], &newTipPos[1], &newBasePos[1]); func_80090480(play, &this->meleeWeaponQuads[1], &this->meleeWeaponInfo[2], &newTipPos[2], &newBasePos[2]); } @@ -1375,7 +1375,7 @@ void Player_DrawHookshotReticle(PlayState* play, Player* this, f32 hookshotRange Vec3f D_801260D4 = { 1100.0f, -700.0f, 0.0f }; -f32 sSwordLengths[] = { +f32 sMeleeWeaponLengths[] = { 0.0f, 4000.0f, 3000.0f, 5500.0f, 0.0f, 2500.0f, }; @@ -1391,14 +1391,14 @@ Color_RGB8 sBottleColors[] = { { 255, 255, 255 }, { 255, 255, 255 }, { 80, 80, 255 }, }; -Vec3f D_80126128 = { 398.0f, 1419.0f, 244.0f }; +Vec3f sLeftHandArrowVec3 = { 398.0f, 1419.0f, 244.0f }; BowStringData sBowStringData[] = { { gLinkAdultBowStringDL, { 0.0f, -360.4f, 0.0f } }, // bow { gLinkChildSlinghotStringDL, { 606.0f, 236.0f, 0.0f } }, // slingshot }; -Vec3f D_80126154[] = { +Vec3f sRightHandLimbModelShieldQuadVertices[] = { { -4500.0f, -3000.0f, -600.0f }, { 1500.0f, -3000.0f, -600.0f }, { -4500.0f, 3000.0f, -600.0f }, @@ -1408,17 +1408,17 @@ Vec3f D_80126154[] = { Vec3f D_80126184 = { 100.0f, 1500.0f, 0.0f }; Vec3f D_80126190 = { 100.0f, 1640.0f, 0.0f }; -Vec3f D_8012619C[] = { +Vec3f sSheathLimbModelShieldQuadVertices[] = { { -3000.0f, -3000.0f, -900.0f }, { 3000.0f, -3000.0f, -900.0f }, { -3000.0f, 3000.0f, -900.0f }, { 3000.0f, 3000.0f, -900.0f }, }; -Vec3f D_801261CC = { 630.0f, 100.0f, -30.0f }; -Vec3s D_801261D8 = { 0, 0, 0x7FFF }; +Vec3f sSheathLimbModelShieldOnBackPos = { 630.0f, 100.0f, -30.0f }; +Vec3s sSheathLimbModelShieldOnBackZyxRot = { 0, 0, 0x7FFF }; -Vec3f D_801261E0[] = { +Vec3f sLeftRightFootLimbModelFootPos[] = { { 200.0f, 300.0f, 0.0f }, { 200.0f, 200.0f, 0.0f }, }; @@ -1428,11 +1428,11 @@ Vec3f D_801261E0[] = { // started working out properly #define RETICLE_MAX 3.402823466e+12f -void func_80090D20(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { +void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { Player* this = (Player*)thisx; if (*dList != NULL) { - Matrix_MultVec3f(&D_8012602C, D_80160000); + Matrix_MultVec3f(&sZeroVec, D_80160000); } if (limbIndex == PLAYER_LIMB_L_HAND) { @@ -1441,7 +1441,7 @@ void func_80090D20(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void Math_Vec3f_Copy(&this->leftHandPos, D_80160000); - if (this->itemAction == PLAYER_IA_STICK) { + if (this->itemAction == PLAYER_IA_DEKU_STICK) { Vec3f sp124[3]; OPEN_DISPS(play->state.gfxCtx); @@ -1449,7 +1449,7 @@ void func_80090D20(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void if (this->actor.scale.y >= 0.0f) { D_80126080.x = this->unk_85C * 5000.0f; func_80090A28(this, sp124); - if (this->swordState != 0) { + if (this->meleeWeaponState != 0) { EffectBlure_ChangeType(Effect_GetByIndex(this->meleeWeaponEffectIndex), 7); // stick sword type func_800906D4(play, this, sp124); } else { @@ -1466,14 +1466,14 @@ void func_80090D20(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void gSPDisplayList(POLY_OPA_DISP++, gLinkChildLinkDekuStickDL); CLOSE_DISPS(play->state.gfxCtx); - } else if ((this->actor.scale.y >= 0.0f) && (this->swordState != 0)) { + } else if ((this->actor.scale.y >= 0.0f) && (this->meleeWeaponState != 0)) { Vec3f spE4[3]; if (Player_HoldsBrokenKnife(this)) { D_80126080.x = 1500.0f; } else { - D_80126080.x = sSwordLengths[Player_GetSwordHeld(this)]; - EffectBlure_ChangeType(Effect_GetByIndex(this->meleeWeaponEffectIndex), sSwordTypes[Player_GetSwordHeld(this)]); + D_80126080.x = sMeleeWeaponLengths[Player_GetMeleeWeaponHeld(this)]; + EffectBlure_ChangeType(Effect_GetByIndex(this->meleeWeaponEffectIndex), sSwordTypes[Player_GetMeleeWeaponHeld(this)]); } func_80090A28(this, spE4); @@ -1494,7 +1494,7 @@ void func_80090D20(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void if (this->actor.scale.y >= 0.0f) { if (!Player_HoldsHookshot(this) && ((hookedActor = this->heldActor) != NULL)) { if (this->stateFlags1 & 0x200) { - Matrix_MultVec3f(&D_80126128, &hookedActor->world.pos); + Matrix_MultVec3f(&sLeftHandArrowVec3, &hookedActor->world.pos); Matrix_RotateZYX(0x69E8, -0x5708, 0x458E, MTXMODE_APPLY); Matrix_Get(&sp14C); Matrix_MtxFToYXZRotS(&sp14C, &hookedActor->world.rot, 0); @@ -1537,7 +1537,7 @@ void func_80090D20(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void Vec3f sp90; f32 distXYZ; - Matrix_MultVec3f(&D_8012602C, &sp90); + Matrix_MultVec3f(&sZeroVec, &sp90); distXYZ = Math_Vec3f_DistXYZ(D_80160000, &sp90); this->unk_858 = distXYZ - 3.0f; @@ -1568,7 +1568,7 @@ void func_80090D20(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void CLOSE_DISPS(play->state.gfxCtx); } else if ((this->actor.scale.y >= 0.0f) && (this->rightHandType == 10)) { Matrix_Get(&this->shieldMf); - func_80090604(play, this, &this->shieldQuad, D_80126154); + Player_UpdateShieldCollider(play, this, &this->shieldQuad, sRightHandLimbModelShieldQuadVertices); } if (this->actor.scale.y >= 0.0f) { @@ -1630,16 +1630,16 @@ void func_80090D20(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void if (limbIndex == PLAYER_LIMB_SHEATH) { if ((this->rightHandType != 10) && (this->rightHandType != 0xFF)) { if (Player_IsChildWithHylianShield(this)) { - func_80090604(play, this, &this->shieldQuad, D_8012619C); + Player_UpdateShieldCollider(play, this, &this->shieldQuad, sSheathLimbModelShieldQuadVertices); } - Matrix_TranslateRotateZYX(&D_801261CC, &D_801261D8); + Matrix_TranslateRotateZYX(&sSheathLimbModelShieldOnBackPos, &sSheathLimbModelShieldOnBackZyxRot); Matrix_Get(&this->shieldMf); } } else if (limbIndex == PLAYER_LIMB_HEAD) { Matrix_MultVec3f(&D_801260D4, &this->actor.focus.pos); } else { - Vec3f* vec = &D_801261E0[(gSaveContext.linkAge)]; + Vec3f* vec = &sLeftRightFootLimbModelFootPos[(gSaveContext.linkAge)]; Actor_SetFeetPos(&this->actor, limbIndex, PLAYER_LIMB_L_FOOT, vec, PLAYER_LIMB_R_FOOT, vec); } @@ -1670,11 +1670,11 @@ u32 func_80091738(PlayState* play, u8* segment, SkelAnime* skelAnime) { return size + 0x8800 + 0x90; } -u8 D_801261F8[] = { 2, 2, 5 }; +u8 sPauseModelGroupBySword[] = { 2, 2, 5 }; -s32 func_80091880(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* arg) { +s32 Player_OverrideLimbDrawPause(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* arg) { u8* ptr = arg; - u8 modelGroup = D_801261F8[ptr[0] > 0 ? ptr[0] - 1 : 0]; + u8 modelGroup = sPauseModelGroupBySword[ptr[0] > 0 ? ptr[0] - 1 : 0]; s32 type; s32 dListOffset = 0; Gfx** dLists; @@ -1686,7 +1686,7 @@ s32 func_80091880(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s if (limbIndex == PLAYER_LIMB_L_HAND) { type = gPlayerModelTypes[modelGroup][1]; - D_80160014 = type; + sLeftHandType = type; if (ptr[0] == 0) type = 0; @@ -1696,7 +1696,7 @@ s32 func_80091880(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s } } else if (limbIndex == PLAYER_LIMB_R_HAND) { type = gPlayerModelTypes[modelGroup][2]; - D_80160018 = type; + sRightHandType = type; if (type == 10) { dListOffset = ptr[1] * ptrSize; } @@ -1741,7 +1741,7 @@ void Pause_DrawTriforceSpot(PlayState* play, s32 showLightColumn) { rotation += 0x03E8; } -void func_80091A24(PlayState* play, void* seg04, void* seg06, SkelAnime* skelAnime, Vec3f* pos, Vec3s* rot, +void Player_DrawPauseImpl(PlayState* play, void* seg04, void* seg06, SkelAnime* skelAnime, Vec3f* pos, Vec3s* rot, f32 scale, s32 sword, s32 tunic, s32 shield, s32 boots, s32 width, s32 height, Vec3f* eye, Vec3f* at, f32 fovy, void* img1, void* img2) { static Vp viewport = { 128, 224, 511, 0, 128, 224, 511, 0 }; @@ -1805,8 +1805,8 @@ void func_80091A24(PlayState* play, void* seg04, void* seg06, SkelAnime* skelAni gSPSegment(POLY_OPA_DISP++, 0x0C, gCullBackDList); - func_8008F470(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount, 0, tunic, boots, 0, - func_80091880, NULL, &sp12C); + Player_DrawImpl(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount, 0, tunic, boots, 0, + Player_OverrideLimbDrawPause, NULL, &sp12C); if (CVarGetInteger("gPauseTriforce", 0)) { @@ -1833,7 +1833,7 @@ s16 EquipedStance; // Link's current mode (Two handed, One handed...) s16 FrameCountSinceLastAnim = 0; // Time since last animation s16 MinFrameCount; // Frame to wait before checking if we need to change the animation -void func_8009214C(PlayState* play, u8* segment, SkelAnime* skelAnime, Vec3f* pos, Vec3s* rot, f32 scale, +void Player_DrawPause(PlayState* play, u8* segment, SkelAnime* skelAnime, Vec3f* pos, Vec3s* rot, f32 scale, s32 sword, s32 tunic, s32 shield, s32 boots) { Input* p1Input = &play->state.input[0]; Vec3f eye = { 0.0f, 0.0f, -400.0f }; @@ -2068,7 +2068,7 @@ void func_8009214C(PlayState* play, u8* segment, SkelAnime* skelAnime, Vec3f* po } - func_80091A24(play, segment + 0x3800, segment + 0x8800, skelAnime, pos, rot, scale, sword, tunic, shield, + Player_DrawPauseImpl(play, segment + 0x3800, segment + 0x8800, skelAnime, pos, rot, scale, sword, tunic, shield, boots, 64, 112, &eye, &at, 60.0f, play->state.gfxCtx->curFrameBuffer, play->state.gfxCtx->curFrameBuffer + 0x1C00); } diff --git a/soh/src/code/z_scene_table.c b/soh/src/code/z_scene_table.c index 13c758ab7..00593d0dd 100644 --- a/soh/src/code/z_scene_table.c +++ b/soh/src/code/z_scene_table.c @@ -2096,7 +2096,7 @@ void func_8009EE44(PlayState* play) { } if ((play->roomCtx.unk_74[0] == 0) && playerHasCojiro) { if (play->roomCtx.unk_74[1] == 50) { - func_8002F7DC(&GET_PLAYER(play)->actor, NA_SE_EV_CHICKEN_CRY_M); + Player_PlaySfx(&GET_PLAYER(play)->actor, NA_SE_EV_CHICKEN_CRY_M); play->roomCtx.unk_74[0] = 1; } play->roomCtx.unk_74[1]++; diff --git a/soh/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c b/soh/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c index d4e29892e..3b2524e79 100644 --- a/soh/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c +++ b/soh/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c @@ -352,7 +352,7 @@ void BgHeavyBlock_LiftedUp(BgHeavyBlock* this, PlayState* play) { if (this->timer == 11) { func_800AA000(0.0f, 0xFF, 0x14, 0x14); - func_8002F7DC(&player->actor, NA_SE_PL_PULL_UP_BIGROCK); + Player_PlaySfx(&player->actor, NA_SE_PL_PULL_UP_BIGROCK); LOG_STRING("NA_SE_PL_PULL_UP_BIGROCK"); } diff --git a/soh/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c b/soh/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c index 64829acd1..cae8037c6 100644 --- a/soh/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c +++ b/soh/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c @@ -145,7 +145,7 @@ void BgHidanDalm_Wait(BgHidanDalm* this, PlayState* play) { this->dyna.actor.bgCheckFlags &= ~8; this->dyna.actor.speedXZ = 10.0f; Flags_SetSwitch(play, this->switchFlag); - func_8002F7DC(&GET_PLAYER(play)->actor, NA_SE_IT_HAMMER_HIT); + Player_PlaySfx(&GET_PLAYER(play)->actor, NA_SE_IT_HAMMER_HIT); Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_DARUMA_VANISH); } else { CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base); diff --git a/soh/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c b/soh/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c index cd1654e35..000895dc5 100644 --- a/soh/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c +++ b/soh/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c @@ -154,7 +154,7 @@ void BgJyaGoroiwa_Move(BgJyaGoroiwa* this, PlayState* play) { } func_8002F6D4(play, thisx, 2.0f, thisx->yawTowardsPlayer, 0.0f, 0); - func_8002F7DC(&GET_PLAYER(play)->actor, NA_SE_PL_BODY_HIT); + Player_PlaySfx(&GET_PLAYER(play)->actor, NA_SE_PL_BODY_HIT); this->yOffsetSpeed = 10.0f; this->speedFactor = 0.5f; diff --git a/soh/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c b/soh/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c index b9a263cf3..f63f427db 100644 --- a/soh/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c +++ b/soh/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c @@ -176,9 +176,9 @@ void func_808ACA08(BgSpot02Objects* this, PlayState* play) { // enter the cutscene context. if (play->csCtx.frames == 402 && !(gSaveContext.n64ddFlag)) { if (!LINK_IS_ADULT) { - func_8002F7DC(&player->actor, NA_SE_VO_LI_DEMO_DAMAGE_KID); + Player_PlaySfx(&player->actor, NA_SE_VO_LI_DEMO_DAMAGE_KID); } else { - func_8002F7DC(&player->actor, NA_SE_VO_LI_DEMO_DAMAGE); + Player_PlaySfx(&player->actor, NA_SE_VO_LI_DEMO_DAMAGE); } } } diff --git a/soh/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c b/soh/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c index ad11f19fd..b7c988cda 100644 --- a/soh/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c +++ b/soh/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c @@ -402,7 +402,7 @@ void BgYdanSp_WallWebIdle(BgYdanSp* this, PlayState* play) { if (Flags_GetSwitch(play, this->burnSwitchFlag) || (this->trisCollider.base.acFlags & 2)) { this->dyna.actor.home.pos.y = this->dyna.actor.world.pos.y + 80.0f; BgYdanSp_BurnWeb(this, play); - } else if (player->heldItemAction == PLAYER_IA_STICK && player->unk_860 != 0) { + } else if (player->heldItemAction == PLAYER_IA_DEKU_STICK && player->unk_860 != 0) { func_8002DBD0(&this->dyna.actor, &sp30, &player->meleeWeaponInfo[0].tip); if (fabsf(sp30.x) < 100.0f && sp30.z < 1.0f && sp30.y < 200.0f) { OnePointCutscene_Init(play, 3020, 40, &this->dyna.actor, MAIN_CAM); diff --git a/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c b/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c index ba1778e58..5601823ab 100644 --- a/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c +++ b/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c @@ -613,7 +613,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) { } if (this->csTimer == 13) { - func_8002F7DC(&player->actor, player->ageProperties->unk_92 + NA_SE_VO_LI_SURPRISE); + Player_PlaySfx(&player->actor, player->ageProperties->unk_92 + NA_SE_VO_LI_SURPRISE); } if (this->csTimer != 35) { @@ -4505,7 +4505,7 @@ void func_808E2544(Actor* thisx, PlayState* play) { this->actor.world.rot.x = (Math_CosS(this->unk_1A2 * 0x3400) * sp84 * 0.1f) + this->actor.shape.rot.x; this->actor.world.rot.y = (Math_SinS(this->unk_1A2 * 0x1A00) * sp84) + this->actor.shape.rot.y; - if ((player->swordState != 0) && (player->meleeWeaponAnimation >= 0x18) && (this->actor.xzDistToPlayer < 80.0f)) { + if ((player->meleeWeaponState != 0) && (player->meleeWeaponAnimation >= 0x18) && (this->actor.xzDistToPlayer < 80.0f)) { this->unk_1C2 = 0xC; this->actor.speedXZ = -30.0f; func_8002D908(&this->actor); diff --git a/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c b/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c index a2a52453a..f29d5beb9 100644 --- a/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c +++ b/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c @@ -1679,7 +1679,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) { temp_f12 = this->unk_1B8.z - player->actor.world.pos.z; temp_a0_2 = Math_Atan2S(temp_f12, temp_f14) - player->actor.shape.rot.y; if ((ABS(temp_a0_2) < 0x2000) && (sqrtf(SQ(temp_f14) + SQ(temp_f12)) < 70.0f) && - (player->swordState != 0) && (player->heldItemAction == PLAYER_IA_SWORD_MASTER)) { + (player->meleeWeaponState != 0) && (player->heldItemAction == PLAYER_IA_SWORD_MASTER)) { func_80064520(play, &play->csCtx); gSaveContext.sohStats.itemTimestamp[TIMESTAMP_DEFEAT_GANON] = GAMEPLAYSTAT_TOTAL_TIME; BossRush_HandleCompleteBoss(play); diff --git a/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c index 317eaf55d..a6bb6e8ae 100644 --- a/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c +++ b/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c @@ -524,7 +524,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) { Audio_PlaySoundIncreasinglyTransposed(&this->tentTipPos, NA_SE_EN_MOFER_WAVE, gMorphaTransposeTable); func_800AA000(0, 100, 5, 2); - func_8002F7DC(&player->actor, NA_SE_VO_LI_FREEZE + player->ageProperties->unk_92); + Player_PlaySfx(&player->actor, NA_SE_VO_LI_FREEZE + player->ageProperties->unk_92); } } else { maxSwingRateX = 2000.0f; @@ -539,7 +539,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) { Audio_PlaySoundIncreasinglyTransposed(&this->tentTipPos, NA_SE_EN_MOFER_WAVE, gMorphaTransposeTable); func_800AA000(0, 160, 5, 4); - func_8002F7DC(&player->actor, NA_SE_VO_LI_FREEZE + player->ageProperties->unk_92); + Player_PlaySfx(&player->actor, NA_SE_VO_LI_FREEZE + player->ageProperties->unk_92); } } } else if (this->work[MO_TENT_ACTION_STATE] == MO_TENT_RETREAT) { diff --git a/soh/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c b/soh/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c index 022227f32..48f47047f 100644 --- a/soh/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c +++ b/soh/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c @@ -776,7 +776,7 @@ void BossSst_HeadCharge(BossSst* this, PlayState* play) { sHands[LEFT]->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT); sHands[RIGHT]->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT); func_8002F71C(play, &this->actor, 10.0f, this->actor.shape.rot.y, 5.0f); - func_8002F7DC(&GET_PLAYER(play)->actor, NA_SE_PL_BODY_HIT); + Player_PlaySfx(&GET_PLAYER(play)->actor, NA_SE_PL_BODY_HIT); } } @@ -1586,7 +1586,7 @@ void BossSst_HandSweep(BossSst* this, PlayState* play) { this->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT); this->ready = true; func_8002F71C(play, &this->actor, 5.0f, this->actor.shape.rot.y - (this->vParity * 0x3800), 0.0f); - func_8002F7DC(&player->actor, NA_SE_PL_BODY_HIT); + Player_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT); newTargetYaw = this->actor.shape.rot.y - (this->vParity * 0x1400); if (((s16)(newTargetYaw - this->targetYaw) * this->vParity) > 0) { this->targetYaw = newTargetYaw; @@ -1643,7 +1643,7 @@ void BossSst_HandPunch(BossSst* this, PlayState* play) { if (this->actor.bgCheckFlags & 8) { BossSst_HandSetupRetreat(this); } else if (this->colliderJntSph.base.atFlags & AT_HIT) { - func_8002F7DC(&GET_PLAYER(play)->actor, NA_SE_PL_BODY_HIT); + Player_PlaySfx(&GET_PLAYER(play)->actor, NA_SE_PL_BODY_HIT); func_8002F71C(play, &this->actor, 10.0f, this->actor.shape.rot.y, 5.0f); BossSst_HandSetupRetreat(this); } @@ -1880,9 +1880,9 @@ void BossSst_HandCrush(BossSst* this, PlayState* play) { if (this->timer == 0) { this->timer = 20; if (!LINK_IS_ADULT) { - func_8002F7DC(&player->actor, NA_SE_VO_LI_DAMAGE_S_KID); + Player_PlaySfx(&player->actor, NA_SE_VO_LI_DAMAGE_S_KID); } else { - func_8002F7DC(&player->actor, NA_SE_VO_LI_DAMAGE_S); + Player_PlaySfx(&player->actor, NA_SE_VO_LI_DAMAGE_S); } play->damagePlayer(play, -8); @@ -1963,7 +1963,7 @@ void BossSst_HandSwing(BossSst* this, PlayState* play) { player->actor.world.pos.x += 70.0f * Math_SinS(this->actor.shape.rot.y); player->actor.world.pos.z += 70.0f * Math_CosS(this->actor.shape.rot.y); func_8002F71C(play, &this->actor, 15.0f, this->actor.shape.rot.y, 2.0f); - func_8002F7DC(&player->actor, NA_SE_PL_BODY_HIT); + Player_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT); } func_8002F974(&this->actor, NA_SE_EN_SHADEST_HAND_FLY - SFX_FLAG); @@ -2085,7 +2085,7 @@ void BossSst_HandReadyCharge(BossSst* this, PlayState* play) { OTHER_HAND(this)->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT); sHead->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT); func_8002F71C(play, &this->actor, 10.0f, this->actor.shape.rot.y, 5.0f); - func_8002F7DC(&GET_PLAYER(play)->actor, NA_SE_PL_BODY_HIT); + Player_PlaySfx(&GET_PLAYER(play)->actor, NA_SE_PL_BODY_HIT); } } diff --git a/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c b/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c index dd222db2b..0719e143a 100644 --- a/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c +++ b/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c @@ -783,7 +783,7 @@ s32 BossTw_BeamHitPlayerCheck(BossTw* this, PlayState* play) { } player->isBurning = true; - func_8002F7DC(&player->actor, player->ageProperties->unk_92 + NA_SE_VO_LI_DEMO_DAMAGE); + Player_PlaySfx(&player->actor, player->ageProperties->unk_92 + NA_SE_VO_LI_DEMO_DAMAGE); } } @@ -1653,7 +1653,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, PlayState* play) { } if (this->timers[3] == 16) { - func_8002F7DC(&player->actor, player->ageProperties->unk_92 + NA_SE_VO_LI_SURPRISE); + Player_PlaySfx(&player->actor, player->ageProperties->unk_92 + NA_SE_VO_LI_SURPRISE); } if ((this->timers[3] != 0) && (this->timers[3] < 20)) { @@ -4053,7 +4053,7 @@ void BossTw_BlastFire(BossTw* this, PlayState* play) { player->isBurning = 1; if (this->work[BURN_TMR] == 0) { - func_8002F7DC(&player->actor, player->ageProperties->unk_92 + NA_SE_VO_LI_DEMO_DAMAGE); + Player_PlaySfx(&player->actor, player->ageProperties->unk_92 + NA_SE_VO_LI_DEMO_DAMAGE); this->work[BURN_TMR] = 40; } diff --git a/soh/src/overlays/actors/ovl_Door_Killer/z_door_killer.c b/soh/src/overlays/actors/ovl_Door_Killer/z_door_killer.c index 56aaf17fe..d93862d63 100644 --- a/soh/src/overlays/actors/ovl_Door_Killer/z_door_killer.c +++ b/soh/src/overlays/actors/ovl_Door_Killer/z_door_killer.c @@ -379,7 +379,7 @@ void DoorKiller_FallOver(DoorKiller* this, PlayState* play) { this->hasHitPlayerOrGround |= 1; func_8002F6D4(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f, 16); Audio_PlayActorSound2(&this->actor, NA_SE_EN_KDOOR_HIT); - func_8002F7DC(&player->actor, NA_SE_PL_BODY_HIT); + Player_PlaySfx(&player->actor, NA_SE_PL_BODY_HIT); } } if (!(this->hasHitPlayerOrGround & 1) && (this->timer == 2)) { diff --git a/soh/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c b/soh/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c index 86b901363..ec725959c 100644 --- a/soh/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c +++ b/soh/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c @@ -225,7 +225,7 @@ void EnAnubice_Idle(EnAnubice* this, PlayState* play) { if (this->actor.shape.yOffset > -2.0f) { this->actor.shape.yOffset = 0.0f; - if (player->swordState != 0) { + if (player->meleeWeaponState != 0) { this->actionFunc = EnAnubice_SetupShootFireball; } else if (this->isLinkOutOfRange) { this->actor.velocity.y = 0.0f; diff --git a/soh/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c b/soh/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c index d98215802..8b1d191a6 100644 --- a/soh/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c +++ b/soh/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c @@ -208,19 +208,19 @@ void EnArrow_Shoot(EnArrow* this, PlayState* play) { switch (this->actor.params) { case ARROW_SEED: - func_8002F7DC(&player->actor, NA_SE_IT_SLING_SHOT); + Player_PlaySfx(&player->actor, NA_SE_IT_SLING_SHOT); break; case ARROW_NORMAL_LIT: case ARROW_NORMAL_HORSE: case ARROW_NORMAL: - func_8002F7DC(&player->actor, NA_SE_IT_ARROW_SHOT); + Player_PlaySfx(&player->actor, NA_SE_IT_ARROW_SHOT); break; case ARROW_FIRE: case ARROW_ICE: case ARROW_LIGHT: - func_8002F7DC(&player->actor, NA_SE_IT_MAGIC_ARROW_SHOT); + Player_PlaySfx(&player->actor, NA_SE_IT_MAGIC_ARROW_SHOT); break; } diff --git a/soh/src/overlays/actors/ovl_En_Butte/z_en_butte.c b/soh/src/overlays/actors/ovl_En_Butte/z_en_butte.c index fc24b595d..60d40947c 100644 --- a/soh/src/overlays/actors/ovl_En_Butte/z_en_butte.c +++ b/soh/src/overlays/actors/ovl_En_Butte/z_en_butte.c @@ -272,7 +272,7 @@ void EnButte_FlyAround(EnButte* this, PlayState* play) { EnButte_SelectFlightParams(this, &sFlyAroundParams[this->flightParamsIdx]); } - if (((this->actor.params & 1) == 1) && (player->heldItemAction == PLAYER_IA_STICK) && + if (((this->actor.params & 1) == 1) && (player->heldItemAction == PLAYER_IA_DEKU_STICK) && (this->swordDownTimer <= 0) && ((Math3D_Dist2DSq(player->actor.world.pos.x, player->actor.world.pos.z, this->actor.home.pos.x, this->actor.home.pos.z) < SQ(120.0f)) || @@ -338,7 +338,7 @@ void EnButte_FollowLink(EnButte* this, PlayState* play) { distSqFromHome = Math3D_Dist2DSq(this->actor.world.pos.x, this->actor.world.pos.z, this->actor.home.pos.x, this->actor.home.pos.z); - if (!((player->heldItemAction == PLAYER_IA_STICK) && (fabsf(player->actor.speedXZ) < 1.8f) && + if (!((player->heldItemAction == PLAYER_IA_DEKU_STICK) && (fabsf(player->actor.speedXZ) < 1.8f) && (this->swordDownTimer <= 0) && (distSqFromHome < SQ(320.0f)))) { EnButte_SetupFlyAround(this); } else if (distSqFromHome > SQ(240.0f)) { @@ -401,7 +401,7 @@ void EnButte_Update(Actor* thisx, PlayState* play) { this->unk_260 += 0x600; if ((this->actor.params & 1) == 1) { - if (GET_PLAYER(play)->swordState == 0) { + if (GET_PLAYER(play)->meleeWeaponState == 0) { if (this->swordDownTimer > 0) { this->swordDownTimer--; } diff --git a/soh/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c b/soh/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c index 909403dae..59136cee2 100644 --- a/soh/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c +++ b/soh/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c @@ -818,9 +818,9 @@ void EnFloormas_GrabLink(EnFloormas* this, PlayState* play) { // Damage link every 20 frames if ((this->actionTarget % 20) == 0) { if (!LINK_IS_ADULT) { - func_8002F7DC(&player->actor, NA_SE_VO_LI_DAMAGE_S_KID); + Player_PlaySfx(&player->actor, NA_SE_VO_LI_DAMAGE_S_KID); } else { - func_8002F7DC(&player->actor, NA_SE_VO_LI_DAMAGE_S); + Player_PlaySfx(&player->actor, NA_SE_VO_LI_DAMAGE_S); } play->damagePlayer(play, -8); } diff --git a/soh/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c b/soh/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c index f80c57dc9..aa2b4f404 100644 --- a/soh/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c +++ b/soh/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c @@ -448,7 +448,7 @@ void EnGeldB_Ready(EnGeldB* this, PlayState* play) { return; } angleToLink = player->actor.shape.rot.y - this->actor.shape.rot.y; - if ((this->actor.xzDistToPlayer < 100.0f) && (player->swordState != 0) && (ABS(angleToLink) >= 0x1F40)) { + if ((this->actor.xzDistToPlayer < 100.0f) && (player->meleeWeaponState != 0) && (ABS(angleToLink) >= 0x1F40)) { this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer; EnGeldB_SetupCircle(this); } else if (--this->timer == 0) { @@ -504,7 +504,7 @@ void EnGeldB_Advance(EnGeldB* this, PlayState* play) { this->skelAnime.playSpeed = this->actor.speedXZ / 8.0f; facingAngletoLink = player->actor.shape.rot.y - this->actor.shape.rot.y; facingAngletoLink = ABS(facingAngletoLink); - if ((this->actor.xzDistToPlayer < 150.0f) && (player->swordState != 0) && (facingAngletoLink >= 0x1F40)) { + if ((this->actor.xzDistToPlayer < 150.0f) && (player->meleeWeaponState != 0) && (facingAngletoLink >= 0x1F40)) { this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer; if (Rand_ZeroOne() > 0.7f) { EnGeldB_SetupCircle(this); @@ -856,12 +856,12 @@ void EnGeldB_Slash(EnGeldB* this, PlayState* play) { this->actor.speedXZ = 0.0f; if ((s32)this->skelAnime.curFrame == 1) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_GERUDOFT_ATTACK); - this->swordState = 1; + this->meleeWeaponState = 1; } else if ((s32)this->skelAnime.curFrame == 6) { - this->swordState = -1; + this->meleeWeaponState = -1; } if (this->swordCollider.base.atFlags & AT_BOUNCED) { - this->swordState = -1; + this->meleeWeaponState = -1; this->swordCollider.base.atFlags &= ~(AT_HIT | AT_BOUNCED); EnGeldB_SetupRollBack(this); } else if (SkelAnime_Update(&this->skelAnime)) { @@ -932,13 +932,13 @@ void EnGeldB_SpinAttack(EnGeldB* this, PlayState* play) { } else if ((s32)this->skelAnime.curFrame == 13) { Actor_SpawnFloorDustRing(play, &this->actor, &this->leftFootPos, 3.0f, 2, 2.0f, 0, 0, false); Actor_SpawnFloorDustRing(play, &this->actor, &this->rightFootPos, 3.0f, 2, 2.0f, 0, 0, false); - this->swordState = 1; + this->meleeWeaponState = 1; this->actor.speedXZ = 10.0f; Audio_PlayActorSound2(&this->actor, NA_SE_EN_GERUDOFT_ATTACK); } else if ((s32)this->skelAnime.curFrame == 21) { this->actor.speedXZ = 0.0f; } else if ((s32)this->skelAnime.curFrame == 24) { - this->swordState = -1; + this->meleeWeaponState = -1; } if (SkelAnime_Update(&this->skelAnime) && (this->spinAttackState < 2)) { if (!Actor_IsFacingPlayer(&this->actor, 0x1554)) { @@ -1116,8 +1116,8 @@ void EnGeldB_Jump(EnGeldB* this, PlayState* play) { void EnGeldB_SetupBlock(EnGeldB* this) { f32 lastFrame = Animation_GetLastFrame(&gGerudoRedBlockAnim); - if (this->swordState != 0) { - this->swordState = -1; + if (this->meleeWeaponState != 0) { + this->meleeWeaponState = -1; } this->actor.speedXZ = 0.0f; this->action = GELDB_BLOCK; @@ -1419,7 +1419,7 @@ void EnGeldB_Update(Actor* thisx, PlayState* play) { if ((this->action == GELDB_BLOCK) && (this->skelAnime.curFrame == 0.0f)) { CollisionCheck_SetAC(play, &play->colChkCtx, &this->blockCollider.base); } - if (this->swordState > 0) { + if (this->meleeWeaponState > 0) { CollisionCheck_SetAT(play, &play->colChkCtx, &this->swordCollider.base); } if (this->blinkState == 0) { @@ -1480,10 +1480,10 @@ void EnGeldB_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* ro Matrix_MultVec3f(&swordTipOffset, &swordTip); Matrix_MultVec3f(&swordHiltOffset, &swordHilt); - if ((this->swordState < 0) || ((this->action != GELDB_SLASH) && (this->action != GELDB_SPIN_ATTACK))) { + if ((this->meleeWeaponState < 0) || ((this->action != GELDB_SLASH) && (this->action != GELDB_SPIN_ATTACK))) { EffectBlure_AddSpace(Effect_GetByIndex(this->blureIndex)); - this->swordState = 0; - } else if (this->swordState > 0) { + this->meleeWeaponState = 0; + } else if (this->meleeWeaponState > 0) { EffectBlure_AddVertex(Effect_GetByIndex(this->blureIndex), &swordTip, &swordHilt); } } else { diff --git a/soh/src/overlays/actors/ovl_En_GeldB/z_en_geldb.h b/soh/src/overlays/actors/ovl_En_GeldB/z_en_geldb.h index 46e09f0e1..dc06d2933 100644 --- a/soh/src/overlays/actors/ovl_En_GeldB/z_en_geldb.h +++ b/soh/src/overlays/actors/ovl_En_GeldB/z_en_geldb.h @@ -53,7 +53,7 @@ typedef struct EnGeldB { /* 0x0304 */ f32 approachRate; /* 0x0308 */ char unk_308[4]; /* 0x030C */ f32 unkFloat; - /* 0x0310 */ s16 swordState; + /* 0x0310 */ s16 meleeWeaponState; /* 0x0312 */ s16 spinAttackState; /* 0x0314 */ s16 keyFlag; /* 0x0316 */ char unk_316[2]; diff --git a/soh/src/overlays/actors/ovl_En_Goma/z_en_goma.c b/soh/src/overlays/actors/ovl_En_Goma/z_en_goma.c index 6a433070d..729aaa485 100644 --- a/soh/src/overlays/actors/ovl_En_Goma/z_en_goma.c +++ b/soh/src/overlays/actors/ovl_En_Goma/z_en_goma.c @@ -733,7 +733,7 @@ void EnGoma_Update(Actor* thisx, PlayState* play) { EnGoma_LookAtPlayer(this, play); EnGoma_UpdateEyeEnvColor(this); this->visualState = 1; - if (player->swordState != 0) { + if (player->meleeWeaponState != 0) { this->colCyl2.dim.radius = 35; this->colCyl2.dim.height = 35; this->colCyl2.dim.yShift = 0; diff --git a/soh/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c b/soh/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c index a9a13e229..c61ac7de1 100644 --- a/soh/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c +++ b/soh/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c @@ -600,7 +600,7 @@ void EnGoroiwa_Roll(EnGoroiwa* this, PlayState* play) { osSyncPrintf("Player ぶっ飛ばし\n"); // "Player knocked down" osSyncPrintf(VT_RST); onHitSetupFuncs[(this->actor.params >> 10) & 1](this); - func_8002F7DC(&GET_PLAYER(play)->actor, NA_SE_PL_BODY_HIT); + Player_PlaySfx(&GET_PLAYER(play)->actor, NA_SE_PL_BODY_HIT); if ((this->actor.home.rot.z & 1) == 1) { this->collisionDisabledTimer = 50; } @@ -682,7 +682,7 @@ void EnGoroiwa_MoveUp(EnGoroiwa* this, PlayState* play) { if (this->collider.base.atFlags & AT_HIT) { this->collider.base.atFlags &= ~AT_HIT; func_8002F6D4(play, &this->actor, 2.0f, this->actor.yawTowardsPlayer, 0.0f, 4); - func_8002F7DC(&GET_PLAYER(play)->actor, NA_SE_PL_BODY_HIT); + Player_PlaySfx(&GET_PLAYER(play)->actor, NA_SE_PL_BODY_HIT); if ((this->actor.home.rot.z & 1) == 1) { this->collisionDisabledTimer = 50; } @@ -707,7 +707,7 @@ void EnGoroiwa_MoveDown(EnGoroiwa* this, PlayState* play) { if (this->collider.base.atFlags & AT_HIT) { this->collider.base.atFlags &= ~AT_HIT; func_8002F6D4(play, &this->actor, 2.0f, this->actor.yawTowardsPlayer, 0.0f, 4); - func_8002F7DC(&GET_PLAYER(play)->actor, NA_SE_PL_BODY_HIT); + Player_PlaySfx(&GET_PLAYER(play)->actor, NA_SE_PL_BODY_HIT); if ((this->actor.home.rot.z & 1) == 1) { this->collisionDisabledTimer = 50; } diff --git a/soh/src/overlays/actors/ovl_En_Hs/z_en_hs.c b/soh/src/overlays/actors/ovl_En_Hs/z_en_hs.c index e264b0f60..246af740f 100644 --- a/soh/src/overlays/actors/ovl_En_Hs/z_en_hs.c +++ b/soh/src/overlays/actors/ovl_En_Hs/z_en_hs.c @@ -234,7 +234,7 @@ void func_80A6E8CC(EnHs* this, PlayState* play) { if (this->unk_2AA > 0) { this->unk_2AA--; if (this->unk_2AA == 0) { - func_8002F7DC(&player->actor, NA_SE_EV_CHICKEN_CRY_M); + Player_PlaySfx(&player->actor, NA_SE_EV_CHICKEN_CRY_M); } } diff --git a/soh/src/overlays/actors/ovl_En_Partner/z_en_partner.c b/soh/src/overlays/actors/ovl_En_Partner/z_en_partner.c index 60e0e8b48..4a2201ab7 100644 --- a/soh/src/overlays/actors/ovl_En_Partner/z_en_partner.c +++ b/soh/src/overlays/actors/ovl_En_Partner/z_en_partner.c @@ -279,7 +279,7 @@ void UseHammer(Actor* thisx, PlayState* play, u8 started) { Vec3f shockwavePos = this->actor.world.pos; func_808429B4(play, 27767, 7, 20); - func_8002F7DC(&this->actor, NA_SE_IT_HAMMER_HIT); + Player_PlaySfx(&this->actor, NA_SE_IT_HAMMER_HIT); EffectSsBlast_SpawnWhiteShockwave(play, &shockwavePos, &zeroVec, &zeroVec); diff --git a/soh/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/soh/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index daa6bbbdd..ecfdac68d 100644 --- a/soh/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/soh/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -352,7 +352,7 @@ void func_80AD97C8(EnPoSisters* this, PlayState* play) { f32 sp20; if (this->unk_195 == 0 || this->actionFunc != func_80ADAAA4) { - if ((player->swordState == 0 || player->meleeWeaponAnimation >= 24) && + if ((player->meleeWeaponState == 0 || player->meleeWeaponAnimation >= 24) && player->actor.world.pos.y - player->actor.floorHeight < 1.0f) { Math_StepToF(&this->unk_294, 110.0f, 3.0f); } else { diff --git a/soh/src/overlays/actors/ovl_En_Rd/z_en_rd.c b/soh/src/overlays/actors/ovl_En_Rd/z_en_rd.c index 20af34b46..6f36bea36 100644 --- a/soh/src/overlays/actors/ovl_En_Rd/z_en_rd.c +++ b/soh/src/overlays/actors/ovl_En_Rd/z_en_rd.c @@ -528,7 +528,7 @@ void func_80AE3454(EnRd* this, PlayState* play) { play->damagePlayer(play, -8); func_800AA000(this->actor.xzDistToPlayer, 0xF0, 1, 0xC); this->unk_319 = 20; - func_8002F7DC(&player->actor, NA_SE_VO_LI_DAMAGE_S + player->ageProperties->unk_92); + Player_PlaySfx(&player->actor, NA_SE_VO_LI_DAMAGE_S + player->ageProperties->unk_92); } break; case 3: diff --git a/soh/src/overlays/actors/ovl_En_Test/z_en_test.c b/soh/src/overlays/actors/ovl_En_Test/z_en_test.c index 1318f8999..f3a2c89f4 100644 --- a/soh/src/overlays/actors/ovl_En_Test/z_en_test.c +++ b/soh/src/overlays/actors/ovl_En_Test/z_en_test.c @@ -497,7 +497,7 @@ void EnTest_Idle(EnTest* this, PlayState* play) { yawDiff = player->actor.shape.rot.y - this->actor.shape.rot.y; if (this->actor.xzDistToPlayer < 100.0f) { - if ((player->swordState != 0) && (ABS(yawDiff) >= 0x1F40)) { + if ((player->meleeWeaponState != 0) && (ABS(yawDiff) >= 0x1F40)) { this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer; if (Rand_ZeroOne() > 0.7f && player->meleeWeaponAnimation != 0x11) { @@ -627,7 +627,7 @@ void EnTest_WalkAndBlock(EnTest* this, PlayState* play) { yawDiff = player->actor.shape.rot.y - this->actor.shape.rot.y; - if ((this->actor.xzDistToPlayer < 100.0f) && (player->swordState != 0)) { + if ((this->actor.xzDistToPlayer < 100.0f) && (player->meleeWeaponState != 0)) { if (ABS(yawDiff) >= 0x1F40) { this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer; @@ -921,9 +921,9 @@ void EnTest_SlashDown(EnTest* this, PlayState* play) { } if ((this->skelAnime.curFrame > 7.0f) && (this->skelAnime.curFrame < 11.0f)) { - this->swordState = 1; + this->meleeWeaponState = 1; } else { - this->swordState = 0; + this->meleeWeaponState = 0; } if (SkelAnime_Update(&this->skelAnime)) { @@ -1016,9 +1016,9 @@ void EnTest_SlashUp(EnTest* this, PlayState* play) { } if ((this->skelAnime.curFrame > 1.0f) && (this->skelAnime.curFrame < 8.0f)) { - this->swordState = 1; + this->meleeWeaponState = 1; } else { - this->swordState = 0; + this->meleeWeaponState = 0; } if (SkelAnime_Update(&this->skelAnime)) { @@ -1100,7 +1100,7 @@ void EnTest_Jumpslash(EnTest* this, PlayState* play) { if (this->timer == 0) { Animation_PlayOnce(&this->skelAnime, &gStalfosJumpslashAnim); this->timer = 1; - this->swordState = 1; + this->meleeWeaponState = 1; Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL_SAKEBI); Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL_JUMP); } else { @@ -1110,7 +1110,7 @@ void EnTest_Jumpslash(EnTest* this, PlayState* play) { } if ((this->timer != 0) && (this->skelAnime.curFrame >= 5.0f)) { - this->swordState = 0; + this->meleeWeaponState = 0; } if (this->actor.world.pos.y <= this->actor.floorHeight) { @@ -1237,7 +1237,7 @@ void func_808621D4(EnTest* this, PlayState* play) { } } - if (player->swordState != 0) { + if (player->meleeWeaponState != 0) { if ((this->actor.bgCheckFlags & 8) && ((ABS((s16)(this->actor.wallYaw - this->actor.shape.rot.y)) < 0x38A4) && (this->actor.xzDistToPlayer < 80.0f))) { EnTest_SetupJumpUp(this); @@ -1276,7 +1276,7 @@ void func_80862418(EnTest* this, PlayState* play) { } } - if (player->swordState != 0) { + if (player->meleeWeaponState != 0) { if ((this->actor.bgCheckFlags & 8) && ((ABS((s16)(this->actor.wallYaw - this->actor.shape.rot.y)) < 0x38A4) && (this->actor.xzDistToPlayer < 80.0f))) { EnTest_SetupJumpUp(this); @@ -1294,7 +1294,7 @@ void func_80862418(EnTest* this, PlayState* play) { void EnTest_SetupStunned(EnTest* this) { this->unk_7C8 = 0xB; this->unk_7DE = 0; - this->swordState = 0; + this->meleeWeaponState = 0; this->skelAnime.playSpeed = 0.0f; this->actor.speedXZ = -4.0f; @@ -1322,7 +1322,7 @@ void EnTest_Stunned(EnTest* this, PlayState* play) { if (this->actor.colorFilterTimer == 0) { if (this->actor.colChkInfo.health == 0) { func_80862FA8(this, play); - } else if (player->swordState != 0) { + } else if (player->meleeWeaponState != 0) { if ((this->actor.bgCheckFlags & 8) && ((ABS((s16)(this->actor.wallYaw - this->actor.shape.rot.y)) < 0x38A4) && (this->actor.xzDistToPlayer < 80.0f))) { @@ -1484,9 +1484,9 @@ void func_80862DBC(EnTest* this, PlayState* play) { BodyBreak_Alloc(&this->bodyBreak, 60, play); this->actor.home.rot.x = 0; - if (this->swordState >= 0) { + if (this->meleeWeaponState >= 0) { EffectBlure_AddSpace(Effect_GetByIndex(this->effectIndex)); - this->swordState = -1; + this->meleeWeaponState = -1; } this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; @@ -1593,7 +1593,7 @@ void func_8086318C(EnTest* this, PlayState* play) { } void EnTest_SetupRecoil(EnTest* this) { - this->swordState = 0; + this->meleeWeaponState = 0; this->skelAnime.moveFlags = 2; this->unk_7C8 = 0x13; this->skelAnime.playSpeed = -1.0f; @@ -1668,8 +1668,8 @@ void EnTest_UpdateDamage(EnTest* this, PlayState* play) { if ((this->actor.colChkInfo.damageEffect != STALFOS_DMGEFF_SLING) && (this->actor.colChkInfo.damageEffect != STALFOS_DMGEFF_FIREMAGIC)) { this->lastDamageEffect = this->actor.colChkInfo.damageEffect; - if (this->swordState >= 1) { - this->swordState = 0; + if (this->meleeWeaponState >= 1) { + this->meleeWeaponState = 0; } this->unk_7DC = player->unk_845; this->actor.world.rot.y = this->actor.yawTowardsPlayer; @@ -1801,7 +1801,7 @@ void EnTest_Update(Actor* thisx, PlayState* play) { } } - if (this->swordState >= 1) { + if (this->meleeWeaponState >= 1) { if (!(this->swordCollider.base.atFlags & AT_BOUNCED)) { CollisionCheck_SetAT(play, &play->colChkCtx, &this->swordCollider.base); } else { @@ -1883,12 +1883,12 @@ void EnTest_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot Matrix_MultVec3f(&D_80864664, &sp70); Matrix_MultVec3f(&D_80864670, &sp64); - if ((this->swordState >= 1) && + if ((this->meleeWeaponState >= 1) && ((this->actor.params != STALFOS_TYPE_INVISIBLE) || play->actorCtx.lensActive)) { EffectBlure_AddVertex(Effect_GetByIndex(this->effectIndex), &sp70, &sp64); - } else if (this->swordState >= 0) { + } else if (this->meleeWeaponState >= 0) { EffectBlure_AddSpace(Effect_GetByIndex(this->effectIndex)); - this->swordState = -1; + this->meleeWeaponState = -1; } } else if ((limbIndex == STALFOS_LIMB_SHIELD) && (this->unk_7DE != 0)) { diff --git a/soh/src/overlays/actors/ovl_En_Test/z_en_test.h b/soh/src/overlays/actors/ovl_En_Test/z_en_test.h index c8ed4d469..e48fd8a45 100644 --- a/soh/src/overlays/actors/ovl_En_Test/z_en_test.h +++ b/soh/src/overlays/actors/ovl_En_Test/z_en_test.h @@ -95,7 +95,7 @@ typedef struct EnTest { /* 0x7E8 */ s32 timer; /* 0x7EC */ f32 unk_7EC; /* 0x7F0 */ BodyBreak bodyBreak; - /* 0x808 */ s8 swordState; + /* 0x808 */ s8 meleeWeaponState; /* 0x80C */ s32 effectIndex; /* 0x810 */ ColliderCylinder bodyCollider; /* 0x85C */ ColliderQuad swordCollider; diff --git a/soh/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c b/soh/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c index 19ac29511..0a3172fd0 100644 --- a/soh/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c +++ b/soh/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c @@ -314,7 +314,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) { sStaggerTimer = 50; } } - if ((sCounterState != 0) && (this->swordState != 0)) { + if ((sCounterState != 0) && (this->meleeWeaponState != 0)) { CollisionCheck_SetAC(play, &play->colChkCtx, &this->meleeWeaponQuads[0].base); CollisionCheck_SetAC(play, &play->colChkCtx, &this->meleeWeaponQuads[1].base); } @@ -338,7 +338,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) { // Handles Dark Link's initial reaction to jumpslashes - if (((player->swordState != 0) || (player->actor.velocity.y > -3.0f)) && + if (((player->meleeWeaponState != 0) || (player->actor.velocity.y > -3.0f)) && (player->meleeWeaponAnimation == JUMPSLASH_START)) { this->actor.world.rot.y = this->actor.shape.rot.y = this->actor.yawTowardsPlayer; @@ -366,7 +366,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) { player->actor.world.pos.z, 1.0f, 5.0f, 0.0f); sSwordJumpTimer--; - if (((u32)sSwordJumpTimer == 0) || ((player->invincibilityTimer > 0) && (this->swordState == 0))) { + if (((u32)sSwordJumpTimer == 0) || ((player->invincibilityTimer > 0) && (this->meleeWeaponState == 0))) { this->actor.world.rot.y = this->actor.shape.rot.y = this->actor.yawTowardsPlayer; input->cur.button = BTN_A; player->stateFlags3 &= ~4; @@ -398,7 +398,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) { // Handles the reaction to a one-handed stab. If the conditions are satisfied, // Dark Link jumps on Link's sword. Otherwise he backflips away. - if ((this->swordState == 0) && (sCounterState == 0) && (player->invincibilityTimer == 0) && + if ((this->meleeWeaponState == 0) && (sCounterState == 0) && (player->invincibilityTimer == 0) && (player->meleeWeaponAnimation == STAB_1H) && (this->actor.xzDistToPlayer <= 85.0f) && Actor_IsTargeted(play, &this->actor)) { @@ -407,7 +407,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) { player->stateFlags3 |= 4; this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; sSwordJumpTimer = 27; - player->swordState = 0; + player->meleeWeaponState = 0; player->linearVelocity = 0.0f; this->invincibilityTimer = -7; this->linearVelocity = 0.0f; @@ -440,8 +440,8 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) { } else { EnTorch2_Backflip(this, input, &this->actor); } - if (!CHECK_BTN_ANY(input->cur.button, BTN_A | BTN_R) && (this->swordState == 0) && - (player->swordState != 0)) { + if (!CHECK_BTN_ANY(input->cur.button, BTN_A | BTN_R) && (this->meleeWeaponState == 0) && + (player->meleeWeaponState != 0)) { sCounterState = 1; } } @@ -455,9 +455,9 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) { (ABS(sp5A) >= 0x7800) && (this->actor.isTargeted || !(player->stateFlags1 & 0x00400000))) { EnTorch2_SwingSword(play, input, this); } else if (((this->actor.xzDistToPlayer <= 70.0f) || - ((this->actor.xzDistToPlayer <= 80.0f + sp50) && (player->swordState != 0))) && - (this->swordState == 0)) { - if (!EnTorch2_SwingSword(play, input, this) && (this->swordState == 0) && + ((this->actor.xzDistToPlayer <= 80.0f + sp50) && (player->meleeWeaponState != 0))) && + (this->meleeWeaponState == 0)) { + if (!EnTorch2_SwingSword(play, input, this) && (this->meleeWeaponState == 0) && (sCounterState == 0)) { EnTorch2_Backflip(this, input, &this->actor); } @@ -468,7 +468,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) { Math_SmoothStepToS(&sStickAngle, player->actor.shape.rot.y + 0x7FFF, 1, 0x2328, 0); } } else if (this->actor.xzDistToPlayer > 100.0f + sp50) { - if ((player->swordState == 0) || (player->meleeWeaponAnimation < SPIN_ATTACK_1H) || + if ((player->meleeWeaponState == 0) || (player->meleeWeaponAnimation < SPIN_ATTACK_1H) || (player->meleeWeaponAnimation > BIG_SPIN_2H) || (this->actor.xzDistToPlayer >= 280.0f)) { sStickTilt = 127.0f; sStickAngle = this->actor.yawTowardsPlayer; @@ -520,7 +520,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) { break; case ENTORCH2_DAMAGE: - this->swordState = 0; + this->meleeWeaponState = 0; input->cur.stick_x = input->cur.stick_y = 0; if ((this->invincibilityTimer > 0) && (this->actor.world.pos.y < (this->actor.floorHeight - 160.0f))) { this->stateFlags3 &= ~1; @@ -568,7 +568,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) { // Causes Dark Link to shield in place when Link is using magic attacks other than the spin attack - if ((gSaveContext.magicState == 3) && (player->swordState == 0 || (player->meleeWeaponAnimation < SPIN_ATTACK_1H) || + if ((gSaveContext.magicState == 3) && (player->meleeWeaponState == 0 || (player->meleeWeaponAnimation < SPIN_ATTACK_1H) || (player->meleeWeaponAnimation > BIG_SPIN_2H))) { sStickTilt = 0.0f; input->cur.stick_x = 0; @@ -586,7 +586,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) { pad54 = input->prev.button ^ input->cur.button; input->press.button = input->cur.button & pad54; if (CHECK_BTN_ANY(input->cur.button, BTN_R)) { - input->cur.button = ((sCounterState == 0) && (this->swordState == 0)) ? BTN_R : input->cur.button ^ BTN_R; + input->cur.button = ((sCounterState == 0) && (this->meleeWeaponState == 0)) ? BTN_R : input->cur.button ^ BTN_R; } input->rel.button = input->prev.button & pad54; input->prev.button = input->cur.button & (u16) ~(BTN_A | BTN_B); @@ -711,11 +711,11 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) { * This ensures Dark Link's counter animation mirrors Link's exactly. */ if ((sCounterState != 0) && (sCounterState == 1)) { - if (this->swordState == 0) { + if (this->meleeWeaponState == 0) { sCounterState = 0; } else { sCounterState = 2; - this->swordState = 1; + this->meleeWeaponState = 1; this->skelAnime.curFrame = player->skelAnime.curFrame - player->skelAnime.playSpeed; this->skelAnime.playSpeed = player->skelAnime.playSpeed; LinkAnimation_Update(play, &this->skelAnime); @@ -772,13 +772,13 @@ s32 EnTorch2_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f Gfx** gfx) { Player* this = (Player*)thisx; - return func_8008FCC8(play, limbIndex, dList, pos, rot, &this->actor); + return Player_OverrideLimbDrawGameplayCommon(play, limbIndex, dList, pos, rot, &this->actor); } void EnTorch2_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfx) { Player* this = (Player*)thisx; - func_80090D20(play, limbIndex, dList, rot, &this->actor); + Player_PostLimbDrawGameplay(play, limbIndex, dList, rot, &this->actor); } void EnTorch2_Draw(Actor* thisx, PlayState* play2) { diff --git a/soh/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/soh/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c index 88c890263..965c5b7af 100644 --- a/soh/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/soh/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -450,9 +450,9 @@ void EnWallmas_TakePlayer(EnWallmas* this, PlayState* play) { if (Animation_OnFrame(&this->skelAnime, 1.0f) != 0) { if (!LINK_IS_ADULT) { - func_8002F7DC(&this->actor, NA_SE_VO_LI_DAMAGE_S_KID); + Player_PlaySfx(&this->actor, NA_SE_VO_LI_DAMAGE_S_KID); } else { - func_8002F7DC(&this->actor, NA_SE_VO_LI_DAMAGE_S); + Player_PlaySfx(&this->actor, NA_SE_VO_LI_DAMAGE_S); } Audio_PlayActorSound2(&this->actor, NA_SE_EN_FALL_CATCH); @@ -475,9 +475,9 @@ void EnWallmas_TakePlayer(EnWallmas* this, PlayState* play) { if (this->timer == -0x1E) { if (!LINK_IS_ADULT) { - func_8002F7DC(&this->actor, NA_SE_VO_LI_TAKEN_AWAY_KID); + Player_PlaySfx(&this->actor, NA_SE_VO_LI_TAKEN_AWAY_KID); } else { - func_8002F7DC(&this->actor, NA_SE_VO_LI_TAKEN_AWAY); + Player_PlaySfx(&this->actor, NA_SE_VO_LI_TAKEN_AWAY); } } if (this->timer == 0) { diff --git a/soh/src/overlays/actors/ovl_En_Wf/z_en_wf.c b/soh/src/overlays/actors/ovl_En_Wf/z_en_wf.c index 73ccde6bb..9ebac2a90 100644 --- a/soh/src/overlays/actors/ovl_En_Wf/z_en_wf.c +++ b/soh/src/overlays/actors/ovl_En_Wf/z_en_wf.c @@ -461,7 +461,7 @@ void EnWf_Wait(EnWf* this, PlayState* play) { angle = player->actor.shape.rot.y - this->actor.shape.rot.y; angle = ABS(angle); - if ((this->actor.xzDistToPlayer < 80.0f) && (player->swordState != 0) && (angle >= 0x1F40)) { + if ((this->actor.xzDistToPlayer < 80.0f) && (player->meleeWeaponState != 0) && (angle >= 0x1F40)) { this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer; EnWf_SetupRunAroundPlayer(this); } else { @@ -522,7 +522,7 @@ void EnWf_RunAtPlayer(EnWf* this, PlayState* play) { playerFacingAngleDiff = player->actor.shape.rot.y - this->actor.shape.rot.y; playerFacingAngleDiff = ABS(playerFacingAngleDiff); - if ((this->actor.xzDistToPlayer < (150.0f + baseRange)) && (player->swordState != 0) && + if ((this->actor.xzDistToPlayer < (150.0f + baseRange)) && (player->meleeWeaponState != 0) && (playerFacingAngleDiff >= 8000)) { this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer; diff --git a/soh/src/overlays/actors/ovl_En_Zf/z_en_zf.c b/soh/src/overlays/actors/ovl_En_Zf/z_en_zf.c index cd187518b..9aa8204dd 100644 --- a/soh/src/overlays/actors/ovl_En_Zf/z_en_zf.c +++ b/soh/src/overlays/actors/ovl_En_Zf/z_en_zf.c @@ -721,7 +721,7 @@ void func_80B4543C(EnZf* this, PlayState* play) { angleToPlayer = player->actor.shape.rot.y - this->actor.shape.rot.y; angleToPlayer = ABS(angleToPlayer); - if ((this->actor.xzDistToPlayer < 100.0f) && (player->swordState != 0) && (angleToPlayer >= 0x1F40)) { + if ((this->actor.xzDistToPlayer < 100.0f) && (player->meleeWeaponState != 0) && (angleToPlayer >= 0x1F40)) { this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer; func_80B483E4(this, play); } else if (this->unk_3F0 != 0) { @@ -838,7 +838,7 @@ void EnZf_ApproachPlayer(EnZf* this, PlayState* play) { temp_v1 = player->actor.shape.rot.y - this->actor.shape.rot.y; temp_v1 = ABS(temp_v1); - if ((sp48 == this->curPlatform) && (this->actor.xzDistToPlayer < 150.0f) && (player->swordState != 0) && + if ((sp48 == this->curPlatform) && (this->actor.xzDistToPlayer < 150.0f) && (player->meleeWeaponState != 0) && (temp_v1 >= 0x1F40)) { this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer; diff --git a/soh/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c b/soh/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c index f21c52359..4a5759862 100644 --- a/soh/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c +++ b/soh/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c @@ -422,7 +422,7 @@ void func_80B4BBC4(EnZl1* this, PlayState* play) { Animation_Change(&this->skelAnime, &gChildZelda1Anim_00438, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP, 0.0f); func_8002DF54(play, &this->actor, 1); - func_8002F7DC(&player->actor, NA_SE_VO_LI_SURPRISE_KID); + Player_PlaySfx(&player->actor, NA_SE_VO_LI_SURPRISE_KID); this->actor.textId = 0x7039; Message_StartTextbox(play, this->actor.textId, NULL); this->unk_1E2 = 0; diff --git a/soh/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c b/soh/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c index 6d67f1706..75be6e0bc 100644 --- a/soh/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c +++ b/soh/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c @@ -109,7 +109,7 @@ void MagicFire_UpdateBeforeCast(Actor* thisx, PlayState* play) { this->actionTimer--; } else { this->actor.update = MagicFire_Update; - func_8002F7DC(&player->actor, NA_SE_PL_MAGIC_FIRE); + Player_PlaySfx(&player->actor, NA_SE_PL_MAGIC_FIRE); } this->actor.world.pos = player->actor.world.pos; } diff --git a/soh/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c b/soh/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c index 519567ac4..90ca0e269 100644 --- a/soh/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c +++ b/soh/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c @@ -62,7 +62,7 @@ void MagicWind_Init(Actor* thisx, PlayState* play) { MagicWind_SetupAction(this, MagicWind_Shrink); // "Means start" LOG_STRING("表示開始"); - func_8002F7DC(&player->actor, NA_SE_PL_MAGIC_WIND_WARP); + Player_PlaySfx(&player->actor, NA_SE_PL_MAGIC_WIND_WARP); break; } } @@ -95,7 +95,7 @@ void MagicWind_WaitForTimer(MagicWind* this, PlayState* play) { // "Means start" LOG_STRING("表示開始"); - func_8002F7DC(&player->actor, NA_SE_PL_MAGIC_WIND_NORMAL); + Player_PlaySfx(&player->actor, NA_SE_PL_MAGIC_WIND_NORMAL); MagicWind_UpdateAlpha(1.0f); MagicWind_SetupAction(this, MagicWind_Grow); SkelCurve_Update(play, &this->skelCurve); diff --git a/soh/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c b/soh/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c index 4786c0f4f..70ae15fd8 100644 --- a/soh/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c +++ b/soh/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c @@ -223,7 +223,7 @@ void ObjKibako_Idle(ObjKibako* this, PlayState* play) { void ObjKibako_SetupHeld(ObjKibako* this) { this->actionFunc = ObjKibako_Held; this->actor.room = -1; - func_8002F7DC(&this->actor, NA_SE_PL_PULL_UP_WOODBOX); + Player_PlaySfx(&this->actor, NA_SE_PL_PULL_UP_WOODBOX); } void ObjKibako_Held(ObjKibako* this, PlayState* play) { diff --git a/soh/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c b/soh/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c index 572825e09..1bfb45ed2 100644 --- a/soh/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c +++ b/soh/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c @@ -176,7 +176,7 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2) { if (dmgFlags & 0x20820) { interactionType = 1; } - } else if (player->heldItemAction == PLAYER_IA_STICK) { + } else if (player->heldItemAction == PLAYER_IA_DEKU_STICK) { Math_Vec3f_Diff(&player->meleeWeaponInfo[0].tip, &this->actor.world.pos, &tipToFlame); tipToFlame.y -= 67.0f; if ((SQ(tipToFlame.x) + SQ(tipToFlame.y) + SQ(tipToFlame.z)) < SQ(20.0f)) { diff --git a/soh/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c b/soh/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c index ddbba63ae..6cecb0fa7 100644 --- a/soh/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c +++ b/soh/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c @@ -283,7 +283,7 @@ void ObjTsubo_Idle(ObjTsubo* this, PlayState* play) { void ObjTsubo_SetupLiftedUp(ObjTsubo* this) { this->actionFunc = ObjTsubo_LiftedUp; this->actor.room = -1; - func_8002F7DC(&this->actor, NA_SE_PL_PULL_UP_POT); + Player_PlaySfx(&this->actor, NA_SE_PL_PULL_UP_POT); this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED; } diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index 7b45e6f54..4023f6449 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -258,7 +258,7 @@ void func_8084FB10(Player* this, PlayState* play); void func_8084FBF4(Player* this, PlayState* play); s32 func_8084FCAC(Player* this, PlayState* play); void func_8084FF7C(Player* this); -void func_8085002C(Player* this); +void Player_UpdateBunnyEars(Player* this); s32 func_80850224(Player* this, PlayState* play); void func_808502D0(Player* this, PlayState* play); void func_808505DC(Player* this, PlayState* play); @@ -497,7 +497,7 @@ static u16 D_8085361C[] = { }; static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX] = { - /* PLAYER_ANIMGROUP_0 */ + /* PLAYER_ANIMGROUP_wait */ { &gPlayerAnim_link_normal_wait_free, &gPlayerAnim_link_normal_wait, @@ -506,7 +506,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_wait_free, &gPlayerAnim_link_normal_wait_free, }, - /* PLAYER_ANIMGROUP_1 */ + /* PLAYER_ANIMGROUP_walk */ { &gPlayerAnim_link_normal_walk_free, &gPlayerAnim_link_normal_walk, @@ -515,7 +515,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_walk_free, &gPlayerAnim_link_normal_walk_free, }, - /* PLAYER_ANIMGROUP_2 */ + /* PLAYER_ANIMGROUP_run */ { &gPlayerAnim_link_normal_run_free, &gPlayerAnim_link_fighter_run, @@ -524,7 +524,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_run_free, &gPlayerAnim_link_normal_run_free, }, - /* PLAYER_ANIMGROUP_3 */ + /* PLAYER_ANIMGROUP_damage_run */ { &gPlayerAnim_link_normal_damage_run_free, &gPlayerAnim_link_fighter_damage_run, @@ -533,7 +533,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_damage_run_free, &gPlayerAnim_link_normal_damage_run_free, }, - /* PLAYER_ANIMGROUP_4 */ + /* PLAYER_ANIMGROUP_heavy_run */ { &gPlayerAnim_link_normal_heavy_run_free, &gPlayerAnim_link_normal_heavy_run, @@ -542,7 +542,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_heavy_run_free, &gPlayerAnim_link_normal_heavy_run_free, }, - /* PLAYER_ANIMGROUP_5 */ + /* PLAYER_ANIMGROUP_waitL */ { &gPlayerAnim_link_normal_waitL_free, &gPlayerAnim_link_anchor_waitL, @@ -551,7 +551,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_waitL_free, &gPlayerAnim_link_normal_waitL_free, }, - /* PLAYER_ANIMGROUP_6 */ + /* PLAYER_ANIMGROUP_waitR */ { &gPlayerAnim_link_normal_waitR_free, &gPlayerAnim_link_anchor_waitR, @@ -560,7 +560,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_waitR_free, &gPlayerAnim_link_normal_waitR_free, }, - /* PLAYER_ANIMGROUP_7 */ + /* PLAYER_ANIMGROUP_wait2waitR */ { &gPlayerAnim_link_fighter_wait2waitR_long, &gPlayerAnim_link_normal_wait2waitR, @@ -569,7 +569,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_fighter_wait2waitR_long, &gPlayerAnim_link_fighter_wait2waitR_long, }, - /* PLAYER_ANIMGROUP_8 */ + /* PLAYER_ANIMGROUP_normal2fighter */ { &gPlayerAnim_link_normal_normal2fighter_free, &gPlayerAnim_link_fighter_normal2fighter, @@ -578,7 +578,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_normal2fighter_free, &gPlayerAnim_link_normal_normal2fighter_free, }, - /* PLAYER_ANIMGROUP_9 */ + /* PLAYER_ANIMGROUP_doorA_free */ { &gPlayerAnim_link_demo_doorA_link_free, &gPlayerAnim_link_demo_doorA_link, @@ -587,7 +587,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_demo_doorA_link_free, &gPlayerAnim_link_demo_doorA_link_free, }, - /* PLAYER_ANIMGROUP_10 */ + /* PLAYER_ANIMGROUP_doorA */ { &gPlayerAnim_clink_demo_doorA_link, &gPlayerAnim_clink_demo_doorA_link, @@ -596,7 +596,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_clink_demo_doorA_link, &gPlayerAnim_clink_demo_doorA_link, }, - /* PLAYER_ANIMGROUP_11 */ + /* PLAYER_ANIMGROUP_doorB_free */ { &gPlayerAnim_link_demo_doorB_link_free, &gPlayerAnim_link_demo_doorB_link, @@ -605,7 +605,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_demo_doorB_link_free, &gPlayerAnim_link_demo_doorB_link_free, }, - /* PLAYER_ANIMGROUP_12 */ + /* PLAYER_ANIMGROUP_doorB */ { &gPlayerAnim_clink_demo_doorB_link, &gPlayerAnim_clink_demo_doorB_link, @@ -614,7 +614,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_clink_demo_doorB_link, &gPlayerAnim_clink_demo_doorB_link, }, - /* PLAYER_ANIMGROUP_13 */ + /* PLAYER_ANIMGROUP_carryB */ { &gPlayerAnim_link_normal_carryB_free, &gPlayerAnim_link_normal_carryB, @@ -623,7 +623,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_carryB_free, &gPlayerAnim_link_normal_carryB_free, }, - /* PLAYER_ANIMGROUP_14 */ + /* PLAYER_ANIMGROUP_landing */ { &gPlayerAnim_link_normal_landing_free, &gPlayerAnim_link_normal_landing, @@ -632,7 +632,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_landing_free, &gPlayerAnim_link_normal_landing_free, }, - /* PLAYER_ANIMGROUP_15 */ + /* PLAYER_ANIMGROUP_short_landing */ { &gPlayerAnim_link_normal_short_landing_free, &gPlayerAnim_link_normal_short_landing, @@ -641,7 +641,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_short_landing_free, &gPlayerAnim_link_normal_short_landing_free, }, - /* PLAYER_ANIMGROUP_16 */ + /* PLAYER_ANIMGROUP_landing_roll */ { &gPlayerAnim_link_normal_landing_roll_free, &gPlayerAnim_link_normal_landing_roll, @@ -650,7 +650,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_landing_roll_free, &gPlayerAnim_link_normal_landing_roll_free, }, - /* PLAYER_ANIMGROUP_17 */ + /* PLAYER_ANIMGROUP_hip_down */ { &gPlayerAnim_link_normal_hip_down_free, &gPlayerAnim_link_normal_hip_down, @@ -659,7 +659,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_hip_down_free, &gPlayerAnim_link_normal_hip_down_free, }, - /* PLAYER_ANIMGROUP_18 */ + /* PLAYER_ANIMGROUP_walk_endL */ { &gPlayerAnim_link_normal_walk_endL_free, &gPlayerAnim_link_normal_walk_endL, @@ -668,7 +668,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_walk_endL_free, &gPlayerAnim_link_normal_walk_endL_free, }, - /* PLAYER_ANIMGROUP_19 */ + /* PLAYER_ANIMGROUP_walk_endR */ { &gPlayerAnim_link_normal_walk_endR_free, &gPlayerAnim_link_normal_walk_endR, @@ -677,7 +677,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_walk_endR_free, &gPlayerAnim_link_normal_walk_endR_free, }, - /* PLAYER_ANIMGROUP_20 */ + /* PLAYER_ANIMGROUP_defense */ { &gPlayerAnim_link_normal_defense_free, &gPlayerAnim_link_normal_defense, @@ -686,7 +686,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_bow_defense, &gPlayerAnim_link_normal_defense_free, }, - /* PLAYER_ANIMGROUP_21 */ + /* PLAYER_ANIMGROUP_defense_wait */ { &gPlayerAnim_link_normal_defense_wait_free, &gPlayerAnim_link_normal_defense_wait, @@ -695,7 +695,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_bow_defense_wait, &gPlayerAnim_link_normal_defense_wait_free, }, - /* PLAYER_ANIMGROUP_22 */ + /* PLAYER_ANIMGROUP_defense_end */ { &gPlayerAnim_link_normal_defense_end_free, &gPlayerAnim_link_normal_defense_end, @@ -704,7 +704,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_defense_end_free, &gPlayerAnim_link_normal_defense_end_free, }, - /* PLAYER_ANIMGROUP_23 */ + /* PLAYER_ANIMGROUP_side_walk */ { &gPlayerAnim_link_normal_side_walk_free, &gPlayerAnim_link_normal_side_walk, @@ -713,7 +713,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_side_walk_free, &gPlayerAnim_link_normal_side_walk_free, }, - /* PLAYER_ANIMGROUP_24 */ + /* PLAYER_ANIMGROUP_side_walkL */ { &gPlayerAnim_link_normal_side_walkL_free, &gPlayerAnim_link_anchor_side_walkL, @@ -722,7 +722,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_side_walkL_free, &gPlayerAnim_link_normal_side_walkL_free, }, - /* PLAYER_ANIMGROUP_25 */ + /* PLAYER_ANIMGROUP_side_walkR */ { &gPlayerAnim_link_normal_side_walkR_free, &gPlayerAnim_link_anchor_side_walkR, @@ -731,7 +731,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_side_walkR_free, &gPlayerAnim_link_normal_side_walkR_free, }, - /* PLAYER_ANIMGROUP_26 */ + /* PLAYER_ANIMGROUP_45_turn */ { &gPlayerAnim_link_normal_45_turn_free, &gPlayerAnim_link_normal_45_turn, @@ -740,7 +740,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_45_turn_free, &gPlayerAnim_link_normal_45_turn_free, }, - /* PLAYER_ANIMGROUP_27 */ + /* PLAYER_ANIMGROUP_waitL2wait */ { &gPlayerAnim_link_fighter_waitL2wait_long, &gPlayerAnim_link_normal_waitL2wait, @@ -749,7 +749,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_fighter_waitL2wait_long, &gPlayerAnim_link_fighter_waitL2wait_long, }, - /* PLAYER_ANIMGROUP_28 */ + /* PLAYER_ANIMGROUP_waitR2wait */ { &gPlayerAnim_link_fighter_waitR2wait_long, &gPlayerAnim_link_normal_waitR2wait, @@ -758,7 +758,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_fighter_waitR2wait_long, &gPlayerAnim_link_fighter_waitR2wait_long, }, - /* PLAYER_ANIMGROUP_29 */ + /* PLAYER_ANIMGROUP_throw */ { &gPlayerAnim_link_normal_throw_free, &gPlayerAnim_link_normal_throw, @@ -767,7 +767,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_throw_free, &gPlayerAnim_link_normal_throw_free, }, - /* PLAYER_ANIMGROUP_30 */ + /* PLAYER_ANIMGROUP_put */ { &gPlayerAnim_link_normal_put_free, &gPlayerAnim_link_normal_put, @@ -776,7 +776,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_put_free, &gPlayerAnim_link_normal_put_free, }, - /* PLAYER_ANIMGROUP_31 */ + /* PLAYER_ANIMGROUP_back_walk */ { &gPlayerAnim_link_normal_back_walk, &gPlayerAnim_link_normal_back_walk, @@ -785,7 +785,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_back_walk, &gPlayerAnim_link_normal_back_walk, }, - /* PLAYER_ANIMGROUP_32 */ + /* PLAYER_ANIMGROUP_check */ { &gPlayerAnim_link_normal_check_free, &gPlayerAnim_link_normal_check, @@ -794,7 +794,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_check_free, &gPlayerAnim_link_normal_check_free, }, - /* PLAYER_ANIMGROUP_33 */ + /* PLAYER_ANIMGROUP_check_wait */ { &gPlayerAnim_link_normal_check_wait_free, &gPlayerAnim_link_normal_check_wait, @@ -803,7 +803,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_check_wait_free, &gPlayerAnim_link_normal_check_wait_free, }, - /* PLAYER_ANIMGROUP_34 */ + /* PLAYER_ANIMGROUP_check_end */ { &gPlayerAnim_link_normal_check_end_free, &gPlayerAnim_link_normal_check_end, @@ -812,7 +812,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_check_end_free, &gPlayerAnim_link_normal_check_end_free, }, - /* PLAYER_ANIMGROUP_35 */ + /* PLAYER_ANIMGROUP_pull_start */ { &gPlayerAnim_link_normal_pull_start_free, &gPlayerAnim_link_normal_pull_start, @@ -821,7 +821,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_pull_start_free, &gPlayerAnim_link_normal_pull_start_free, }, - /* PLAYER_ANIMGROUP_36 */ + /* PLAYER_ANIMGROUP_pulling */ { &gPlayerAnim_link_normal_pulling_free, &gPlayerAnim_link_normal_pulling, @@ -830,7 +830,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_pulling_free, &gPlayerAnim_link_normal_pulling_free, }, - /* PLAYER_ANIMGROUP_37 */ + /* PLAYER_ANIMGROUP_pull_end */ { &gPlayerAnim_link_normal_pull_end_free, &gPlayerAnim_link_normal_pull_end, @@ -839,7 +839,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_pull_end_free, &gPlayerAnim_link_normal_pull_end_free, }, - /* PLAYER_ANIMGROUP_38 */ + /* PLAYER_ANIMGROUP_fall_up */ { &gPlayerAnim_link_normal_fall_up_free, &gPlayerAnim_link_normal_fall_up, @@ -848,7 +848,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_fall_up_free, &gPlayerAnim_link_normal_fall_up_free, }, - /* PLAYER_ANIMGROUP_39 */ + /* PLAYER_ANIMGROUP_jump_climb_hold */ { &gPlayerAnim_link_normal_jump_climb_hold_free, &gPlayerAnim_link_normal_jump_climb_hold, @@ -857,7 +857,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_jump_climb_hold_free, &gPlayerAnim_link_normal_jump_climb_hold_free, }, - /* PLAYER_ANIMGROUP_40 */ + /* PLAYER_ANIMGROUP_jump_climb_wait */ { &gPlayerAnim_link_normal_jump_climb_wait_free, &gPlayerAnim_link_normal_jump_climb_wait, @@ -866,7 +866,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_jump_climb_wait_free, &gPlayerAnim_link_normal_jump_climb_wait_free, }, - /* PLAYER_ANIMGROUP_41 */ + /* PLAYER_ANIMGROUP_jump_climb_up */ { &gPlayerAnim_link_normal_jump_climb_up_free, &gPlayerAnim_link_normal_jump_climb_up, @@ -875,7 +875,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_jump_climb_up_free, &gPlayerAnim_link_normal_jump_climb_up_free, }, - /* PLAYER_ANIMGROUP_42 */ + /* PLAYER_ANIMGROUP_down_slope_slip_end */ { &gPlayerAnim_link_normal_down_slope_slip_end_free, &gPlayerAnim_link_normal_down_slope_slip_end, @@ -884,7 +884,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_down_slope_slip_end_free, &gPlayerAnim_link_normal_down_slope_slip_end_free, }, - /* PLAYER_ANIMGROUP_43 */ + /* PLAYER_ANIMGROUP_up_slope_slip_end */ { &gPlayerAnim_link_normal_up_slope_slip_end_free, &gPlayerAnim_link_normal_up_slope_slip_end, @@ -893,7 +893,7 @@ static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX][PLAYER_ANIMTYPE_MAX &gPlayerAnim_link_normal_up_slope_slip_end_free, &gPlayerAnim_link_normal_up_slope_slip_end_free, }, - /* PLAYER_ANIMGROUP_44 */ + /* PLAYER_ANIMGROUP_nwait */ { &gPlayerAnim_sude_nwait, &gPlayerAnim_lkt_nwait, @@ -990,23 +990,23 @@ static u8 D_80853E7C[] = { // Used to map item IDs to action params static s8 sItemActionParams[] = { - PLAYER_IA_STICK, - PLAYER_IA_NUT, + PLAYER_IA_DEKU_STICK, + PLAYER_IA_DEKU_NUT, PLAYER_IA_BOMB, PLAYER_IA_BOW, PLAYER_IA_BOW_FIRE, PLAYER_IA_DINS_FIRE, PLAYER_IA_SLINGSHOT, PLAYER_IA_OCARINA_FAIRY, - PLAYER_IA_OCARINA_TIME, + PLAYER_IA_OCARINA_OF_TIME, PLAYER_IA_BOMBCHU, PLAYER_IA_HOOKSHOT, PLAYER_IA_LONGSHOT, PLAYER_IA_BOW_ICE, PLAYER_IA_FARORES_WIND, PLAYER_IA_BOOMERANG, - PLAYER_IA_LENS, - PLAYER_IA_BEAN, + PLAYER_IA_LENS_OF_TRUTH, + PLAYER_IA_MAGIC_BEAN, PLAYER_IA_HAMMER, PLAYER_IA_BOW_LIGHT, PLAYER_IA_NAYRUS_LOVE, @@ -1016,8 +1016,8 @@ static s8 sItemActionParams[] = { PLAYER_IA_BOTTLE_POTION_BLUE, PLAYER_IA_BOTTLE_FAIRY, PLAYER_IA_BOTTLE_FISH, - PLAYER_IA_BOTTLE_MILK, - PLAYER_IA_BOTTLE_LETTER, + PLAYER_IA_BOTTLE_MILK_FULL, + PLAYER_IA_BOTTLE_RUTOS_LETTER, PLAYER_IA_BOTTLE_FIRE, PLAYER_IA_BOTTLE_BUG, PLAYER_IA_BOTTLE_BIG_POE, @@ -1025,11 +1025,11 @@ static s8 sItemActionParams[] = { PLAYER_IA_BOTTLE_POE, PLAYER_IA_WEIRD_EGG, PLAYER_IA_CHICKEN, - PLAYER_IA_LETTER_ZELDA, + PLAYER_IA_ZELDAS_LETTER, PLAYER_IA_MASK_KEATON, PLAYER_IA_MASK_SKULL, PLAYER_IA_MASK_SPOOKY, - PLAYER_IA_MASK_BUNNY, + PLAYER_IA_MASK_BUNNY_HOOD, PLAYER_IA_MASK_GORON, PLAYER_IA_MASK_ZORA, PLAYER_IA_MASK_GERUDO, @@ -1040,8 +1040,8 @@ static s8 sItemActionParams[] = { PLAYER_IA_COJIRO, PLAYER_IA_ODD_MUSHROOM, PLAYER_IA_ODD_POTION, - PLAYER_IA_SAW, - PLAYER_IA_SWORD_BROKEN, + PLAYER_IA_POACHERS_SAW, + PLAYER_IA_BROKEN_GORONS_SWORD, PLAYER_IA_PRESCRIPTION, PLAYER_IA_FROG, PLAYER_IA_EYEDROPS, @@ -1051,7 +1051,7 @@ static s8 sItemActionParams[] = { PLAYER_IA_BOW_LIGHT, PLAYER_IA_SWORD_KOKIRI, PLAYER_IA_SWORD_MASTER, - PLAYER_IA_SWORD_BGS, + PLAYER_IA_SWORD_BIGGORON, PLAYER_IA_SHIELD_DEKU, PLAYER_IA_SHIELD_HYLIAN, PLAYER_IA_SHIELD_MIRROR, @@ -1286,14 +1286,14 @@ static LinkAnimationHeader* D_808543D4[] = { }; // return type can't be void due to regalloc in func_8084FCAC -void func_80832210(Player* this) { +void Player_ZeroSpeedXZ(Player* this) { this->actor.speedXZ = 0.0f; this->linearVelocity = 0.0f; } // return type can't be void due to regalloc in func_8083F72C void func_80832224(Player* this) { - func_80832210(this); + Player_ZeroSpeedXZ(this); this->unk_6AD = 0; } @@ -1326,7 +1326,7 @@ void func_808322FC(Player* this) { void func_80832318(Player* this) { this->stateFlags2 &= ~PLAYER_STATE2_SPIN_ATTACKING; - this->swordState = 0; + this->meleeWeaponState = 0; this->meleeWeaponInfo[0].active = this->meleeWeaponInfo[1].active = this->meleeWeaponInfo[2].active = 0; } @@ -1420,7 +1420,7 @@ void func_80832630(PlayState* play) { } } -void func_8083264C(Player* this, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { +void Player_RequestRumble(Player* this, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { if (this->actor.category == ACTORCAT_PLAYER) { func_800AA000(arg4, arg1, arg2, arg3); } @@ -1428,7 +1428,7 @@ void func_8083264C(Player* this, s32 arg1, s32 arg2, s32 arg3, s32 arg4) { void func_80832698(Player* this, u16 sfxId) { if (this->actor.category == ACTORCAT_PLAYER) { - func_8002F7DC(&this->actor, sfxId + this->ageProperties->unk_92); + Player_PlaySfx(&this->actor, sfxId + this->ageProperties->unk_92); } else { func_800F4190(&this->actor.projectedPos, sfxId); } @@ -1449,7 +1449,7 @@ u16 func_8083275C(Player* this, u16 sfxId) { } void func_80832770(Player* this, u16 sfxId) { - func_8002F7DC(&this->actor, func_8083275C(this, sfxId)); + Player_PlaySfx(&this->actor, func_8083275C(this, sfxId)); } u16 func_808327A4(Player* this, u16 sfxId) { @@ -1457,7 +1457,7 @@ u16 func_808327A4(Player* this, u16 sfxId) { } void func_808327C4(Player* this, u16 sfxId) { - func_8002F7DC(&this->actor, func_808327A4(this, sfxId)); + Player_PlaySfx(&this->actor, func_808327A4(this, sfxId)); } void func_808327F8(Player* this, f32 arg1) { @@ -1487,7 +1487,7 @@ void func_80832854(Player* this) { sfxId = func_808327A4(this, NA_SE_PL_JUMP); } - func_8002F7DC(&this->actor, sfxId); + Player_PlaySfx(&this->actor, sfxId); } void func_808328A0(Player* this) { @@ -1499,11 +1499,11 @@ void func_808328A0(Player* this) { sfxId = func_808327A4(this, NA_SE_PL_LAND); } - func_8002F7DC(&this->actor, sfxId); + Player_PlaySfx(&this->actor, sfxId); } void func_808328EC(Player* this, u16 sfxId) { - func_8002F7DC(&this->actor, sfxId); + Player_PlaySfx(&this->actor, sfxId); this->stateFlags2 |= PLAYER_STATE2_FOOTSTEP; } @@ -1518,7 +1518,7 @@ void func_80832924(Player* this, struct_80832924* entry) { flags = data & 0x7800; if (LinkAnimation_OnFrame(&this->skelAnime, fabsf(data & 0x7FF))) { if (flags == 0x800) { - func_8002F7DC(&this->actor, entry->sfxId); + Player_PlaySfx(&this->actor, entry->sfxId); } else if (flags == 0x1000) { func_80832770(this, entry->sfxId); } else if (flags == 0x1800) { @@ -1643,7 +1643,7 @@ void func_80832F54(PlayState* play, Player* this, s32 flags) { } this->skelAnime.moveFlags = flags; - func_80832210(this); + Player_ZeroSpeedXZ(this); AnimationContext_DisableQueue(play); } @@ -1730,7 +1730,7 @@ void func_808332F4(Player* this, PlayState* play) { } static LinkAnimationHeader* func_80833338(Player* this) { - return D_80853914[PLAYER_ANIMGROUP_0][this->modelAnimType]; + return D_80853914[PLAYER_ANIMGROUP_wait][this->modelAnimType]; } s32 func_80833350(Player* this) { @@ -1757,12 +1757,12 @@ void func_808333FC(Player* this, s32 arg1) { LinkAnimationHeader* func_80833438(Player* this) { if (this->unk_890 != 0) { - return D_80853914[PLAYER_ANIMGROUP_3][this->modelAnimType]; + return D_80853914[PLAYER_ANIMGROUP_damage_run][this->modelAnimType]; } else if (!(this->stateFlags1 & (PLAYER_STATE1_IN_WATER | PLAYER_STATE1_IN_CUTSCENE)) && (this->currentBoots == PLAYER_BOOTS_IRON)) { - return D_80853914[PLAYER_ANIMGROUP_4][this->modelAnimType]; + return D_80853914[PLAYER_ANIMGROUP_heavy_run][this->modelAnimType]; } else { - return D_80853914[PLAYER_ANIMGROUP_2][this->modelAnimType]; + return D_80853914[PLAYER_ANIMGROUP_run][this->modelAnimType]; } } @@ -1774,7 +1774,7 @@ LinkAnimationHeader* func_808334E4(Player* this) { if (func_808334B4(this)) { return &gPlayerAnim_link_boom_throw_waitR; } else { - return D_80853914[PLAYER_ANIMGROUP_6][this->modelAnimType]; + return D_80853914[PLAYER_ANIMGROUP_waitR][this->modelAnimType]; } } @@ -1782,7 +1782,7 @@ LinkAnimationHeader* func_80833528(Player* this) { if (func_808334B4(this)) { return &gPlayerAnim_link_boom_throw_waitL; } else { - return D_80853914[PLAYER_ANIMGROUP_5][this->modelAnimType]; + return D_80853914[PLAYER_ANIMGROUP_waitL][this->modelAnimType]; } } @@ -1790,7 +1790,7 @@ LinkAnimationHeader* func_8083356C(Player* this) { if (func_8002DD78(this)) { return &gPlayerAnim_link_bow_side_walk; } else { - return D_80853914[PLAYER_ANIMGROUP_23][this->modelAnimType]; + return D_80853914[PLAYER_ANIMGROUP_side_walk][this->modelAnimType]; } } @@ -1798,7 +1798,7 @@ LinkAnimationHeader* func_808335B0(Player* this) { if (func_808334B4(this)) { return &gPlayerAnim_link_boom_throw_side_walkR; } else { - return D_80853914[PLAYER_ANIMGROUP_25][this->modelAnimType]; + return D_80853914[PLAYER_ANIMGROUP_side_walkR][this->modelAnimType]; } } @@ -1806,7 +1806,7 @@ LinkAnimationHeader* func_808335F4(Player* this) { if (func_808334B4(this)) { return &gPlayerAnim_link_boom_throw_side_walkL; } else { - return D_80853914[PLAYER_ANIMGROUP_24][this->modelAnimType]; + return D_80853914[PLAYER_ANIMGROUP_side_walkL][this->modelAnimType]; } } @@ -1840,7 +1840,7 @@ void func_80833664(PlayState* play, Player* this, s8 actionParam) { } } -s8 Player_ItemToActionParam(s32 item) { +s8 Player_ItemToItemAction(s32 item) { if (item >= ITEM_NONE_FE) { return PLAYER_IA_NONE; } else if (item == ITEM_LAST_USED) { @@ -1941,8 +1941,8 @@ void func_80833A20(Player* this, s32 newSwordState) { u16 itemSfx; u16 voiceSfx; - if (this->swordState == 0) { - if ((this->heldItemAction == PLAYER_IA_SWORD_BGS) && (gSaveContext.swordHealth > 0.0f)) { + if (this->meleeWeaponState == 0) { + if ((this->heldItemAction == PLAYER_IA_SWORD_BIGGORON) && (gSaveContext.swordHealth > 0.0f)) { itemSfx = NA_SE_IT_HAMMER_SWING; } else { itemSfx = NA_SE_IT_SWORD_SWING; @@ -1967,12 +1967,12 @@ void func_80833A20(Player* this, s32 newSwordState) { func_80832698(this, voiceSfx); } - if (this->heldItemAction >= PLAYER_IA_SWORD_MASTER && this->heldItemAction <= PLAYER_IA_SWORD_BGS) { + if (this->heldItemAction >= PLAYER_IA_SWORD_MASTER && this->heldItemAction <= PLAYER_IA_SWORD_BIGGORON) { gSaveContext.sohStats.count[COUNT_SWORD_SWINGS]++; } } - this->swordState = newSwordState; + this->meleeWeaponState = newSwordState; } s32 func_80833B2C(Player* this) { @@ -2012,7 +2012,7 @@ void func_80833C3C(Player* this) { } s32 func_80833C50(Player* this, s32 item) { - if ((item < ITEM_NONE_FE) && (Player_ItemToActionParam(item) == this->itemAction)) { + if ((item < ITEM_NONE_FE) && (Player_ItemToItemAction(item) == this->itemAction)) { return 1; } else { return 0; @@ -2020,7 +2020,7 @@ s32 func_80833C50(Player* this, s32 item) { } s32 func_80833C98(s32 item1, s32 actionParam) { - if ((item1 < ITEM_NONE_FE) && (Player_ItemToActionParam(item1) == actionParam)) { + if ((item1 < ITEM_NONE_FE) && (Player_ItemToItemAction(item1) == actionParam)) { return 1; } else { return 0; @@ -2117,7 +2117,7 @@ void func_80833DF8(Player* this, PlayState* play) { } item = func_80833CDC(play, i); - if ((item < ITEM_NONE_FE) && (Player_ItemToActionParam(item) == this->heldItemAction)) { + if ((item < ITEM_NONE_FE) && (Player_ItemToItemAction(item) == this->heldItemAction)) { D_80853618 = true; } } else { @@ -2137,7 +2137,7 @@ void func_808340DC(Player* this, PlayState* play) { s8 sp37; s32 nextAnimType; - sp37 = Player_ItemToActionParam(this->heldItemId); + sp37 = Player_ItemToItemAction(this->heldItemId); func_80833638(this, func_80834A2C); nextAnimType = gPlayerModelTypes[this->nextModelGroup][PLAYER_MODELGROUPENTRY_ANIM]; @@ -2233,7 +2233,7 @@ s32 func_8083442C(Player* this, PlayState* play) { this->unk_834 = 14; if (this->unk_860 >= 0) { - func_8002F7DC(&this->actor, D_80854398[ABS(this->unk_860) - 1]); + Player_PlaySfx(&this->actor, D_80854398[ABS(this->unk_860) - 1]); if (!Player_HoldsHookshot(this) && (func_80834380(play, this, &item, &arrowType) > 0)) { magicArrowType = arrowType - ARROW_FIRE; @@ -2293,10 +2293,10 @@ LinkAnimationHeader* func_808346C4(PlayState* play, Player* this) { if (this->unk_870 < 0.5f) { return D_808543A4[Player_HoldsTwoHandedWeapon(this) && - !(CVarGetInteger("gShieldTwoHanded", 0) && (this->heldItemAction != PLAYER_IA_STICK))]; + !(CVarGetInteger("gShieldTwoHanded", 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK))]; } else { return D_808543AC[Player_HoldsTwoHandedWeapon(this) && - !(CVarGetInteger("gShieldTwoHanded", 0) && (this->heldItemAction != PLAYER_IA_STICK))]; + !(CVarGetInteger("gShieldTwoHanded", 0) && (this->heldItemAction != PLAYER_IA_DEKU_STICK))]; } } @@ -2312,7 +2312,7 @@ s32 func_80834758(PlayState* play, Player* this) { anim = func_808346C4(play, this); frame = Animation_GetLastFrame(anim); LinkAnimation_Change(play, &this->skelAnime2, anim, 1.0f, frame, frame, ANIMMODE_ONCE, 0.0f); - func_8002F7DC(&this->actor, NA_SE_IT_SHIELD_POSTURE); + Player_PlaySfx(&this->actor, NA_SE_IT_SHIELD_POSTURE); return 1; } else { @@ -2336,7 +2336,7 @@ void func_80834894(Player* this) { } Animation_Reverse(&this->skelAnime2); - func_8002F7DC(&this->actor, NA_SE_IT_SHIELD_REMOVE); + Player_PlaySfx(&this->actor, NA_SE_IT_SHIELD_REMOVE); } void func_808348EC(PlayState* play, Player* this) { @@ -2373,7 +2373,7 @@ s32 func_808349DC(Player* this, PlayState* play) { s32 func_80834A2C(Player* this, PlayState* play) { if (LinkAnimation_Update(play, &this->skelAnime2) || - ((Player_ItemToActionParam(this->heldItemId) == this->heldItemAction) && + ((Player_ItemToItemAction(this->heldItemId) == this->heldItemAction) && (D_80853614 = (D_80853614 || ((this->modelAnimType != PLAYER_ANIMTYPE_3) && (play->shootingGalleryStatus == 0)))))) { func_80833638(this, D_80853EDC[this->heldItemAction]); @@ -2428,7 +2428,7 @@ s32 func_80834C74(Player* this, PlayState* play) { if (D_80853614 || LinkAnimation_Update(play, &this->skelAnime2)) { func_80833638(this, D_80853EDC[this->heldItemAction]); - LinkAnimation_PlayLoop(play, &this->skelAnime2, D_80853914[PLAYER_ANIMGROUP_0][this->modelAnimType]); + LinkAnimation_PlayLoop(play, &this->skelAnime2, D_80853914[PLAYER_ANIMGROUP_wait][this->modelAnimType]); this->unk_6AC = 0; this->func_82C(this, play); return 0; @@ -2460,7 +2460,7 @@ s32 func_80834D2C(Player* this, PlayState* play) { if (this->stateFlags1 & PLAYER_STATE1_ON_HORSE) { func_80832284(play, this, &gPlayerAnim_link_uma_anim_walk); } else if ((this->actor.bgCheckFlags & 1) && !func_80833B54(this)) { - func_80832284(play, this, D_80853914[PLAYER_ANIMGROUP_0][this->modelAnimType]); + func_80832284(play, this, D_80853914[PLAYER_ANIMGROUP_wait][this->modelAnimType]); } return 1; @@ -2506,8 +2506,8 @@ s32 func_80834FBC(Player* this) { if (this->actor.child != NULL) { if (this->heldActor == NULL) { this->heldActor = this->actor.child; - func_8083264C(this, 255, 10, 250, 0); - func_8002F7DC(&this->actor, NA_SE_IT_HOOKSHOT_RECEIVE); + Player_RequestRumble(this, 255, 10, 250, 0); + Player_PlaySfx(&this->actor, NA_SE_IT_HOOKSHOT_RECEIVE); } return 1; @@ -2556,9 +2556,9 @@ s32 func_808350A4(PlayState* play, Player* this) { play->shootingGalleryStatus = -10; } - func_8083264C(this, 150, 10, 150, 0); + Player_RequestRumble(this, 150, 10, 150, 0); } else { - func_8083264C(this, 255, 20, 150, 0); + Player_RequestRumble(this, 255, 20, 150, 0); } this->unk_A73 = 4; @@ -2608,14 +2608,14 @@ s32 func_808351D4(Player* this, PlayState* play) { if (this->unk_860 >= 0) { if (sp2C == 0) { if (!func_808350A4(play, this)) { - func_8002F7DC(&this->actor, D_808543DC[ABS(this->unk_860) - 1]); + Player_PlaySfx(&this->actor, D_808543DC[ABS(this->unk_860) - 1]); } } else if (this->actor.bgCheckFlags & 1) { func_808350A4(play, this); } } this->unk_834 = 10; - func_80832210(this); + Player_ZeroSpeedXZ(this); } else { this->stateFlags1 |= PLAYER_STATE1_READY_TO_FIRE; } @@ -2801,7 +2801,7 @@ s32 func_808359FC(Player* this, PlayState* play) { func_808355DC(this); } this->unk_A73 = 4; - func_8002F7DC(&this->actor, NA_SE_IT_BOOMERANG_THROW); + Player_PlaySfx(&this->actor, NA_SE_IT_BOOMERANG_THROW); func_80832698(this, NA_SE_VO_LI_SWORD_N); } } @@ -2838,8 +2838,8 @@ s32 func_80835B60(Player* this, PlayState* play) { if (!(this->stateFlags1 & PLAYER_STATE1_THREW_BOOMERANG)) { func_80833638(this, func_80835C08); LinkAnimation_PlayOnce(play, &this->skelAnime2, &gPlayerAnim_link_boom_catch); - func_808357E8(this, D_80125EF8); - func_8002F7DC(&this->actor, NA_SE_PL_CATCH_BOOMERANG); + func_808357E8(this, gPlayerLeftHandBoomerangDLs); + Player_PlaySfx(&this->actor, NA_SE_PL_CATCH_BOOMERANG); func_80832698(this, NA_SE_VO_LI_SWORD_N); return 1; } @@ -2949,13 +2949,13 @@ void func_80835F44(PlayState* play, Player* this, s32 item) { s32 temp; s32 nextAnimType; - actionParam = Player_ItemToActionParam(item); + actionParam = Player_ItemToItemAction(item); if (((this->heldItemAction == this->itemAction) && - (!(this->stateFlags1 & PLAYER_STATE1_SHIELDING) || (Player_ActionToSword(actionParam) != 0) || + (!(this->stateFlags1 & PLAYER_STATE1_SHIELDING) || (Player_ActionToMeleeWeapon(actionParam) != 0) || (actionParam == PLAYER_IA_NONE))) || ((this->itemAction < 0) && - ((Player_ActionToSword(actionParam) != 0) || (actionParam == PLAYER_IA_NONE)))) { + ((Player_ActionToMeleeWeapon(actionParam) != 0) || (actionParam == PLAYER_IA_NONE)))) { if ((actionParam == PLAYER_IA_NONE) || !(this->stateFlags1 & PLAYER_STATE1_IN_WATER) || ((this->actor.bgCheckFlags & 1) && @@ -2963,8 +2963,8 @@ void func_80835F44(PlayState* play, Player* this, s32 item) { ((actionParam >= PLAYER_IA_SHIELD_DEKU) && (actionParam <= PLAYER_IA_BOOTS_HOVER))) { if ((play->bombchuBowlingStatus == 0) && - (((actionParam == PLAYER_IA_STICK) && (AMMO(ITEM_STICK) == 0)) || - ((actionParam == PLAYER_IA_BEAN) && (AMMO(ITEM_BEAN) == 0)) || + (((actionParam == PLAYER_IA_DEKU_STICK) && (AMMO(ITEM_STICK) == 0)) || + ((actionParam == PLAYER_IA_MAGIC_BEAN) && (AMMO(ITEM_BEAN) == 0)) || (temp = Player_ActionToExplosive(this, actionParam), ((temp >= 0) && ((AMMO(sExplosiveInfos[temp].itemId) == 0) || (play->actorCtx.actorLists[ACTORCAT_EXPLOSIVE].length >= 3)))))) { @@ -3002,7 +3002,7 @@ void func_80835F44(PlayState* play, Player* this, s32 item) { return; } - if (actionParam == PLAYER_IA_LENS) { + if (actionParam == PLAYER_IA_LENS_OF_TRUTH) { if (func_80087708(play, 0, 3)) { if (play->actorCtx.lensActive) { Actor_DisableLens(play); @@ -3016,7 +3016,7 @@ void func_80835F44(PlayState* play, Player* this, s32 item) { return; } - if (actionParam == PLAYER_IA_NUT) { + if (actionParam == PLAYER_IA_DEKU_NUT) { if (AMMO(ITEM_NUT) != 0) { func_8083C61C(play, this); } else { @@ -3049,7 +3049,7 @@ void func_80835F44(PlayState* play, Player* this, s32 item) { return; } - if (((actionParam >= PLAYER_IA_OCARINA_FAIRY) && (actionParam <= PLAYER_IA_OCARINA_TIME)) || + if (((actionParam >= PLAYER_IA_OCARINA_FAIRY) && (actionParam <= PLAYER_IA_OCARINA_OF_TIME)) || (actionParam >= PLAYER_IA_BOTTLE_FISH)) { if (!func_8008E9C4(this) || ((actionParam >= PLAYER_IA_BOTTLE_POTION_RED) && (actionParam <= PLAYER_IA_BOTTLE_FAIRY))) { @@ -3127,7 +3127,7 @@ s32 func_808365C8(Player* this) { ((this->stateFlags1 & PLAYER_STATE1_START_PUTAWAY) && ((this->heldItemId == ITEM_LAST_USED) || (this->heldItemId == ITEM_NONE)))) && (!(func_80834A2C == this->func_82C) || - (Player_ItemToActionParam(this->heldItemId) == this->heldItemAction)); + (Player_ItemToItemAction(this->heldItemId) == this->heldItemAction)); } s32 func_80836670(Player* this, PlayState* play) { @@ -3499,7 +3499,7 @@ void func_80837530(PlayState* play, Player* this, s32 arg2) { if (this->actor.category == ACTORCAT_PLAYER) { Actor_Spawn(&play->actorCtx, play, ACTOR_EN_M_THUNDER, this->bodyPartsPos[PLAYER_BODYPART_WAIST].x, this->bodyPartsPos[PLAYER_BODYPART_WAIST].y, this->bodyPartsPos[PLAYER_BODYPART_WAIST].z, 0, 0, 0, - Player_GetSwordHeld(this) | arg2, true); + Player_GetMeleeWeaponHeld(this) | arg2, true); } } @@ -3511,7 +3511,7 @@ s32 func_808375D8(Player* this) { s8 temp2; s32 i; - if ((this->heldItemAction == PLAYER_IA_STICK) || Player_HoldsBrokenKnife(this)) { + if ((this->heldItemAction == PLAYER_IA_DEKU_STICK) || Player_HoldsBrokenKnife(this)) { return 0; } @@ -3592,7 +3592,7 @@ s32 func_80837818(Player* this) { } } } - if (this->heldItemAction == PLAYER_IA_STICK) { + if (this->heldItemAction == PLAYER_IA_DEKU_STICK) { sp18 = 0; } } @@ -3651,7 +3651,7 @@ void func_80837948(PlayState* play, Player* this, s32 arg2) { if (Player_HoldsBrokenKnife(this)) { temp = 1; } else { - temp = Player_GetSwordHeld(this) - 1; + temp = Player_GetMeleeWeaponHeld(this) - 1; } if ((arg2 >= 16) && (arg2 < 20)) { @@ -3730,7 +3730,7 @@ void func_80837C0C(PlayState* play, Player* this, s32 arg2, f32 arg3, f32 arg4, this->unk_890 = 0; - func_8002F7DC(&this->actor, NA_SE_PL_DAMAGE); + Player_PlaySfx(&this->actor, NA_SE_PL_DAMAGE); if (!func_80837B18(play, this, 0 - this->actor.colChkInfo.damage)) { this->stateFlags2 &= ~PLAYER_STATE2_GRABBED_BY_ENEMY; @@ -3748,14 +3748,14 @@ void func_80837C0C(PlayState* play, Player* this, s32 arg2, f32 arg3, f32 arg4, sp2C = &gPlayerAnim_link_normal_ice_down; func_80832224(this); - func_8083264C(this, 255, 10, 40, 0); + Player_RequestRumble(this, 255, 10, 40, 0); - func_8002F7DC(&this->actor, NA_SE_PL_FREEZE_S); + Player_PlaySfx(&this->actor, NA_SE_PL_FREEZE_S); func_80832698(this, NA_SE_VO_LI_FREEZE); } else if (arg2 == 4) { func_80835C58(play, this, func_8084FBF4, 0); - func_8083264C(this, 255, 80, 150, 0); + Player_RequestRumble(this, 255, 80, 150, 0); func_808322A4(play, this, &gPlayerAnim_link_normal_electric_shock); func_80832224(this); @@ -3765,7 +3765,7 @@ void func_80837C0C(PlayState* play, Player* this, s32 arg2, f32 arg3, f32 arg4, arg5 -= this->actor.shape.rot.y; if (this->stateFlags1 & PLAYER_STATE1_IN_WATER) { func_80835C58(play, this, func_8084E30C, 0); - func_8083264C(this, 180, 20, 50, 0); + Player_RequestRumble(this, 180, 20, 50, 0); this->linearVelocity = 4.0f; this->actor.velocity.y = 0.0f; @@ -3779,7 +3779,7 @@ void func_80837C0C(PlayState* play, Player* this, s32 arg2, f32 arg3, f32 arg4, this->stateFlags3 |= PLAYER_STATE3_MIDAIR; - func_8083264C(this, 255, 20, 150, 0); + Player_RequestRumble(this, 255, 20, 150, 0); func_80832224(this); if (arg2 == 2) { @@ -3789,7 +3789,7 @@ void func_80837C0C(PlayState* play, Player* this, s32 arg2, f32 arg3, f32 arg4, this->linearVelocity = 3.0f; this->actor.velocity.y = 6.0f; - func_80832C2C(play, this, D_80853914[PLAYER_ANIMGROUP_3][this->modelAnimType]); + func_80832C2C(play, this, D_80853914[PLAYER_ANIMGROUP_damage_run][this->modelAnimType]); func_80832698(this, NA_SE_VO_LI_DAMAGE_S); } else { this->actor.speedXZ = arg3; @@ -3814,7 +3814,7 @@ void func_80837C0C(PlayState* play, Player* this, s32 arg2, f32 arg3, f32 arg4, } else { if ((this->linearVelocity > 4.0f) && !func_8008E9C4(this)) { this->unk_890 = 20; - func_8083264C(this, 120, 20, 10, 0); + Player_RequestRumble(this, 120, 20, 10, 0); func_80832698(this, NA_SE_VO_LI_DAMAGE_S); return; } @@ -3825,9 +3825,9 @@ void func_80837C0C(PlayState* play, Player* this, s32 arg2, f32 arg3, f32 arg4, func_80833C3C(this); if (this->actor.colChkInfo.damage < 5) { - func_8083264C(this, 120, 20, 10, 0); + Player_RequestRumble(this, 120, 20, 10, 0); } else { - func_8083264C(this, 180, 20, 100, 0); + Player_RequestRumble(this, 180, 20, 100, 0); this->linearVelocity = 23.0f; sp28 += 4; } @@ -3974,7 +3974,7 @@ s32 func_808382DC(Player* this, PlayState* play) { if (sp64 || ((this->invincibilityTimer < 0) && (this->cylinder.base.acFlags & AC_HIT) && (this->cylinder.info.atHit != NULL) && (this->cylinder.info.atHit->atFlags & 0x20000000))) { - func_8083264C(this, 180, 20, 100, 0); + Player_RequestRumble(this, 180, 20, 100, 0); if (!Player_IsChildWithHylianShield(this)) { if (this->invincibilityTimer >= 0) { @@ -3991,18 +3991,18 @@ s32 func_808382DC(Player* this, PlayState* play) { if (this->unk_870 < 0.5f) { anim = D_808543BC[Player_HoldsTwoHandedWeapon(this) && !(CVarGetInteger("gShieldTwoHanded", 0) && - (this->heldItemAction != PLAYER_IA_STICK))]; + (this->heldItemAction != PLAYER_IA_DEKU_STICK))]; } else { anim = D_808543B4[Player_HoldsTwoHandedWeapon(this) && !(CVarGetInteger("gShieldTwoHanded", 0) && - (this->heldItemAction != PLAYER_IA_STICK))]; + (this->heldItemAction != PLAYER_IA_DEKU_STICK))]; } LinkAnimation_PlayOnce(play, &this->skelAnime2, anim); } else { func_80832264(play, this, D_808543C4[Player_HoldsTwoHandedWeapon(this) && !(CVarGetInteger("gShieldTwoHanded", 0) && - (this->heldItemAction != PLAYER_IA_STICK))]); + (this->heldItemAction != PLAYER_IA_DEKU_STICK))]); } } @@ -4030,7 +4030,7 @@ s32 func_808382DC(Player* this, PlayState* play) { s32 sp4C; if (ac->flags & ACTOR_FLAG_PLAY_HIT_SFX) { - func_8002F7DC(&this->actor, NA_SE_PL_BODY_HIT); + Player_PlaySfx(&this->actor, NA_SE_PL_BODY_HIT); } if (this->stateFlags1 & PLAYER_STATE1_IN_WATER) { @@ -4339,7 +4339,7 @@ s32 func_80839034(PlayState* play, Player* this, CollisionPoly* poly, u32 bgId) } } else { if (!(this->actor.bgCheckFlags & 1)) { - func_80832210(this); + Player_ZeroSpeedXZ(this); } } @@ -4511,13 +4511,13 @@ s32 func_80839800(Player* this, PlayState* play) { : (LINK_IS_ADULT ? KNOB_ANIM_ADULT_R : KNOB_ANIM_CHILD_R); if (door->animStyle == KNOB_ANIM_ADULT_L) { - sp5C = D_80853914[PLAYER_ANIMGROUP_9][this->modelAnimType]; + sp5C = D_80853914[PLAYER_ANIMGROUP_doorA_free][this->modelAnimType]; } else if (door->animStyle == KNOB_ANIM_CHILD_L) { - sp5C = D_80853914[PLAYER_ANIMGROUP_10][this->modelAnimType]; + sp5C = D_80853914[PLAYER_ANIMGROUP_doorA][this->modelAnimType]; } else if (door->animStyle == KNOB_ANIM_ADULT_R) { - sp5C = D_80853914[PLAYER_ANIMGROUP_11][this->modelAnimType]; + sp5C = D_80853914[PLAYER_ANIMGROUP_doorB_free][this->modelAnimType]; } else { - sp5C = D_80853914[PLAYER_ANIMGROUP_12][this->modelAnimType]; + sp5C = D_80853914[PLAYER_ANIMGROUP_doorB][this->modelAnimType]; } func_80835C58(play, this, func_80845EF8, 0); @@ -4693,7 +4693,7 @@ void func_8083A0F4(PlayState* play, Player* this) { anim = &gPlayerAnim_link_normal_nocarry_free; } else { func_80835C58(play, this, func_80846050, 0); - anim = D_80853914[PLAYER_ANIMGROUP_13][this->modelAnimType]; + anim = D_80853914[PLAYER_ANIMGROUP_carryB][this->modelAnimType]; } // Same actor is used for small and large silver rocks, use actor params to identify large ones @@ -4857,7 +4857,7 @@ s32 func_8083A6AC(Player* this, PlayState* play) { this->stateFlags1 &= ~PLAYER_STATE1_TARGET_NOTHING; } - func_8002F7DC(&this->actor, NA_SE_PL_SLIPDOWN); + Player_PlaySfx(&this->actor, NA_SE_PL_SLIPDOWN); func_80832698(this, NA_SE_VO_LI_HANG); return 1; } @@ -4895,9 +4895,9 @@ void func_8083AA10(Player* this, PlayState* play) { if (!(this->stateFlags3 & PLAYER_STATE3_MIDAIR) && !(this->skelAnime.moveFlags & 0x80) && (func_8084411C != this->func_674) && (func_80844A44 != this->func_674)) { - if ((D_80853604 == 7) || (this->swordState != 0)) { + if ((D_80853604 == 7) || (this->meleeWeaponState != 0)) { Math_Vec3f_Copy(&this->actor.world.pos, &this->actor.prevPos); - func_80832210(this); + Player_ZeroSpeedXZ(this); return; } @@ -4915,7 +4915,7 @@ void func_8083AA10(Player* this, PlayState* play) { this->unk_89E = this->unk_A82; if ((this->actor.bgCheckFlags & 4) && !(this->stateFlags1 & PLAYER_STATE1_IN_WATER) && (D_80853604 != 6) && - (D_80853604 != 9) && (D_80853600 > 20.0f) && (this->swordState == 0) && (ABS(sp5C) < 0x2000) && + (D_80853604 != 9) && (D_80853600 > 20.0f) && (this->meleeWeaponState == 0) && (ABS(sp5C) < 0x2000) && (this->linearVelocity > 3.0f)) { if ((D_80853604 == 11) && !(this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD)) { @@ -5070,7 +5070,7 @@ s32 func_8083B040(Player* this, PlayState* play) { return 1; } - sp2C = this->itemAction - PLAYER_IA_LETTER_ZELDA; + sp2C = this->itemAction - PLAYER_IA_ZELDAS_LETTER; if ((sp2C >= 0) || (sp28 = Player_ActionToBottle(this, this->itemAction) - 1, ((sp28 >= 0) && (sp28 < 6) && @@ -5107,7 +5107,7 @@ s32 func_8083B040(Player* this, PlayState* play) { (this->itemAction == PLAYER_IA_BOTTLE_BIG_POE)) || ((this->exchangeItemId == EXCH_ITEM_BEAN) && (this->itemAction == PLAYER_IA_BOTTLE_BUG))) && - ((this->exchangeItemId != EXCH_ITEM_BEAN) || (this->itemAction == PLAYER_IA_BEAN))) { + ((this->exchangeItemId != EXCH_ITEM_BEAN) || (this->itemAction == PLAYER_IA_MAGIC_BEAN))) { if (this->exchangeItemId == EXCH_ITEM_BEAN) { Inventory_ChangeAmmo(ITEM_BEAN, -1); func_80835DE4(play, this, func_8084279C, 0); @@ -5131,7 +5131,7 @@ s32 func_8083B040(Player* this, PlayState* play) { this->exchangeItemId = sp2C; if (this->unk_84F < 0) { - func_80832B0C(play, this, D_80853914[PLAYER_ANIMGROUP_32][this->modelAnimType]); + func_80832B0C(play, this, D_80853914[PLAYER_ANIMGROUP_check][this->modelAnimType]); } else { func_80832264(play, this, D_80854548[this->unk_84F]); } @@ -5174,7 +5174,7 @@ s32 func_8083B040(Player* this, PlayState* play) { } this->stateFlags1 |= PLAYER_STATE1_FIRST_PERSON; func_80078884(NA_SE_SY_CAMERA_ZOOM_UP); - func_80832210(this); + Player_ZeroSpeedXZ(this); return 1; } else { this->unk_6AD = 0; @@ -5317,7 +5317,7 @@ void func_8083BA90(PlayState* play, Player* this, s32 arg2, f32 xzVelocity, f32 } s32 func_8083BB20(Player* this) { - if (!(this->stateFlags1 & PLAYER_STATE1_SHIELDING) && (Player_GetSwordHeld(this) != 0)) { + if (!(this->stateFlags1 & PLAYER_STATE1_SHIELDING) && (Player_GetMeleeWeaponHeld(this) != 0)) { if (D_80853614 || ((this->actor.category != ACTORCAT_PLAYER) && CHECK_BTN_ALL(sControlInput->press.button, BTN_B))) { return 1; @@ -5338,7 +5338,7 @@ s32 func_8083BBA0(Player* this, PlayState* play) { void func_8083BC04(Player* this, PlayState* play) { func_80835C58(play, this, func_80844708, 0); - LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime, D_80853914[PLAYER_ANIMGROUP_16][this->modelAnimType], + LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime, D_80853914[PLAYER_ANIMGROUP_landing_roll][this->modelAnimType], 1.25f * D_808535E8); gSaveContext.sohStats.count[COUNT_ROLLS]++; } @@ -5365,7 +5365,7 @@ void func_8083BCD0(Player* this, PlayState* play, s32 arg2) { this->stateFlags2 |= PLAYER_STATE2_HOPPING; - func_8002F7DC(&this->actor, ((arg2 << 0xE) == 0x8000) ? NA_SE_PL_ROLL : NA_SE_PL_SKIP); + Player_PlaySfx(&this->actor, ((arg2 << 0xE) == 0x8000) ? NA_SE_PL_ROLL : NA_SE_PL_SKIP); } s32 func_8083BDBC(Player* this, PlayState* play) { @@ -5385,7 +5385,7 @@ s32 func_8083BDBC(Player* this, PlayState* play) { func_8083BC04(this, play); } } else { - if (Player_GetSwordHeld(this) && func_808365C8(this)) { + if (Player_GetMeleeWeaponHeld(this) && func_808365C8(this)) { func_8083BA90(play, this, 17, 5.0f, 5.0f); } else { func_8083BC04(this, play); @@ -5419,14 +5419,14 @@ void func_8083BF50(Player* this, PlayState* play) { } if (sp30 < 14.0f) { - anim = D_80853914[PLAYER_ANIMGROUP_18][this->modelAnimType]; + anim = D_80853914[PLAYER_ANIMGROUP_walk_endL][this->modelAnimType]; sp30 = 11.0f - sp30; if (sp30 < 0.0f) { sp30 = 1.375f * -sp30; } sp30 /= 11.0f; } else { - anim = D_80853914[PLAYER_ANIMGROUP_19][this->modelAnimType]; + anim = D_80853914[PLAYER_ANIMGROUP_walk_endR][this->modelAnimType]; sp30 = 26.0f - sp30; if (sp30 < 0.0f) { sp30 = 2 * -sp30; @@ -5498,7 +5498,7 @@ s32 func_8083C2B0(Player* this, PlayState* play) { if (!Player_IsChildWithHylianShield(this)) { Player_SetModelsForHoldingShield(this); - anim = D_80853914[PLAYER_ANIMGROUP_20][this->modelAnimType]; + anim = D_80853914[PLAYER_ANIMGROUP_defense][this->modelAnimType]; } else { anim = &gPlayerAnim_clink_normal_defense_ALL; } @@ -5520,7 +5520,7 @@ s32 func_8083C2B0(Player* this, PlayState* play) { func_80832F54(play, this, 4); } - func_8002F7DC(&this->actor, NA_SE_IT_SHIELD_POSTURE); + Player_PlaySfx(&this->actor, NA_SE_IT_SHIELD_POSTURE); } return 1; @@ -5552,9 +5552,9 @@ void func_8083C50C(Player* this) { s32 func_8083C544(Player* this, PlayState* play) { if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_B)) { - if (!(this->stateFlags1 & PLAYER_STATE1_SHIELDING) && (Player_GetSwordHeld(this) != 0) && (this->unk_844 == 1) && - (this->heldItemAction != PLAYER_IA_STICK)) { - if ((this->heldItemAction != PLAYER_IA_SWORD_BGS) || (gSaveContext.swordHealth > 0.0f)) { + if (!(this->stateFlags1 & PLAYER_STATE1_SHIELDING) && (Player_GetMeleeWeaponHeld(this) != 0) && (this->unk_844 == 1) && + (this->heldItemAction != PLAYER_IA_DEKU_STICK)) { + if ((this->heldItemAction != PLAYER_IA_SWORD_BIGGORON) || (gSaveContext.swordHealth > 0.0f)) { func_808377DC(play, this); return 1; } @@ -5596,7 +5596,7 @@ s32 func_8083C6B8(PlayState* play, Player* this) { func_808322D0(play, this, D_80854554[this->unk_850].unk_00); - func_8002F7DC(&this->actor, NA_SE_IT_SWORD_SWING); + Player_PlaySfx(&this->actor, NA_SE_IT_SWORD_SWING); func_80832698(this, NA_SE_VO_LI_AUTO_JUMP); return 1; } @@ -5615,7 +5615,7 @@ s32 func_8083C6B8(PlayState* play, Player* this) { func_80835C58(play, this, func_80850C68, 0); this->unk_860 = 1; - func_80832210(this); + Player_ZeroSpeedXZ(this); func_80832264(play, this, &gPlayerAnim_link_fishing_throw); return 1; } else { @@ -5636,7 +5636,7 @@ void func_8083C858(Player* this, PlayState* play) { } func_80835C58(play, this, func, 1); - func_80832BE8(play, this, D_80853914[PLAYER_ANIMGROUP_2][this->modelAnimType]); + func_80832BE8(play, this, D_80853914[PLAYER_ANIMGROUP_run][this->modelAnimType]); this->unk_89C = 0; this->unk_864 = this->unk_868 = 0.0f; @@ -5709,7 +5709,7 @@ void func_8083CB2C(Player* this, s16 yaw, PlayState* play) { void func_8083CB94(Player* this, PlayState* play) { func_80835C58(play, this, func_80840DE4, 1); - func_80832BE8(play, this, D_80853914[PLAYER_ANIMGROUP_1][this->modelAnimType]); + func_80832BE8(play, this, D_80853914[PLAYER_ANIMGROUP_walk][this->modelAnimType]); } void func_8083CBF0(Player* this, s16 yaw, PlayState* play) { @@ -5722,7 +5722,7 @@ void func_8083CBF0(Player* this, s16 yaw, PlayState* play) { void func_8083CC9C(Player* this, PlayState* play) { func_80835C58(play, this, func_8084193C, 1); - func_80832BE8(play, this, D_80853914[PLAYER_ANIMGROUP_25][this->modelAnimType]); + func_80832BE8(play, this, D_80853914[PLAYER_ANIMGROUP_side_walkR][this->modelAnimType]); this->unk_868 = 0.0f; } @@ -5736,7 +5736,7 @@ void func_8083CD54(PlayState* play, Player* this, s16 yaw) { func_80835C58(play, this, func_80841BA8, 1); this->unk_87E = 1200; this->unk_87E *= D_808535E8; - LinkAnimation_Change(play, &this->skelAnime, D_80853914[PLAYER_ANIMGROUP_26][this->modelAnimType], 1.0f, 0.0f, + LinkAnimation_Change(play, &this->skelAnime, D_80853914[PLAYER_ANIMGROUP_45_turn][this->modelAnimType], 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, -6.0f); } @@ -5746,9 +5746,9 @@ void func_8083CE0C(Player* this, PlayState* play) { func_80835C58(play, this, func_80840BC8, 1); if (this->unk_870 < 0.5f) { - anim = D_80853914[PLAYER_ANIMGROUP_28][this->modelAnimType]; + anim = D_80853914[PLAYER_ANIMGROUP_waitR2wait][this->modelAnimType]; } else { - anim = D_80853914[PLAYER_ANIMGROUP_27][this->modelAnimType]; + anim = D_80853914[PLAYER_ANIMGROUP_waitL2wait][this->modelAnimType]; } func_80832264(play, this, anim); @@ -5757,7 +5757,7 @@ void func_8083CE0C(Player* this, PlayState* play) { void func_8083CEAC(Player* this, PlayState* play) { func_80835C58(play, this, func_80840450, 1); - func_80832B0C(play, this, D_80853914[PLAYER_ANIMGROUP_7][this->modelAnimType]); + func_80832B0C(play, this, D_80853914[PLAYER_ANIMGROUP_wait2waitR][this->modelAnimType]); this->unk_850 = 1; } @@ -5807,7 +5807,7 @@ void func_8083D0A8(PlayState* play, Player* this, f32 arg2) { func_80832340(play, this); if (func_8083CFA8(play, this, arg2, 500)) { - func_8002F7DC(&this->actor, NA_SE_EV_JUMP_OUT_WATER); + Player_PlaySfx(&this->actor, NA_SE_EV_JUMP_OUT_WATER); } Player_SetBootData(play, this); @@ -5827,7 +5827,7 @@ s32 func_8083D12C(PlayState* play, Player* this, Input* arg2) { if (arg2 != NULL) { this->stateFlags2 |= PLAYER_STATE2_DIVING; - func_8002F7DC(&this->actor, NA_SE_PL_DIVE_BUBBLE); + Player_PlaySfx(&this->actor, NA_SE_PL_DIVE_BUBBLE); } return 1; @@ -5856,7 +5856,7 @@ s32 func_8083D12C(PlayState* play, Player* this, Input* arg2) { : &gPlayerAnim_link_swimer_swim_deep_end); if (func_8083CFA8(play, this, this->actor.velocity.y, 500)) { - func_8002F7DC(&this->actor, NA_SE_PL_FACE_UP); + Player_PlaySfx(&this->actor, NA_SE_PL_FACE_UP); } return 1; @@ -5894,7 +5894,7 @@ void func_8083D36C(PlayState* play, Player* this) { if (!(this->stateFlags1 & PLAYER_STATE1_IN_WATER) || (this->actor.yDistToWater < this->ageProperties->unk_2C)) { if (func_8083CFA8(play, this, this->actor.velocity.y, 500)) { - func_8002F7DC(&this->actor, NA_SE_EV_DIVE_INTO_WATER); + Player_PlaySfx(&this->actor, NA_SE_EV_DIVE_INTO_WATER); if (this->fallDistance > 800.0f) { func_80832698(this, NA_SE_VO_LI_CLIMB_END); @@ -6115,7 +6115,7 @@ void func_8083DF68(Player* this, f32 arg1, s16 arg2) { void func_8083DFE0(Player* this, f32* arg1, s16* arg2) { s16 yawDiff = this->currentYaw - *arg2; - if (this->swordState == 0) { + if (this->meleeWeaponState == 0) { float maxSpeed = R_RUN_SPEED_LIMIT / 100.0f; int32_t giSpeedModifier = GameInteractor_RunSpeedModifier(); @@ -6492,7 +6492,7 @@ s32 func_8083E5A8(Player* this, PlayState* play) { void func_8083EA94(Player* this, PlayState* play) { func_80835C58(play, this, func_80846578, 1); - func_80832264(play, this, D_80853914[PLAYER_ANIMGROUP_29][this->modelAnimType]); + func_80832264(play, this, D_80853914[PLAYER_ANIMGROUP_throw][this->modelAnimType]); } s32 func_8083EAF0(Player* this, Actor* actor) { @@ -6514,7 +6514,7 @@ s32 func_8083EB44(Player* this, PlayState* play) { if (!func_80835644(play, this, this->heldActor)) { if (!func_8083EAF0(this, this->heldActor)) { func_80835C58(play, this, func_808464B0, 1); - func_80832264(play, this, D_80853914[PLAYER_ANIMGROUP_30][this->modelAnimType]); + func_80832264(play, this, D_80853914[PLAYER_ANIMGROUP_put][this->modelAnimType]); } else { func_8083EA94(this, play); } @@ -6781,7 +6781,7 @@ s32 func_8083F570(Player* this, PlayState* play) { } this->currentYaw = this->actor.shape.rot.y; - func_80832210(this); + Player_ZeroSpeedXZ(this); return 1; } @@ -6885,7 +6885,7 @@ void func_8083FAB8(Player* this, PlayState* play) { void func_8083FB14(Player* this, PlayState* play) { func_80835C58(play, this, func_8084B9E4, 0); this->stateFlags2 |= PLAYER_STATE2_MOVING_DYNAPOLY; - func_80832264(play, this, D_80853914[PLAYER_ANIMGROUP_35][this->modelAnimType]); + func_80832264(play, this, D_80853914[PLAYER_ANIMGROUP_pull_start][this->modelAnimType]); } void func_8083FB7C(Player* this, PlayState* play) { @@ -7070,7 +7070,7 @@ void func_80840450(Player* this, PlayState* play) { s32 temp4; if (this->stateFlags3 & PLAYER_STATE3_FINISHED_ATTACKING) { - if (Player_GetSwordHeld(this)) { + if (Player_GetMeleeWeaponHeld(this)) { this->stateFlags2 |= PLAYER_STATE2_DISABLE_ROTATION_Z_TARGET | PLAYER_STATE2_DISABLE_ROTATION_ALWAYS; } else { this->stateFlags3 &= ~PLAYER_STATE3_FINISHED_ATTACKING; @@ -7235,7 +7235,7 @@ void func_808409CC(PlayState* play, Player* this) { sp34 = Rand_ZeroOne() * 5.0f; if (sp34 < 4) { if (((sp34 != 0) && (sp34 != 3)) || ((this->rightHandType == PLAYER_MODELTYPE_RH_SHIELD) && - ((sp34 == 3) || Player_GetSwordHeld(this)))) { + ((sp34 == 3) || Player_GetMeleeWeaponHeld(this)))) { if ((sp34 == 1) && Player_HoldsTwoHandedWeapon(this) && CVarGetInteger("gTwoHandedIdle", 0) == 1) { sp34 = 4; } @@ -7414,7 +7414,7 @@ void func_80841138(Player* this, PlayState* play) { if (this->unk_864 < 1.0f) { temp1 = R_UPDATE_RATE * 0.5f; func_8084029C(this, REG(35) / 1000.0f); - LinkAnimation_LoadToJoint(play, &this->skelAnime, D_80853914[PLAYER_ANIMGROUP_31][this->modelAnimType], + LinkAnimation_LoadToJoint(play, &this->skelAnime, D_80853914[PLAYER_ANIMGROUP_back_walk][this->modelAnimType], this->unk_868); this->unk_864 += 1 * temp1; if (this->unk_864 >= 1.0f) { @@ -7426,7 +7426,7 @@ void func_80841138(Player* this, PlayState* play) { if (temp2 < 0.0f) { temp1 = 1.0f; func_8084029C(this, (REG(35) / 1000.0f) + ((REG(36) / 1000.0f) * this->linearVelocity)); - LinkAnimation_LoadToJoint(play, &this->skelAnime, D_80853914[PLAYER_ANIMGROUP_31][this->modelAnimType], + LinkAnimation_LoadToJoint(play, &this->skelAnime, D_80853914[PLAYER_ANIMGROUP_back_walk][this->modelAnimType], this->unk_868); } else { temp1 = (REG(37) / 1000.0f) * temp2; @@ -7436,7 +7436,7 @@ void func_80841138(Player* this, PlayState* play) { temp1 = 1.0f; func_8084029C(this, 1.2f + ((REG(38) / 1000.0f) * temp2)); } - LinkAnimation_LoadToMorph(play, &this->skelAnime, D_80853914[PLAYER_ANIMGROUP_31][this->modelAnimType], + LinkAnimation_LoadToMorph(play, &this->skelAnime, D_80853914[PLAYER_ANIMGROUP_back_walk][this->modelAnimType], this->unk_868); LinkAnimation_LoadToJoint(play, &this->skelAnime, &gPlayerAnim_link_normal_back_run, this->unk_868 * (16.0f / 29.0f)); @@ -7554,8 +7554,8 @@ void func_808417FC(Player* this, PlayState* play) { void func_80841860(PlayState* play, Player* this) { f32 frame; // fake match? see func_80833664 - LinkAnimationHeader* sp38 = D_80853914[0][this->modelAnimType + PLAYER_ANIMGROUP_24 * ARRAY_COUNT(D_80853914[0])]; - LinkAnimationHeader* sp34 = D_80853914[0][this->modelAnimType + PLAYER_ANIMGROUP_25 * ARRAY_COUNT(D_80853914[0])]; + LinkAnimationHeader* sp38 = D_80853914[0][this->modelAnimType + PLAYER_ANIMGROUP_side_walkL * ARRAY_COUNT(D_80853914[0])]; + LinkAnimationHeader* sp34 = D_80853914[0][this->modelAnimType + PLAYER_ANIMGROUP_side_walkR * ARRAY_COUNT(D_80853914[0])]; this->skelAnime.animation = sp38; @@ -7671,10 +7671,10 @@ void func_80841CC4(Player* this, s32 arg1, PlayState* play) { if ((this->modelAnimType == PLAYER_ANIMTYPE_3) || ((this->unk_89C == 0) && (this->unk_6C4 <= 0.0f))) { if (arg1 == 0) { - LinkAnimation_LoadToJoint(play, &this->skelAnime, D_80853914[PLAYER_ANIMGROUP_1][this->modelAnimType], + LinkAnimation_LoadToJoint(play, &this->skelAnime, D_80853914[PLAYER_ANIMGROUP_walk][this->modelAnimType], this->unk_868); } else { - LinkAnimation_LoadToMorph(play, &this->skelAnime, D_80853914[PLAYER_ANIMGROUP_1][this->modelAnimType], + LinkAnimation_LoadToMorph(play, &this->skelAnime, D_80853914[PLAYER_ANIMGROUP_walk][this->modelAnimType], this->unk_868); } return; @@ -7700,10 +7700,10 @@ void func_80841CC4(Player* this, s32 arg1, PlayState* play) { } if (arg1 == 0) { - LinkAnimation_BlendToJoint(play, &this->skelAnime, D_80853914[PLAYER_ANIMGROUP_1][this->modelAnimType], + LinkAnimation_BlendToJoint(play, &this->skelAnime, D_80853914[PLAYER_ANIMGROUP_walk][this->modelAnimType], this->unk_868, anim, this->unk_868, rate, this->blendTable); } else { - LinkAnimation_BlendToMorph(play, &this->skelAnime, D_80853914[PLAYER_ANIMGROUP_1][this->modelAnimType], + LinkAnimation_BlendToMorph(play, &this->skelAnime, D_80853914[PLAYER_ANIMGROUP_walk][this->modelAnimType], this->unk_868, anim, this->unk_868, rate, this->blendTable); } } @@ -7716,7 +7716,7 @@ void func_80841EE4(Player* this, PlayState* play) { temp1 = R_UPDATE_RATE * 0.5f; func_8084029C(this, REG(35) / 1000.0f); - LinkAnimation_LoadToJoint(play, &this->skelAnime, D_80853914[PLAYER_ANIMGROUP_1][this->modelAnimType], + LinkAnimation_LoadToJoint(play, &this->skelAnime, D_80853914[PLAYER_ANIMGROUP_walk][this->modelAnimType], this->unk_868); this->unk_864 += 1 * temp1; @@ -7924,11 +7924,11 @@ s32 func_8084269C(PlayState* play, Player* this) { } void func_8084279C(Player* this, PlayState* play) { - func_80832CB0(play, this, D_80853914[PLAYER_ANIMGROUP_33][this->modelAnimType]); + func_80832CB0(play, this, D_80853914[PLAYER_ANIMGROUP_check_wait][this->modelAnimType]); if (DECR(this->unk_850) == 0) { if (!func_8083B040(this, play)) { - func_8083A098(this, D_80853914[PLAYER_ANIMGROUP_34][this->modelAnimType], play); + func_8083A098(this, D_80853914[PLAYER_ANIMGROUP_check_end][this->modelAnimType], play); } this->actor.flags &= ~ACTOR_FLAG_PLAYER_TALKED_TO; @@ -7947,7 +7947,7 @@ s32 func_8084285C(Player* this, f32 arg1, f32 arg2, f32 arg3) { } s32 func_808428D8(Player* this, PlayState* play) { - if (Player_IsChildWithHylianShield(this) || !Player_GetSwordHeld(this) || !D_80853614) { + if (Player_IsChildWithHylianShield(this) || !Player_GetMeleeWeaponHeld(this) || !D_80853614) { return 0; } @@ -7964,7 +7964,7 @@ s32 func_808428D8(Player* this, PlayState* play) { if (Player_HoldsBrokenKnife(this)) { swordId = 1; } else { - swordId = Player_GetSwordHeld(this) - 1; + swordId = Player_GetMeleeWeaponHeld(this) - 1; } if (swordId != 4 && !CVarGetInteger("gCrouchStabFix", 0)) { // 4 = Megaton Hammer @@ -7993,8 +7993,8 @@ void func_808429B4(PlayState* play, s32 speed, s32 y, s32 countdown) { void func_80842A28(PlayState* play, Player* this) { func_808429B4(play, 27767, 7, 20); play->actorCtx.unk_02 = 4; - func_8083264C(this, 255, 20, 150, 0); - func_8002F7DC(&this->actor, NA_SE_IT_HAMMER_HIT); + Player_RequestRumble(this, 255, 20, 150, 0); + Player_PlaySfx(&this->actor, NA_SE_IT_HAMMER_HIT); } void func_80842A88(PlayState* play, Player* this) { @@ -8003,13 +8003,13 @@ void func_80842A88(PlayState* play, Player* this) { } s32 func_80842AC4(PlayState* play, Player* this) { - if ((this->heldItemAction == PLAYER_IA_STICK) && (this->unk_85C > 0.5f)) { + if ((this->heldItemAction == PLAYER_IA_DEKU_STICK) && (this->unk_85C > 0.5f)) { if (AMMO(ITEM_STICK) != 0) { EffectSsStick_Spawn(play, &this->bodyPartsPos[PLAYER_BODYPART_R_HAND], this->actor.shape.rot.y + 0x8000); this->unk_85C = 0.5f; func_80842A88(play, this); - func_8002F7DC(&this->actor, NA_SE_IT_WOODSTICK_BROKEN); + Player_PlaySfx(&this->actor, NA_SE_IT_WOODSTICK_BROKEN); } return 1; @@ -8019,13 +8019,13 @@ s32 func_80842AC4(PlayState* play, Player* this) { } s32 func_80842B7C(PlayState* play, Player* this) { - if (this->heldItemAction == PLAYER_IA_SWORD_BGS) { + if (this->heldItemAction == PLAYER_IA_SWORD_BIGGORON) { if (!gSaveContext.bgsFlag && (gSaveContext.swordHealth > 0.0f)) { if ((gSaveContext.swordHealth -= 1.0f) <= 0.0f) { EffectSsStick_Spawn(play, &this->bodyPartsPos[PLAYER_BODYPART_R_HAND], this->actor.shape.rot.y + 0x8000); func_800849EC(play); - func_8002F7DC(&this->actor, NA_SE_IT_MAJIN_SWORD_BROKEN); + Player_PlaySfx(&this->actor, NA_SE_IT_MAJIN_SWORD_BROKEN); } } @@ -8064,7 +8064,7 @@ void func_80842D20(PlayState* play, Player* this) { func_808322D0(play, this, D_808545CC[Player_HoldsTwoHandedWeapon(this) + sp28]); } - func_8083264C(this, 180, 20, 100, 0); + Player_RequestRumble(this, 180, 20, 100, 0); this->linearVelocity = -18.0f; func_80842CF0(play, this); } @@ -8079,7 +8079,7 @@ s32 func_80842DF4(PlayState* play, Player* this) { s32 temp1; s32 sp48; - if (this->swordState > 0) { + if (this->meleeWeaponState > 0) { if (this->meleeWeaponAnimation < 0x18) { if (!(this->meleeWeaponQuads[0].base.atFlags & AT_BOUNCED) && !(this->meleeWeaponQuads[1].base.atFlags & AT_BOUNCED)) { if (this->skelAnime.curFrame >= 2.0f) { @@ -8114,15 +8114,15 @@ s32 func_80842DF4(PlayState* play, Player* this) { } else { CollisionCheck_SpawnShieldParticles(play, &sp5C); if (sp48 == 0xB) { - func_8002F7DC(&this->actor, NA_SE_IT_WALL_HIT_SOFT); + Player_PlaySfx(&this->actor, NA_SE_IT_WALL_HIT_SOFT); } else { - func_8002F7DC(&this->actor, NA_SE_IT_WALL_HIT_HARD); + Player_PlaySfx(&this->actor, NA_SE_IT_WALL_HIT_HARD); } } func_80842CF0(play, this); this->linearVelocity = -14.0f; - func_8083264C(this, 180, 20, 100, 0); + Player_RequestRumble(this, 180, 20, 100, 0); } } } @@ -8171,7 +8171,7 @@ void func_80843188(Player* this, PlayState* play) { if (LinkAnimation_Update(play, &this->skelAnime)) { if (!Player_IsChildWithHylianShield(this)) { - func_80832284(play, this, D_80853914[PLAYER_ANIMGROUP_21][this->modelAnimType]); + func_80832284(play, this, D_80853914[PLAYER_ANIMGROUP_defense_wait][this->modelAnimType]); } this->unk_850 = 1; this->unk_84F = 0; @@ -8239,10 +8239,10 @@ void func_80843188(Player* this, PlayState* play) { if (this->itemAction < 0) { func_8008EC70(this); } - func_8083A098(this, D_80853914[PLAYER_ANIMGROUP_22][this->modelAnimType], play); + func_8083A098(this, D_80853914[PLAYER_ANIMGROUP_defense_end][this->modelAnimType], play); } - func_8002F7DC(&this->actor, NA_SE_IT_SHIELD_REMOVE); + Player_PlaySfx(&this->actor, NA_SE_IT_SHIELD_REMOVE); return; } } else { @@ -8274,7 +8274,7 @@ void func_808435C4(Player* this, PlayState* play) { func_80835C58(play, this, func_80843188, 1); this->stateFlags1 |= PLAYER_STATE1_SHIELDING; Player_SetModelsForHoldingShield(this); - anim = D_80853914[PLAYER_ANIMGROUP_20][this->modelAnimType]; + anim = D_80853914[PLAYER_ANIMGROUP_defense][this->modelAnimType]; frames = Animation_GetLastFrame(anim); LinkAnimation_Change(play, &this->skelAnime, anim, 1.0f, frames, frames, ANIMMODE_ONCE, 0.0f); } @@ -8425,7 +8425,7 @@ void func_80843AE8(PlayState* play, Player* this) { } else if (this->unk_84F != 0) { this->unk_850 = 60; Player_SpawnFairy(play, this, &this->actor.world.pos, &D_808545E4, FAIRY_REVIVE_DEATH); - func_8002F7DC(&this->actor, NA_SE_EV_FIATY_HEAL - SFX_FLAG); + Player_PlaySfx(&this->actor, NA_SE_EV_FIATY_HEAL - SFX_FLAG); OnePointCutscene_Init(play, 9908, 125, &this->actor, MAIN_CAM); } else if (play->gameOverCtx.state == GAMEOVER_DEATH_WAIT_GROUND) { play->gameOverCtx.state = GAMEOVER_DEATH_DELAY_MENU; @@ -8512,8 +8512,8 @@ s32 func_80843E64(PlayState* play, Player* this) { func_80837AE0(this, 40); func_808429B4(play, 32967, 2, 30); - func_8083264C(this, impactInfo->unk_01, impactInfo->unk_02, impactInfo->unk_03, 0); - func_8002F7DC(&this->actor, NA_SE_PL_BODY_HIT); + Player_RequestRumble(this, impactInfo->unk_01, impactInfo->unk_02, impactInfo->unk_03, 0); + Player_PlaySfx(&this->actor, NA_SE_PL_BODY_HIT); func_80832698(this, impactInfo->sfxId); return impactIndex + 1; @@ -8526,7 +8526,7 @@ s32 func_80843E64(PlayState* play, Player* this) { sp34 = 255; } - func_8083264C(this, (u8)sp34, (u8)(sp34 * 0.1f), (u8)sp34, 0); + Player_RequestRumble(this, (u8)sp34, (u8)(sp34 * 0.1f), (u8)sp34, 0); if (D_808535E4 == 6) { func_80832698(this, NA_SE_VO_LI_CLIMB_END); @@ -8546,7 +8546,7 @@ void func_8084409C(PlayState* play, Player* this, f32 speedXZ, f32 velocityY) { heldActor->speedXZ = speedXZ; heldActor->velocity.y = velocityY; func_80834644(play, this); - func_8002F7DC(&this->actor, NA_SE_PL_THROW); + Player_PlaySfx(&this->actor, NA_SE_PL_THROW); func_80832698(this, NA_SE_VO_LI_SWORD_N); } } @@ -8620,7 +8620,7 @@ void func_8084411C(Player* this, PlayState* play) { } this->actor.world.pos.y += this->wallHeight; func_8083A5C4(play, this, this->actor.wallPoly, this->wallDistance, - D_80853914[PLAYER_ANIMGROUP_39][this->modelAnimType]); + D_80853914[PLAYER_ANIMGROUP_jump_climb_hold][this->modelAnimType]); this->actor.shape.rot.y = this->currentYaw += 0x8000; this->stateFlags1 |= PLAYER_STATE1_HANGING_OFF_LEDGE; } @@ -8629,7 +8629,7 @@ void func_8084411C(Player* this, PlayState* play) { } } } else { - LinkAnimationHeader* anim = D_80853914[PLAYER_ANIMGROUP_14][this->modelAnimType]; + LinkAnimationHeader* anim = D_80853914[PLAYER_ANIMGROUP_landing][this->modelAnimType]; s32 sp3C; if (this->stateFlags2 & PLAYER_STATE2_HOPPING) { @@ -8644,7 +8644,7 @@ void func_8084411C(Player* this, PlayState* play) { anim = &gPlayerAnim_link_anchor_landingR; func_80833C3C(this); } else if (this->fallDistance <= 80) { - anim = D_80853914[PLAYER_ANIMGROUP_15][this->modelAnimType]; + anim = D_80853914[PLAYER_ANIMGROUP_short_landing][this->modelAnimType]; } else if ((this->fallDistance < 800) && (this->unk_84B[this->unk_846] == 0) && !(this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD)) { func_8083BC04(this, play); @@ -8654,7 +8654,7 @@ void func_8084411C(Player* this, PlayState* play) { sp3C = func_80843E64(play, this); if (sp3C > 0) { - func_8083A098(this, D_80853914[PLAYER_ANIMGROUP_14][this->modelAnimType], play); + func_8083A098(this, D_80853914[PLAYER_ANIMGROUP_landing][this->modelAnimType], play); this->skelAnime.endFrame = 8.0f; if (sp3C == 1) { this->unk_850 = 10; @@ -8719,11 +8719,11 @@ void func_80844708(Player* this, PlayState* play) { } } - func_80832264(play, this, D_80853914[PLAYER_ANIMGROUP_17][this->modelAnimType]); + func_80832264(play, this, D_80853914[PLAYER_ANIMGROUP_hip_down][this->modelAnimType]); this->linearVelocity = -this->linearVelocity; func_808429B4(play, 33267, 3, 12); - func_8083264C(this, 255, 20, 150, 0); - func_8002F7DC(&this->actor, NA_SE_PL_BODY_HIT); + Player_RequestRumble(this, 255, 20, 150, 0); + Player_PlaySfx(&this->actor, NA_SE_PL_BODY_HIT); func_80832698(this, NA_SE_VO_LI_CLIMB_END); this->unk_850 = 1; gSaveContext.sohStats.count[COUNT_BONKS]++; @@ -9387,7 +9387,7 @@ void func_80846358(Player* this, PlayState* play) { heldActor->speedXZ = 10.0f; heldActor->velocity.y = 20.0f; func_80834644(play, this); - func_8002F7DC(&this->actor, NA_SE_PL_THROW); + Player_PlaySfx(&this->actor, NA_SE_PL_THROW); func_80832698(this, NA_SE_VO_LI_SWORD_N); } } @@ -9543,7 +9543,7 @@ void func_80846720(PlayState* play, Player* this, s32 arg2) { func_80834644(play, this); if (arg2 != 0) { - func_8002F7DC(&this->actor, NA_SE_IT_SWORD_PICKOUT); + Player_PlaySfx(&this->actor, NA_SE_IT_SWORD_PICKOUT); } } @@ -9618,7 +9618,7 @@ void Player_InitCommon(Player* this, PlayState* play, FlexSkeletonHeader* skelHe this->currentYaw = this->actor.world.rot.y; func_80834644(play, this); - SkelAnime_InitLink(play, &this->skelAnime, skelHeader, D_80853914[PLAYER_ANIMGROUP_0][this->modelAnimType], 9, + SkelAnime_InitLink(play, &this->skelAnime, skelHeader, D_80853914[PLAYER_ANIMGROUP_wait][this->modelAnimType], 9, this->jointTable, this->morphTable, PLAYER_LIMB_MAX); this->skelAnime.baseTransl = D_80854730; SkelAnime_InitLink(play, &this->skelAnime2, skelHeader, func_80833338(this), 9, this->jointTable2, @@ -10315,7 +10315,7 @@ void Player_UpdateCamAndSeqModes(PlayState* play, Player* this) { } } else if (this->stateFlags1 & PLAYER_STATE1_FREEFALL) { camMode = CAM_MODE_FREEFALL; - } else if ((this->swordState != 0) && (this->meleeWeaponAnimation >= 0) && (this->meleeWeaponAnimation < 0x18)) { + } else if ((this->meleeWeaponState != 0) && (this->meleeWeaponAnimation >= 0) && (this->meleeWeaponAnimation < 0x18)) { camMode = CAM_MODE_STILL; } else { camMode = CAM_MODE_NORMAL; @@ -10451,7 +10451,7 @@ void func_80848C74(PlayState* play, Player* this) { } if (spawnedFlame) { - func_8002F7DC(&this->actor, NA_SE_EV_TORCH - SFX_FLAG); + Player_PlaySfx(&this->actor, NA_SE_EV_TORCH - SFX_FLAG); if (play->sceneNum == SCENE_SPIRIT_TEMPLE_BOSS) { dmgCooldown = 0; @@ -10571,7 +10571,7 @@ void func_80848EF8(Player* this, PlayState* play) { // This audio is placed here and not in previous CVar check to prevent ears ra.. :) Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_WOMAN, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E0); } - func_8083264C(this, 120, 20, 10, 0); + Player_RequestRumble(this, 120, 20, 10, 0); } } } @@ -10627,7 +10627,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { func_808473D4(play, this); func_80836BEC(this, play); - if ((this->heldItemAction == PLAYER_IA_STICK) && (this->unk_860 != 0)) { + if ((this->heldItemAction == PLAYER_IA_DEKU_STICK) && (this->unk_860 != 0)) { func_80848A04(play, this); } else if ((this->heldItemAction == PLAYER_IA_FISHING_POLE) && (this->unk_860 < 0)) { this->unk_860++; @@ -10649,7 +10649,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { if (this->stateFlags2 & PLAYER_STATE2_PAUSE_MOST_UPDATING) { if (!(this->actor.bgCheckFlags & 1)) { - func_80832210(this); + Player_ZeroSpeedXZ(this); Actor_MoveForward(&this->actor); } @@ -10701,7 +10701,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { this->actor.shape.face = this->unk_3A8[0] + ((play->gameplayFrames & 32) ? 0 : 3); if (this->currentMask == PLAYER_MASK_BUNNY) { - func_8085002C(this); + Player_UpdateBunnyEars(this); } if (func_8002DD6C(this) != 0) { @@ -10838,11 +10838,11 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { if ((linkActionCsCmd != NULL) && (D_808547C4[linkActionCsCmd->action] != 0)) { func_8002DF54(play, NULL, 6); - func_80832210(this); + Player_ZeroSpeedXZ(this); } else if ((this->csMode == 0) && !(this->stateFlags2 & PLAYER_STATE2_UNDERWATER) && (play->csCtx.state != CS_STATE_UNSKIPPABLE_INIT)) { func_8002DF54(play, NULL, 0x31); - func_80832210(this); + Player_ZeroSpeedXZ(this); } } @@ -11133,11 +11133,11 @@ void Player_DrawGameplay(PlayState* play, Player* this, s32 lod, Gfx* cullDList, gSPSegment(POLY_OPA_DISP++, 0x0C, cullDList); gSPSegment(POLY_XLU_DISP++, 0x0C, cullDList); - func_8008F470(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, lod, - this->currentTunic, this->currentBoots, this->actor.shape.face, overrideLimbDraw, func_80090D20, + Player_DrawImpl(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, lod, + this->currentTunic, this->currentBoots, this->actor.shape.face, overrideLimbDraw, Player_PostLimbDrawGameplay, this); - if ((overrideLimbDraw == func_80090014) && (this->currentMask != PLAYER_MASK_NONE)) { + if ((overrideLimbDraw == Player_OverrideLimbDrawGameplayDefault) && (this->currentMask != PLAYER_MASK_NONE)) { // Fixes a bug in vanilla where ice traps are rendered extremely large while wearing a bunny hood if (CVarGetInteger("gFixIceTrapWithBunnyHood", 1)) Matrix_Push(); Mtx* sp70 = Graph_Alloc(play->state.gfxCtx, 2 * sizeof(Mtx)); @@ -11241,7 +11241,7 @@ void Player_Draw(Actor* thisx, PlayState* play2) { OPEN_DISPS(play->state.gfxCtx); if (!(this->stateFlags2 & PLAYER_STATE2_DISABLE_DRAW)) { - OverrideLimbDrawOpa overrideLimbDraw = func_80090014; + OverrideLimbDrawOpa overrideLimbDraw = Player_OverrideLimbDrawGameplayDefault; s32 lod; s32 pad; @@ -11272,11 +11272,11 @@ void Player_Draw(Actor* thisx, PlayState* play2) { SkinMatrix_Vec3fMtxFMultXYZ(&play->viewProjectionMtxF, &this->actor.focus.pos, &projectedHeadPos); if (projectedHeadPos.z < -4.0f) { - overrideLimbDraw = func_800902F0; + overrideLimbDraw = Player_OverrideLimbDrawGameplayFirstPerson; } } else if (this->stateFlags2 & PLAYER_STATE2_CRAWLING) { if (this->actor.projectedPos.z < 0.0f) { - overrideLimbDraw = func_80090440; + overrideLimbDraw = Player_OverrideLimbDrawGameplayCrawling; } } @@ -11547,7 +11547,7 @@ s32 func_8084B3CC(PlayState* play, Player* this) { this->stateFlags1 |= PLAYER_STATE1_FIRST_PERSON; func_80832264(play, this, func_80833338(this)); - func_80832210(this); + Player_ZeroSpeedXZ(this); func_8083B010(this); return 1; } @@ -11557,7 +11557,7 @@ s32 func_8084B3CC(PlayState* play, Player* this) { void func_8084B498(Player* this) { this->itemAction = - (INV_CONTENT(ITEM_OCARINA_FAIRY) == ITEM_OCARINA_FAIRY) ? PLAYER_IA_OCARINA_FAIRY : PLAYER_IA_OCARINA_TIME; + (INV_CONTENT(ITEM_OCARINA_FAIRY) == ITEM_OCARINA_FAIRY) ? PLAYER_IA_OCARINA_FAIRY : PLAYER_IA_OCARINA_OF_TIME; } s32 func_8084B4D4(PlayState* play, Player* this) { @@ -11717,7 +11717,7 @@ void func_8084B9E4(Player* this, PlayState* play) { Vec3f sp44; Vec3f sp38; - anim = D_80853914[PLAYER_ANIMGROUP_36][this->modelAnimType]; + anim = D_80853914[PLAYER_ANIMGROUP_pulling][this->modelAnimType]; this->stateFlags2 |= PLAYER_STATE2_DO_ACTION_GRAB | PLAYER_STATE2_DISABLE_ROTATION_ALWAYS | PLAYER_STATE2_GRABBING_DYNAPOLY; if (func_80832CB0(play, this, anim)) { @@ -11740,7 +11740,7 @@ void func_8084B9E4(Player* this, PlayState* play) { if (temp1 > 0) { func_8083FAB8(this, play); } else if (temp1 == 0) { - func_8083F72C(this, D_80853914[PLAYER_ANIMGROUP_37][this->modelAnimType], play); + func_8083F72C(this, D_80853914[PLAYER_ANIMGROUP_pull_end][this->modelAnimType], play); } else { this->stateFlags2 |= PLAYER_STATE2_MOVING_DYNAPOLY; } @@ -11772,7 +11772,7 @@ void func_8084BBE4(Player* this, PlayState* play) { if (LinkAnimation_Update(play, &this->skelAnime)) { // clang-format off - anim = (this->unk_84F > 0) ? &gPlayerAnim_link_normal_fall_wait : D_80853914[PLAYER_ANIMGROUP_40][this->modelAnimType]; func_80832284(play, this, anim); + anim = (this->unk_84F > 0) ? &gPlayerAnim_link_normal_fall_wait : D_80853914[PLAYER_ANIMGROUP_jump_climb_wait][this->modelAnimType]; func_80832284(play, this, anim); // clang-format on } else if (this->unk_84F == 0) { if (this->skelAnime.animation == &gPlayerAnim_link_normal_fall) { @@ -11797,9 +11797,9 @@ void func_8084BBE4(Player* this, PlayState* play) { func_80837268(this, &sp3C, &sp3A, 0.0f, play); if (this->unk_847[this->unk_846] >= 0) { if (this->unk_84F > 0) { - anim = D_80853914[PLAYER_ANIMGROUP_38][this->modelAnimType]; + anim = D_80853914[PLAYER_ANIMGROUP_fall_up][this->modelAnimType]; } else { - anim = D_80853914[PLAYER_ANIMGROUP_41][this->modelAnimType]; + anim = D_80853914[PLAYER_ANIMGROUP_jump_climb_up][this->modelAnimType]; } func_8083A9B8(this, anim, play); return; @@ -11831,13 +11831,13 @@ void func_8084BDFC(Player* this, PlayState* play) { func_808328A0(this); } else if (LinkAnimation_OnFrame(&this->skelAnime, this->skelAnime.endFrame - 34.0f)) { this->stateFlags1 &= ~(PLAYER_STATE1_HANGING_OFF_LEDGE | PLAYER_STATE1_CLIMBING_LEDGE); - func_8002F7DC(&this->actor, NA_SE_PL_CLIMB_CLIFF); + Player_PlaySfx(&this->actor, NA_SE_PL_CLIMB_CLIFF); func_80832698(this, NA_SE_VO_LI_CLIMB_END); } } void func_8084BEE4(Player* this) { - func_8002F7DC(&this->actor, (this->unk_84F != 0) ? NA_SE_PL_WALK_WALL : NA_SE_PL_WALK_LADDER); + Player_PlaySfx(&this->actor, (this->unk_84F != 0) ? NA_SE_PL_WALK_WALL : NA_SE_PL_WALK_LADDER); } void func_8084BF1C(Player* this, PlayState* play) { @@ -12226,13 +12226,13 @@ void func_8084CC98(Player* this, PlayState* play) { arr = D_80854998[(this->mountSide < 0) ? 0 : 1]; if (LinkAnimation_OnFrame(&this->skelAnime, arr[0])) { - func_8002F7DC(&this->actor, NA_SE_PL_CLIMB_CLIFF); + Player_PlaySfx(&this->actor, NA_SE_PL_CLIMB_CLIFF); return; } if (LinkAnimation_OnFrame(&this->skelAnime, arr[1])) { func_8002DE74(play, this); - func_8002F7DC(&this->actor, NA_SE_PL_SIT_ON_HORSE); + Player_PlaySfx(&this->actor, NA_SE_PL_SIT_ON_HORSE); return; } @@ -12312,7 +12312,7 @@ void func_8084CC98(Player* this, PlayState* play) { if (this->skelAnime2.animation == &gPlayerAnim_link_uma_stop_muti) { if (LinkAnimation_OnFrame(&this->skelAnime2, 23.0f)) { - func_8002F7DC(&this->actor, NA_SE_IT_LASH); + Player_PlaySfx(&this->actor, NA_SE_IT_LASH); func_80832698(this, NA_SE_VO_LI_LASH); } @@ -12320,7 +12320,7 @@ void func_8084CC98(Player* this, PlayState* play) { this->skelAnime2.jointTable); } else { if (LinkAnimation_OnFrame(&this->skelAnime2, 10.0f)) { - func_8002F7DC(&this->actor, NA_SE_IT_LASH); + Player_PlaySfx(&this->actor, NA_SE_IT_LASH); func_80832698(this, NA_SE_VO_LI_LASH); } @@ -12454,7 +12454,7 @@ void func_8084D610(Player* this, PlayState* play) { sp32 = this->actor.shape.rot.y; if (this->actor.bgCheckFlags & 1) { - func_8083A098(this, D_80853914[PLAYER_ANIMGROUP_15][this->modelAnimType], play); + func_8083A098(this, D_80853914[PLAYER_ANIMGROUP_short_landing][this->modelAnimType], play); func_808328A0(this); } } else { @@ -13103,7 +13103,7 @@ void func_8084EAC0(Player* this, PlayState* play) { func_80087708(play, CVarGetInteger("gGreenPotionMana", 100), 5); ; } - } else if (CVarGetInteger("gMilkEffect", 0) && (this->itemAction == PLAYER_IA_BOTTLE_MILK || + } else if (CVarGetInteger("gMilkEffect", 0) && (this->itemAction == PLAYER_IA_BOTTLE_MILK_FULL || this->itemAction == PLAYER_IA_BOTTLE_MILK_HALF)) { if (CVarGetInteger("gMilkPercentRestore", 0)) { gSaveContext.healthAccumulator = @@ -13196,7 +13196,7 @@ void func_8084ECA4(Player* this, PlayState* play) { if (sp24->unk_09 >= temp) { if (this->unk_850 != 0) { if (temp == 0) { - func_8002F7DC(&this->actor, NA_SE_IT_SCOOP_UP_WATER); + Player_PlaySfx(&this->actor, NA_SE_IT_SCOOP_UP_WATER); } } @@ -13242,8 +13242,8 @@ void func_8084EED8(Player* this, PlayState* play) { if (LinkAnimation_OnFrame(&this->skelAnime, 37.0f)) { Player_SpawnFairy(play, this, &this->leftHandPos, &D_80854A1C, FAIRY_REVIVE_BOTTLE); Player_UpdateBottleHeld(play, this, ITEM_BOTTLE, PLAYER_IA_BOTTLE); - func_8002F7DC(&this->actor, NA_SE_EV_BOTTLE_CAP_OPEN); - func_8002F7DC(&this->actor, NA_SE_EV_FIATY_HEAL - SFX_FLAG); + Player_PlaySfx(&this->actor, NA_SE_EV_BOTTLE_CAP_OPEN); + Player_PlaySfx(&this->actor, NA_SE_EV_FIATY_HEAL - SFX_FLAG); } else if (LinkAnimation_OnFrame(&this->skelAnime, 47.0f)) { if (CVarGetInteger("gFairyEffect", 0)) { if (CVarGetInteger("gFairyPercentRestore", 0)) { @@ -13315,7 +13315,7 @@ void func_8084F104(Player* this, PlayState* play) { } else { GetItemEntry giEntry = ItemTable_Retrieve(D_80854528[this->exchangeItemId - 1]); - if (this->itemAction >= PLAYER_IA_LETTER_ZELDA) { + if (this->itemAction >= PLAYER_IA_ZELDAS_LETTER) { if (giEntry.gi >= 0) { this->unk_862 = giEntry.gi; } else { @@ -13327,7 +13327,7 @@ void func_8084F104(Player* this, PlayState* play) { Message_StartTextbox(play, this->actor.textId, &this->actor); if ((this->itemAction == PLAYER_IA_CHICKEN) || (this->itemAction == PLAYER_IA_POCKET_CUCCO)) { - func_8002F7DC(&this->actor, NA_SE_EV_CHICKEN_CRY_M); + Player_PlaySfx(&this->actor, NA_SE_EV_CHICKEN_CRY_M); } this->unk_850 = 1; @@ -13417,9 +13417,9 @@ void func_8084F390(Player* this, PlayState* play) { if (Math_AsymStepToF(&this->linearVelocity, sp50, sp4C, sp48) && (sp50 == 0)) { LinkAnimationHeader* anim; if (this->unk_84F == 0) { - anim = D_80853914[PLAYER_ANIMGROUP_42][this->modelAnimType]; + anim = D_80853914[PLAYER_ANIMGROUP_down_slope_slip_end][this->modelAnimType]; } else { - anim = D_80853914[PLAYER_ANIMGROUP_43][this->modelAnimType]; + anim = D_80853914[PLAYER_ANIMGROUP_up_slope_slip_end][this->modelAnimType]; } func_8083A098(this, anim, play); } @@ -13553,7 +13553,7 @@ void func_8084FB10(Player* this, PlayState* play) { if (func_80832594(this, 1, 100)) { this->unk_84F = -1; EffectSsIcePiece_SpawnBurst(play, &this->actor.world.pos, this->actor.scale.x); - func_8002F7DC(&this->actor, NA_SE_PL_ICE_BROKEN); + Player_PlaySfx(&this->actor, NA_SE_PL_ICE_BROKEN); } else { this->stateFlags2 |= PLAYER_STATE2_FROZEN; } @@ -13635,7 +13635,7 @@ s32 func_8084FCAC(Player* this, PlayState* play) { } } - func_80832210(this); + Player_ZeroSpeedXZ(this); this->actor.gravity = 0.0f; this->actor.velocity.z = 0.0f; @@ -13667,7 +13667,7 @@ void func_8084FF7C(Player* this) { } } -void func_8085002C(Player* this) { +void Player_UpdateBunnyEars(Player* this) { s32 pad; s16 sp2A; s16 sp28; @@ -14001,7 +14001,7 @@ void func_80850AEC(Player* this, PlayState* play) { if ((this->skelAnime.animation != &gPlayerAnim_link_hook_fly_start) || (4.0f <= this->skelAnime.curFrame)) { this->actor.gravity = 0.0f; Math_ScaledStepToS(&this->actor.shape.rot.x, this->actor.world.rot.x, 0x800); - func_8083264C(this, 100, 2, 100, 0); + Player_RequestRumble(this, 100, 2, 100, 0); } } @@ -14281,24 +14281,24 @@ static struct_80854B18 D_80854E50[] = { void func_80850ED8(PlayState* play, Player* this, LinkAnimationHeader* anim) { func_80832DB0(this); func_80832B0C(play, this, anim); - func_80832210(this); + Player_ZeroSpeedXZ(this); } void func_80850F1C(PlayState* play, Player* this, LinkAnimationHeader* anim) { func_80832DB0(this); LinkAnimation_Change(play, &this->skelAnime, anim, (2.0f / 3.0f), 0.0f, Animation_GetLastFrame(anim), ANIMMODE_ONCE, -8.0f); - func_80832210(this); + Player_ZeroSpeedXZ(this); } void func_80850F9C(PlayState* play, Player* this, LinkAnimationHeader* anim) { func_80832DB0(this); LinkAnimation_Change(play, &this->skelAnime, anim, (2.0f / 3.0f), 0.0f, 0.0f, ANIMMODE_LOOP, -8.0f); - func_80832210(this); + Player_ZeroSpeedXZ(this); } void func_80851008(PlayState* play, Player* this, void* anim) { - func_80832210(this); + Player_ZeroSpeedXZ(this); } void func_80851030(PlayState* play, Player* this, void* anim) { @@ -14308,7 +14308,7 @@ void func_80851030(PlayState* play, Player* this, void* anim) { void func_80851050(PlayState* play, Player* this, void* anim) { func_80832DB0(this); func_80832C2C(play, this, anim); - func_80832210(this); + Player_ZeroSpeedXZ(this); } void func_80851094(PlayState* play, Player* this, void* anim) { @@ -14459,7 +14459,7 @@ void func_808515A4(PlayState* play, Player* this, CsCmdActorAction* arg2) { return; } - anim = D_80853914[PLAYER_ANIMGROUP_44][this->modelAnimType]; + anim = D_80853914[PLAYER_ANIMGROUP_nwait][this->modelAnimType]; if ((this->unk_446 == 6) || (this->unk_446 == 0x2E)) { func_80832264(play, this, anim); @@ -14469,7 +14469,7 @@ void func_808515A4(PlayState* play, Player* this, CsCmdActorAction* arg2) { ANIMMODE_LOOP, -4.0f); } - func_80832210(this); + Player_ZeroSpeedXZ(this); } void func_80851688(PlayState* play, Player* this, CsCmdActorAction* arg2) { @@ -14602,13 +14602,13 @@ void func_80851A50(PlayState* play, Player* this, CsCmdActorAction* arg2) { this->interactRangeActor->parent = &this->actor; if (!LINK_IS_ADULT) { - dLists = D_80125DE8; + dLists = gPlayerLeftHandBgsDLs; } else { - dLists = D_80125E18; + dLists = gPlayerLeftHandClosedDLs; } this->leftHandDLists = &dLists[gSaveContext.linkAge]; - func_8002F7DC(&this->actor, sp2C->unk_00); + Player_PlaySfx(&this->actor, sp2C->unk_00); if (!LINK_IS_ADULT) { func_80832698(this, sp2C->unk_02); } @@ -14782,8 +14782,8 @@ void func_808521B8(PlayState* play, Player* this, CsCmdActorAction* arg2) { } void func_808521F4(PlayState* play, Player* this, CsCmdActorAction* arg2) { - func_80832B0C(play, this, D_80853914[PLAYER_ANIMGROUP_44][this->modelAnimType]); - func_80832210(this); + func_80832B0C(play, this, D_80853914[PLAYER_ANIMGROUP_nwait][this->modelAnimType]); + Player_ZeroSpeedXZ(this); } void func_80852234(PlayState* play, Player* this, CsCmdActorAction* arg2) { @@ -14915,7 +14915,7 @@ void func_80852648(PlayState* play, Player* this, CsCmdActorAction* arg2) { this->heldItemAction = this->itemAction = PLAYER_IA_NONE; this->heldItemId = ITEM_NONE; this->modelGroup = this->nextModelGroup = Player_ActionToModelGroup(this, PLAYER_IA_NONE); - this->leftHandDLists = D_80125E08; + this->leftHandDLists = gPlayerLeftHandOpenDLs; Inventory_ChangeEquipment(EQUIP_SWORD, 2); gSaveContext.equips.buttonItems[0] = ITEM_SWORD_MASTER; Inventory_DeleteEquipment(play, 0); @@ -15047,7 +15047,7 @@ void func_80852C50(PlayState* play, Player* this, CsCmdActorAction* arg2) { if (play->csCtx.state == CS_STATE_UNSKIPPABLE_INIT) { func_8002DF54(play, NULL, 7); this->unk_446 = 0; - func_80832210(this); + Player_ZeroSpeedXZ(this); return; } diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c index d21e35c3c..aca82529c 100644 --- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c +++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c @@ -152,7 +152,7 @@ void KaleidoScope_DrawPlayerWork(PlayState* play) { extern int fbTest; gsSPSetFB(play->state.gfxCtx->polyOpa.p++, fbTest); - func_8009214C(play, pauseCtx->playerSegment, &pauseCtx->playerSkelAnime, &pos, &link_kaleido_rot, scale, + Player_DrawPause(play, pauseCtx->playerSegment, &pauseCtx->playerSkelAnime, &pos, &link_kaleido_rot, scale, CUR_EQUIP_VALUE(EQUIP_SWORD), CUR_EQUIP_VALUE(EQUIP_TUNIC) - 1, CUR_EQUIP_VALUE(EQUIP_SHIELD), CUR_EQUIP_VALUE(EQUIP_BOOTS) - 1); gsSPResetFB(play->state.gfxCtx->polyOpa.p++);