mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-28 12:22:20 -05:00
Some documentation changes for zplayer (#3172)
* Documentation changes for zplayer * Update soh/include/z64player.h Co-authored-by: Adam Bird <Archez@users.noreply.github.com> --------- Co-authored-by: Adam Bird <Archez@users.noreply.github.com>
This commit is contained in:
parent
a4b5d569b1
commit
c11a6a17e9
@ -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_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_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_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 Audio_PlayActorSound2(Actor* actor, u16 sfxId);
|
||||||
void func_8002F850(PlayState* play, Actor* actor);
|
void func_8002F850(PlayState* play, Actor* actor);
|
||||||
void func_8002F8F0(Actor* actor, u16 sfxId);
|
void func_8002F8F0(Actor* actor, u16 sfxId);
|
||||||
@ -1132,8 +1132,8 @@ s32 Player_HoldsHookshot(Player* player);
|
|||||||
s32 Player_HoldsBow(Player* player);
|
s32 Player_HoldsBow(Player* player);
|
||||||
s32 Player_HoldsSlingshot(Player* player);
|
s32 Player_HoldsSlingshot(Player* player);
|
||||||
s32 func_8008F128(Player* player);
|
s32 func_8008F128(Player* player);
|
||||||
s32 Player_ActionToSword(s32 actionParam);
|
s32 Player_ActionToMeleeWeapon(s32 actionParam);
|
||||||
s32 Player_GetSwordHeld(Player* player);
|
s32 Player_GetMeleeWeaponHeld(Player* player);
|
||||||
s32 Player_HoldsTwoHandedWeapon(Player* player);
|
s32 Player_HoldsTwoHandedWeapon(Player* player);
|
||||||
s32 Player_HoldsBrokenKnife(Player* player);
|
s32 Player_HoldsBrokenKnife(Player* player);
|
||||||
s32 Player_ActionToBottle(Player* player, s32 actionParam);
|
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_ActionToExplosive(Player* player, s32 actionParam);
|
||||||
s32 Player_GetExplosiveHeld(Player* player);
|
s32 Player_GetExplosiveHeld(Player* player);
|
||||||
s32 func_8008F2BC(Player* player, s32 actionParam);
|
s32 func_8008F2BC(Player* player, s32 actionParam);
|
||||||
s32 func_8008F2F8(PlayState* play);
|
s32 Player_GetEnvironmentalHazard(PlayState* play);
|
||||||
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* this);
|
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 Player_OverrideLimbDrawGameplayCommon(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 Player_OverrideLimbDrawGameplayDefault(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 Player_OverrideLimbDrawGameplayFirstPerson(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_OverrideLimbDrawGameplayCrawling(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* data);
|
||||||
u8 func_80090480(PlayState* play, ColliderQuad* collider, WeaponInfo* weaponDim, Vec3f* newTip,
|
u8 func_80090480(PlayState* play, ColliderQuad* collider, WeaponInfo* weaponDim, Vec3f* newTip,
|
||||||
Vec3f* newBase);
|
Vec3f* newBase);
|
||||||
void Player_DrawGetItem(PlayState* play, Player* player);
|
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);
|
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);
|
s32 sword, s32 tunic, s32 shield, s32 boots);
|
||||||
void PreNMI_Init(GameState* thisx);
|
void PreNMI_Init(GameState* thisx);
|
||||||
Vec3f* Quake_AddVec(Vec3f* dst, Vec3f* arg1, VecSph* arg2);
|
Vec3f* Quake_AddVec(Vec3f* dst, Vec3f* arg1, VecSph* arg2);
|
||||||
|
@ -83,10 +83,10 @@ extern "C"
|
|||||||
extern s16 gSpoilingItemReverts[3];
|
extern s16 gSpoilingItemReverts[3];
|
||||||
extern FlexSkeletonHeader* gPlayerSkelHeaders[2];
|
extern FlexSkeletonHeader* gPlayerSkelHeaders[2];
|
||||||
extern u8 gPlayerModelTypes[][5];
|
extern u8 gPlayerModelTypes[][5];
|
||||||
extern Gfx* D_80125DE8[];
|
extern Gfx* gPlayerLeftHandBgsDLs[];
|
||||||
extern Gfx* D_80125E08[];
|
extern Gfx* gPlayerLeftHandOpenDLs[];
|
||||||
extern Gfx* D_80125E18[];
|
extern Gfx* gPlayerLeftHandClosedDLs[];
|
||||||
extern Gfx* D_80125EF8[];
|
extern Gfx* gPlayerLeftHandBoomerangDLs[];
|
||||||
extern Gfx gCullBackDList[];
|
extern Gfx gCullBackDList[];
|
||||||
extern Gfx gCullFrontDList[];
|
extern Gfx gCullFrontDList[];
|
||||||
extern Gfx gEmptyDL[];
|
extern Gfx gEmptyDL[];
|
||||||
|
@ -13,7 +13,7 @@ typedef enum {
|
|||||||
/* 0 */ PLAYER_SWORD_NONE,
|
/* 0 */ PLAYER_SWORD_NONE,
|
||||||
/* 1 */ PLAYER_SWORD_KOKIRI,
|
/* 1 */ PLAYER_SWORD_KOKIRI,
|
||||||
/* 2 */ PLAYER_SWORD_MASTER,
|
/* 2 */ PLAYER_SWORD_MASTER,
|
||||||
/* 3 */ PLAYER_SWORD_BGS,
|
/* 3 */ PLAYER_SWORD_BIGGORON,
|
||||||
/* 4 */ PLAYER_SWORD_MAX
|
/* 4 */ PLAYER_SWORD_MAX
|
||||||
} PlayerSword;
|
} PlayerSword;
|
||||||
|
|
||||||
@ -70,8 +70,8 @@ typedef enum {
|
|||||||
/* 0x02 */ PLAYER_IA_FISHING_POLE,
|
/* 0x02 */ PLAYER_IA_FISHING_POLE,
|
||||||
/* 0x03 */ PLAYER_IA_SWORD_MASTER,
|
/* 0x03 */ PLAYER_IA_SWORD_MASTER,
|
||||||
/* 0x04 */ PLAYER_IA_SWORD_KOKIRI,
|
/* 0x04 */ PLAYER_IA_SWORD_KOKIRI,
|
||||||
/* 0x05 */ PLAYER_IA_SWORD_BGS,
|
/* 0x05 */ PLAYER_IA_SWORD_BIGGORON,
|
||||||
/* 0x06 */ PLAYER_IA_STICK,
|
/* 0x06 */ PLAYER_IA_DEKU_STICK,
|
||||||
/* 0x07 */ PLAYER_IA_HAMMER,
|
/* 0x07 */ PLAYER_IA_HAMMER,
|
||||||
/* 0x08 */ PLAYER_IA_BOW,
|
/* 0x08 */ PLAYER_IA_BOW,
|
||||||
/* 0x09 */ PLAYER_IA_BOW_FIRE,
|
/* 0x09 */ PLAYER_IA_BOW_FIRE,
|
||||||
@ -92,33 +92,33 @@ typedef enum {
|
|||||||
/* 0x18 */ PLAYER_IA_FARORES_WIND,
|
/* 0x18 */ PLAYER_IA_FARORES_WIND,
|
||||||
/* 0x19 */ PLAYER_IA_NAYRUS_LOVE,
|
/* 0x19 */ PLAYER_IA_NAYRUS_LOVE,
|
||||||
/* 0x1A */ PLAYER_IA_DINS_FIRE,
|
/* 0x1A */ PLAYER_IA_DINS_FIRE,
|
||||||
/* 0x1B */ PLAYER_IA_NUT,
|
/* 0x1B */ PLAYER_IA_DEKU_NUT,
|
||||||
/* 0x1C */ PLAYER_IA_OCARINA_FAIRY,
|
/* 0x1C */ PLAYER_IA_OCARINA_FAIRY,
|
||||||
/* 0x1D */ PLAYER_IA_OCARINA_TIME,
|
/* 0x1D */ PLAYER_IA_OCARINA_OF_TIME,
|
||||||
/* 0x1E */ PLAYER_IA_BOTTLE,
|
/* 0x1E */ PLAYER_IA_BOTTLE,
|
||||||
/* 0x1F */ PLAYER_IA_BOTTLE_FISH,
|
/* 0x1F */ PLAYER_IA_BOTTLE_FISH,
|
||||||
/* 0x20 */ PLAYER_IA_BOTTLE_FIRE,
|
/* 0x20 */ PLAYER_IA_BOTTLE_FIRE,
|
||||||
/* 0x21 */ PLAYER_IA_BOTTLE_BUG,
|
/* 0x21 */ PLAYER_IA_BOTTLE_BUG,
|
||||||
/* 0x22 */ PLAYER_IA_BOTTLE_POE,
|
/* 0x22 */ PLAYER_IA_BOTTLE_POE,
|
||||||
/* 0x23 */ PLAYER_IA_BOTTLE_BIG_POE,
|
/* 0x23 */ PLAYER_IA_BOTTLE_BIG_POE,
|
||||||
/* 0x24 */ PLAYER_IA_BOTTLE_LETTER,
|
/* 0x24 */ PLAYER_IA_BOTTLE_RUTOS_LETTER,
|
||||||
/* 0x25 */ PLAYER_IA_BOTTLE_POTION_RED,
|
/* 0x25 */ PLAYER_IA_BOTTLE_POTION_RED,
|
||||||
/* 0x26 */ PLAYER_IA_BOTTLE_POTION_BLUE,
|
/* 0x26 */ PLAYER_IA_BOTTLE_POTION_BLUE,
|
||||||
/* 0x27 */ PLAYER_IA_BOTTLE_POTION_GREEN,
|
/* 0x27 */ PLAYER_IA_BOTTLE_POTION_GREEN,
|
||||||
/* 0x28 */ PLAYER_IA_BOTTLE_MILK,
|
/* 0x28 */ PLAYER_IA_BOTTLE_MILK_FULL,
|
||||||
/* 0x29 */ PLAYER_IA_BOTTLE_MILK_HALF,
|
/* 0x29 */ PLAYER_IA_BOTTLE_MILK_HALF,
|
||||||
/* 0x2A */ PLAYER_IA_BOTTLE_FAIRY,
|
/* 0x2A */ PLAYER_IA_BOTTLE_FAIRY,
|
||||||
/* 0x2B */ PLAYER_IA_LETTER_ZELDA,
|
/* 0x2B */ PLAYER_IA_ZELDAS_LETTER,
|
||||||
/* 0x2C */ PLAYER_IA_WEIRD_EGG,
|
/* 0x2C */ PLAYER_IA_WEIRD_EGG,
|
||||||
/* 0x2D */ PLAYER_IA_CHICKEN,
|
/* 0x2D */ PLAYER_IA_CHICKEN,
|
||||||
/* 0x2E */ PLAYER_IA_BEAN,
|
/* 0x2E */ PLAYER_IA_MAGIC_BEAN,
|
||||||
/* 0x2F */ PLAYER_IA_POCKET_EGG,
|
/* 0x2F */ PLAYER_IA_POCKET_EGG,
|
||||||
/* 0x30 */ PLAYER_IA_POCKET_CUCCO,
|
/* 0x30 */ PLAYER_IA_POCKET_CUCCO,
|
||||||
/* 0x31 */ PLAYER_IA_COJIRO,
|
/* 0x31 */ PLAYER_IA_COJIRO,
|
||||||
/* 0x32 */ PLAYER_IA_ODD_MUSHROOM,
|
/* 0x32 */ PLAYER_IA_ODD_MUSHROOM,
|
||||||
/* 0x33 */ PLAYER_IA_ODD_POTION,
|
/* 0x33 */ PLAYER_IA_ODD_POTION,
|
||||||
/* 0x34 */ PLAYER_IA_SAW,
|
/* 0x34 */ PLAYER_IA_POACHERS_SAW,
|
||||||
/* 0x35 */ PLAYER_IA_SWORD_BROKEN,
|
/* 0x35 */ PLAYER_IA_BROKEN_GORONS_SWORD,
|
||||||
/* 0x36 */ PLAYER_IA_PRESCRIPTION,
|
/* 0x36 */ PLAYER_IA_PRESCRIPTION,
|
||||||
/* 0x37 */ PLAYER_IA_FROG,
|
/* 0x37 */ PLAYER_IA_FROG,
|
||||||
/* 0x38 */ PLAYER_IA_EYEDROPS,
|
/* 0x38 */ PLAYER_IA_EYEDROPS,
|
||||||
@ -126,12 +126,12 @@ typedef enum {
|
|||||||
/* 0x3A */ PLAYER_IA_MASK_KEATON,
|
/* 0x3A */ PLAYER_IA_MASK_KEATON,
|
||||||
/* 0x3B */ PLAYER_IA_MASK_SKULL,
|
/* 0x3B */ PLAYER_IA_MASK_SKULL,
|
||||||
/* 0x3C */ PLAYER_IA_MASK_SPOOKY,
|
/* 0x3C */ PLAYER_IA_MASK_SPOOKY,
|
||||||
/* 0x3D */ PLAYER_IA_MASK_BUNNY,
|
/* 0x3D */ PLAYER_IA_MASK_BUNNY_HOOD,
|
||||||
/* 0x3E */ PLAYER_IA_MASK_GORON,
|
/* 0x3E */ PLAYER_IA_MASK_GORON,
|
||||||
/* 0x3F */ PLAYER_IA_MASK_ZORA,
|
/* 0x3F */ PLAYER_IA_MASK_ZORA,
|
||||||
/* 0x40 */ PLAYER_IA_MASK_GERUDO,
|
/* 0x40 */ PLAYER_IA_MASK_GERUDO,
|
||||||
/* 0x41 */ PLAYER_IA_MASK_TRUTH,
|
/* 0x41 */ PLAYER_IA_MASK_TRUTH,
|
||||||
/* 0x42 */ PLAYER_IA_LENS,
|
/* 0x42 */ PLAYER_IA_LENS_OF_TRUTH,
|
||||||
// Upstream TODO: Document why these entries were added
|
// Upstream TODO: Document why these entries were added
|
||||||
/* 0x43 */ PLAYER_IA_SHIELD_DEKU,
|
/* 0x43 */ PLAYER_IA_SHIELD_DEKU,
|
||||||
/* 0x44 */ PLAYER_IA_SHIELD_HYLIAN,
|
/* 0x44 */ PLAYER_IA_SHIELD_HYLIAN,
|
||||||
@ -303,51 +303,51 @@ typedef enum {
|
|||||||
} PlayerAnimType;
|
} PlayerAnimType;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
/* 0x00 */ PLAYER_ANIMGROUP_0,
|
/* 0x00 */ PLAYER_ANIMGROUP_wait,
|
||||||
/* 0x01 */ PLAYER_ANIMGROUP_1,
|
/* 0x01 */ PLAYER_ANIMGROUP_walk,
|
||||||
/* 0x02 */ PLAYER_ANIMGROUP_2,
|
/* 0x02 */ PLAYER_ANIMGROUP_run,
|
||||||
/* 0x03 */ PLAYER_ANIMGROUP_3,
|
/* 0x03 */ PLAYER_ANIMGROUP_damage_run,
|
||||||
/* 0x04 */ PLAYER_ANIMGROUP_4,
|
/* 0x04 */ PLAYER_ANIMGROUP_heavy_run,
|
||||||
/* 0x05 */ PLAYER_ANIMGROUP_5,
|
/* 0x05 */ PLAYER_ANIMGROUP_waitL,
|
||||||
/* 0x06 */ PLAYER_ANIMGROUP_6,
|
/* 0x06 */ PLAYER_ANIMGROUP_waitR,
|
||||||
/* 0x07 */ PLAYER_ANIMGROUP_7,
|
/* 0x07 */ PLAYER_ANIMGROUP_wait2waitR,
|
||||||
/* 0x08 */ PLAYER_ANIMGROUP_8,
|
/* 0x08 */ PLAYER_ANIMGROUP_normal2fighter,
|
||||||
/* 0x09 */ PLAYER_ANIMGROUP_9,
|
/* 0x09 */ PLAYER_ANIMGROUP_doorA_free,
|
||||||
/* 0x0A */ PLAYER_ANIMGROUP_10,
|
/* 0x0A */ PLAYER_ANIMGROUP_doorA,
|
||||||
/* 0x0B */ PLAYER_ANIMGROUP_11,
|
/* 0x0B */ PLAYER_ANIMGROUP_doorB_free,
|
||||||
/* 0x0C */ PLAYER_ANIMGROUP_12,
|
/* 0x0C */ PLAYER_ANIMGROUP_doorB,
|
||||||
/* 0x0D */ PLAYER_ANIMGROUP_13,
|
/* 0x0D */ PLAYER_ANIMGROUP_carryB,
|
||||||
/* 0x0E */ PLAYER_ANIMGROUP_14,
|
/* 0x0E */ PLAYER_ANIMGROUP_landing,
|
||||||
/* 0x0F */ PLAYER_ANIMGROUP_15,
|
/* 0x0F */ PLAYER_ANIMGROUP_short_landing,
|
||||||
/* 0x10 */ PLAYER_ANIMGROUP_16,
|
/* 0x10 */ PLAYER_ANIMGROUP_landing_roll,
|
||||||
/* 0x11 */ PLAYER_ANIMGROUP_17,
|
/* 0x11 */ PLAYER_ANIMGROUP_hip_down,
|
||||||
/* 0x12 */ PLAYER_ANIMGROUP_18,
|
/* 0x12 */ PLAYER_ANIMGROUP_walk_endL,
|
||||||
/* 0x13 */ PLAYER_ANIMGROUP_19,
|
/* 0x13 */ PLAYER_ANIMGROUP_walk_endR,
|
||||||
/* 0x14 */ PLAYER_ANIMGROUP_20,
|
/* 0x14 */ PLAYER_ANIMGROUP_defense,
|
||||||
/* 0x15 */ PLAYER_ANIMGROUP_21,
|
/* 0x15 */ PLAYER_ANIMGROUP_defense_wait,
|
||||||
/* 0x16 */ PLAYER_ANIMGROUP_22,
|
/* 0x16 */ PLAYER_ANIMGROUP_defense_end,
|
||||||
/* 0x17 */ PLAYER_ANIMGROUP_23,
|
/* 0x17 */ PLAYER_ANIMGROUP_side_walk,
|
||||||
/* 0x18 */ PLAYER_ANIMGROUP_24,
|
/* 0x18 */ PLAYER_ANIMGROUP_side_walkL,
|
||||||
/* 0x19 */ PLAYER_ANIMGROUP_25,
|
/* 0x19 */ PLAYER_ANIMGROUP_side_walkR,
|
||||||
/* 0x1A */ PLAYER_ANIMGROUP_26,
|
/* 0x1A */ PLAYER_ANIMGROUP_45_turn,
|
||||||
/* 0x1B */ PLAYER_ANIMGROUP_27,
|
/* 0x1B */ PLAYER_ANIMGROUP_waitL2wait,
|
||||||
/* 0x1C */ PLAYER_ANIMGROUP_28,
|
/* 0x1C */ PLAYER_ANIMGROUP_waitR2wait,
|
||||||
/* 0x1D */ PLAYER_ANIMGROUP_29,
|
/* 0x1D */ PLAYER_ANIMGROUP_throw,
|
||||||
/* 0x1E */ PLAYER_ANIMGROUP_30,
|
/* 0x1E */ PLAYER_ANIMGROUP_put,
|
||||||
/* 0x1F */ PLAYER_ANIMGROUP_31,
|
/* 0x1F */ PLAYER_ANIMGROUP_back_walk,
|
||||||
/* 0x20 */ PLAYER_ANIMGROUP_32,
|
/* 0x20 */ PLAYER_ANIMGROUP_check,
|
||||||
/* 0x21 */ PLAYER_ANIMGROUP_33,
|
/* 0x21 */ PLAYER_ANIMGROUP_check_wait,
|
||||||
/* 0x22 */ PLAYER_ANIMGROUP_34,
|
/* 0x22 */ PLAYER_ANIMGROUP_check_end,
|
||||||
/* 0x23 */ PLAYER_ANIMGROUP_35,
|
/* 0x23 */ PLAYER_ANIMGROUP_pull_start,
|
||||||
/* 0x24 */ PLAYER_ANIMGROUP_36,
|
/* 0x24 */ PLAYER_ANIMGROUP_pulling,
|
||||||
/* 0x25 */ PLAYER_ANIMGROUP_37,
|
/* 0x25 */ PLAYER_ANIMGROUP_pull_end,
|
||||||
/* 0x26 */ PLAYER_ANIMGROUP_38,
|
/* 0x26 */ PLAYER_ANIMGROUP_fall_up,
|
||||||
/* 0x27 */ PLAYER_ANIMGROUP_39,
|
/* 0x27 */ PLAYER_ANIMGROUP_jump_climb_hold,
|
||||||
/* 0x28 */ PLAYER_ANIMGROUP_40,
|
/* 0x28 */ PLAYER_ANIMGROUP_jump_climb_wait,
|
||||||
/* 0x29 */ PLAYER_ANIMGROUP_41,
|
/* 0x29 */ PLAYER_ANIMGROUP_jump_climb_up,
|
||||||
/* 0x2A */ PLAYER_ANIMGROUP_42,
|
/* 0x2A */ PLAYER_ANIMGROUP_down_slope_slip_end,
|
||||||
/* 0x2B */ PLAYER_ANIMGROUP_43,
|
/* 0x2B */ PLAYER_ANIMGROUP_up_slope_slip_end,
|
||||||
/* 0x2C */ PLAYER_ANIMGROUP_44,
|
/* 0x2C */ PLAYER_ANIMGROUP_nwait,
|
||||||
/* 0x2D */ PLAYER_ANIMGROUP_MAX
|
/* 0x2D */ PLAYER_ANIMGROUP_MAX
|
||||||
} PlayerAnimGroup;
|
} PlayerAnimGroup;
|
||||||
|
|
||||||
@ -608,7 +608,7 @@ typedef struct Player {
|
|||||||
/* 0x083E */ s16 targetYaw;
|
/* 0x083E */ s16 targetYaw;
|
||||||
/* 0x0840 */ u16 unk_840;
|
/* 0x0840 */ u16 unk_840;
|
||||||
/* 0x0842 */ s8 meleeWeaponAnimation;
|
/* 0x0842 */ s8 meleeWeaponAnimation;
|
||||||
/* 0x0843 */ s8 swordState; // Upstream TODO: meleeWeaponState
|
/* 0x0843 */ s8 meleeWeaponState;
|
||||||
/* 0x0844 */ s8 unk_844;
|
/* 0x0844 */ s8 unk_844;
|
||||||
/* 0x0845 */ u8 unk_845;
|
/* 0x0845 */ u8 unk_845;
|
||||||
/* 0x0846 */ u8 unk_846;
|
/* 0x0846 */ u8 unk_846;
|
||||||
|
@ -1620,7 +1620,7 @@ void DrawPlayerTab() {
|
|||||||
gSaveContext.equips.buttonItems[0] = ITEM_SWORD_KNIFE;
|
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")) {
|
if (ImGui::Selectable("Fishing Pole")) {
|
||||||
player->currentSwordItemId = ITEM_FISHING_POLE;
|
player->currentSwordItemId = ITEM_FISHING_POLE;
|
||||||
@ -1725,7 +1725,7 @@ void DrawPlayerTab() {
|
|||||||
}
|
}
|
||||||
DrawGroupWithBorder([&]() {
|
DrawGroupWithBorder([&]() {
|
||||||
ImGui::Text("Sword");
|
ImGui::Text("Sword");
|
||||||
ImGui::Text(" %d", player->swordState);
|
ImGui::Text(" %d", player->meleeWeaponState);
|
||||||
});
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -140,7 +140,7 @@ void RegisterInfiniteISG() {
|
|||||||
|
|
||||||
if (CVarGetInteger("gEzISG", 0) != 0) {
|
if (CVarGetInteger("gEzISG", 0) != 0) {
|
||||||
Player* player = GET_PLAYER(gPlayState);
|
Player* player = GET_PLAYER(gPlayState);
|
||||||
player->swordState = 1;
|
player->meleeWeaponState = 1;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -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);
|
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) {
|
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);
|
Audio_PlaySoundGeneral(sfxId, &actor->projectedPos, 4, &D_801333E0 , &D_801333E0, &D_801333E8);
|
||||||
} else {
|
} 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;
|
var1 = (s16)(actor->yawTowardsPlayer + 0x8000) - player->actor.shape.rot.y;
|
||||||
var2 = actor->yawTowardsPlayer - arg5;
|
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;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
@ -4554,7 +4554,7 @@ void func_800355B8(PlayState* play, Vec3f* pos) {
|
|||||||
u8 func_800355E4(PlayState* play, Collider* collider) {
|
u8 func_800355E4(PlayState* play, Collider* collider) {
|
||||||
Player* player = GET_PLAYER(play);
|
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;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
@ -3083,7 +3083,7 @@ s32 Camera_Battle1(Camera* camera) {
|
|||||||
}
|
}
|
||||||
anim->roll += (((OREG(36) * camera->speedRatio) * (1.0f - distRatio)) - anim->roll) * PCT(OREG(37));
|
anim->roll += (((OREG(36) * camera->speedRatio) * (1.0f - distRatio)) - anim->roll) * PCT(OREG(37));
|
||||||
camera->roll = DEGF_TO_BINANG(anim->roll);
|
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
|
: gSaveContext.health <= 0x10 ? 0.8f
|
||||||
: 1.0f) *
|
: 1.0f) *
|
||||||
(fov - ((fov * 0.05f) * distRatio)),
|
(fov - ((fov * 0.05f) * distRatio)),
|
||||||
|
@ -929,7 +929,7 @@ void func_80083108(PlayState* play) {
|
|||||||
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
|
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
|
||||||
gSaveContext.buttonStatus[3] = gSaveContext.buttonStatus[5] = gSaveContext.buttonStatus[6] =
|
gSaveContext.buttonStatus[3] = gSaveContext.buttonStatus[5] = gSaveContext.buttonStatus[6] =
|
||||||
gSaveContext.buttonStatus[7] = gSaveContext.buttonStatus[8] = BTN_DISABLED;
|
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) {
|
if (gSaveContext.buttonStatus[0] != BTN_DISABLED) {
|
||||||
sp28 = 1;
|
sp28 = 1;
|
||||||
}
|
}
|
||||||
@ -945,7 +945,7 @@ void func_80083108(PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
gSaveContext.buttonStatus[BUTTON_STATUS_INDEX(i)] = BTN_ENABLED;
|
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) &&
|
if ((gSaveContext.equips.buttonItems[i] != ITEM_HOOKSHOT) &&
|
||||||
(gSaveContext.equips.buttonItems[i] != ITEM_LONGSHOT)) {
|
(gSaveContext.equips.buttonItems[i] != ITEM_LONGSHOT)) {
|
||||||
if (gSaveContext.buttonStatus[BUTTON_STATUS_INDEX(i)] == BTN_ENABLED) {
|
if (gSaveContext.buttonStatus[BUTTON_STATUS_INDEX(i)] == BTN_ENABLED) {
|
||||||
@ -3367,7 +3367,7 @@ void Interface_UpdateMagicBar(PlayState* play) {
|
|||||||
break;
|
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 ||
|
!hasLens ||
|
||||||
!play->actorCtx.lensActive) {
|
!play->actorCtx.lensActive) {
|
||||||
play->actorCtx.lensActive = false;
|
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)) {
|
if ((gSaveContext.unk_13EA == 1) || (gSaveContext.unk_13EA == 2) || (gSaveContext.unk_13EA == 5)) {
|
||||||
temp = 0;
|
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)) {
|
(player->stateFlags2 & PLAYER_STATE2_CRAWLING)) {
|
||||||
temp = 70;
|
temp = 70;
|
||||||
} else {
|
} else {
|
||||||
@ -6396,13 +6396,13 @@ void Interface_Update(PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
HealthMeter_HandleCriticalAlarm(play);
|
HealthMeter_HandleCriticalAlarm(play);
|
||||||
D_80125A58 = func_8008F2F8(play);
|
D_80125A58 = Player_GetEnvironmentalHazard(play);
|
||||||
|
|
||||||
if (D_80125A58 == 1) {
|
if (D_80125A58 == 1) {
|
||||||
if (CUR_EQUIP_VALUE(EQUIP_TUNIC) == 2 || CVarGetInteger("gSuperTunic", 0) != 0) {
|
if (CUR_EQUIP_VALUE(EQUIP_TUNIC) == 2 || CVarGetInteger("gSuperTunic", 0) != 0) {
|
||||||
D_80125A58 = 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) {
|
if (CUR_EQUIP_VALUE(EQUIP_TUNIC) == 3 || CVarGetInteger("gSuperTunic", 0) != 0) {
|
||||||
D_80125A58 = 0;
|
D_80125A58 = 0;
|
||||||
}
|
}
|
||||||
|
@ -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 },
|
{ 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,
|
gLinkAdultRightHandClosedNearDL,
|
||||||
gLinkChildRightHandClosedNearDL,
|
gLinkChildRightHandClosedNearDL,
|
||||||
gLinkAdultRightHandClosedFarDL,
|
gLinkAdultRightHandClosedFarDL,
|
||||||
@ -72,7 +72,7 @@ Gfx* D_80125CE8[] = {
|
|||||||
gLinkChildRightHandClosedFarDL,
|
gLinkChildRightHandClosedFarDL,
|
||||||
};
|
};
|
||||||
|
|
||||||
Gfx* D_80125D28[] = {
|
Gfx* sSheathWithSwordDLs[] = {
|
||||||
gLinkAdultMasterSwordAndSheathNearDL, gLinkChildSwordAndSheathNearDL,
|
gLinkAdultMasterSwordAndSheathNearDL, gLinkChildSwordAndSheathNearDL,
|
||||||
gLinkAdultMasterSwordAndSheathFarDL, gLinkChildSwordAndSheathFarDL,
|
gLinkAdultMasterSwordAndSheathFarDL, gLinkChildSwordAndSheathFarDL,
|
||||||
gLinkAdultMasterSwordAndSheathNearDL, gLinkChildDekuShieldSwordAndSheathNearDL,
|
gLinkAdultMasterSwordAndSheathNearDL, gLinkChildDekuShieldSwordAndSheathNearDL,
|
||||||
@ -87,7 +87,7 @@ Gfx* D_80125D28[] = {
|
|||||||
NULL, gLinkChildDekuShieldWithMatrixDL,
|
NULL, gLinkChildDekuShieldWithMatrixDL,
|
||||||
};
|
};
|
||||||
|
|
||||||
Gfx* D_80125D88[] = {
|
Gfx* sSheathWithoutSwordDLs[] = {
|
||||||
gLinkAdultSheathNearDL,
|
gLinkAdultSheathNearDL,
|
||||||
gLinkChildSheathNearDL,
|
gLinkChildSheathNearDL,
|
||||||
gLinkAdultSheathFarDL,
|
gLinkAdultSheathFarDL,
|
||||||
@ -114,162 +114,162 @@ Gfx* D_80125D88[] = {
|
|||||||
gLinkChildDekuShieldWithMatrixDL,
|
gLinkChildDekuShieldWithMatrixDL,
|
||||||
};
|
};
|
||||||
|
|
||||||
Gfx* D_80125DE8[] = {
|
Gfx* gPlayerLeftHandBgsDLs[] = {
|
||||||
gLinkAdultLeftHandHoldingBgsNearDL, gLinkChildLeftHandHoldingMasterSwordDL,
|
gLinkAdultLeftHandHoldingBgsNearDL, gLinkChildLeftHandHoldingMasterSwordDL,
|
||||||
gLinkAdultLeftHandHoldingBgsFarDL, gLinkChildLeftHandHoldingMasterSwordDL,
|
gLinkAdultLeftHandHoldingBgsFarDL, gLinkChildLeftHandHoldingMasterSwordDL,
|
||||||
gLinkAdultHandHoldingBrokenGiantsKnifeDL, gLinkChildLeftHandHoldingMasterSwordDL,
|
gLinkAdultHandHoldingBrokenGiantsKnifeDL, gLinkChildLeftHandHoldingMasterSwordDL,
|
||||||
gLinkAdultHandHoldingBrokenGiantsKnifeFarDL, gLinkChildLeftHandHoldingMasterSwordDL,
|
gLinkAdultHandHoldingBrokenGiantsKnifeFarDL, gLinkChildLeftHandHoldingMasterSwordDL,
|
||||||
};
|
};
|
||||||
|
|
||||||
Gfx* D_80125E08[] = {
|
Gfx* gPlayerLeftHandOpenDLs[] = {
|
||||||
gLinkAdultLeftHandNearDL,
|
gLinkAdultLeftHandNearDL,
|
||||||
gLinkChildLeftHandNearDL,
|
gLinkChildLeftHandNearDL,
|
||||||
gLinkAdultLeftHandFarDL,
|
gLinkAdultLeftHandFarDL,
|
||||||
gLinkChildLeftHandFarDL,
|
gLinkChildLeftHandFarDL,
|
||||||
};
|
};
|
||||||
|
|
||||||
Gfx* D_80125E18[] = {
|
Gfx* gPlayerLeftHandClosedDLs[] = {
|
||||||
gLinkAdultLeftHandClosedNearDL,
|
gLinkAdultLeftHandClosedNearDL,
|
||||||
gLinkChildLeftFistNearDL,
|
gLinkChildLeftFistNearDL,
|
||||||
gLinkAdultLeftHandClosedFarDL,
|
gLinkAdultLeftHandClosedFarDL,
|
||||||
gLinkChildLeftFistFarDL,
|
gLinkChildLeftFistFarDL,
|
||||||
};
|
};
|
||||||
|
|
||||||
Gfx* D_80125E28[] = {
|
Gfx* sPlayerLeftHandSwordDLs2[] = {
|
||||||
gLinkAdultLeftHandHoldingMasterSwordNearDL,
|
gLinkAdultLeftHandHoldingMasterSwordNearDL,
|
||||||
gLinkChildLeftFistAndKokiriSwordNearDL,
|
gLinkChildLeftFistAndKokiriSwordNearDL,
|
||||||
gLinkAdultLeftHandHoldingMasterSwordFarDL,
|
gLinkAdultLeftHandHoldingMasterSwordFarDL,
|
||||||
gLinkChildLeftFistAndKokiriSwordFarDL,
|
gLinkChildLeftFistAndKokiriSwordFarDL,
|
||||||
};
|
};
|
||||||
|
|
||||||
Gfx* D_80125E38[] = {
|
Gfx* sPlayerLeftHandSwordDLs[] = {
|
||||||
gLinkAdultLeftHandHoldingMasterSwordNearDL,
|
gLinkAdultLeftHandHoldingMasterSwordNearDL,
|
||||||
gLinkChildLeftFistAndKokiriSwordNearDL,
|
gLinkChildLeftFistAndKokiriSwordNearDL,
|
||||||
gLinkAdultLeftHandHoldingMasterSwordFarDL,
|
gLinkAdultLeftHandHoldingMasterSwordFarDL,
|
||||||
gLinkChildLeftFistAndKokiriSwordFarDL,
|
gLinkChildLeftFistAndKokiriSwordFarDL,
|
||||||
};
|
};
|
||||||
|
|
||||||
Gfx* D_80125E48[] = {
|
Gfx* sPlayerRightHandOpenDLs[] = {
|
||||||
gLinkAdultRightHandNearDL,
|
gLinkAdultRightHandNearDL,
|
||||||
gLinkChildRightHandNearDL,
|
gLinkChildRightHandNearDL,
|
||||||
gLinkAdultRightHandFarDL,
|
gLinkAdultRightHandFarDL,
|
||||||
gLinkChildRightHandFarDL,
|
gLinkChildRightHandFarDL,
|
||||||
};
|
};
|
||||||
|
|
||||||
Gfx* D_80125E58[] = {
|
Gfx* sPlayerRightHandClosedDLs[] = {
|
||||||
gLinkAdultRightHandClosedNearDL,
|
gLinkAdultRightHandClosedNearDL,
|
||||||
gLinkChildRightHandClosedNearDL,
|
gLinkChildRightHandClosedNearDL,
|
||||||
gLinkAdultRightHandClosedFarDL,
|
gLinkAdultRightHandClosedFarDL,
|
||||||
gLinkChildRightHandClosedFarDL,
|
gLinkChildRightHandClosedFarDL,
|
||||||
};
|
};
|
||||||
|
|
||||||
Gfx* D_80125E68[] = {
|
Gfx* sPlayerRightHandBowSlingshotDLs[] = {
|
||||||
gLinkAdultRightHandHoldingBowNearDL,
|
gLinkAdultRightHandHoldingBowNearDL,
|
||||||
gLinkChildRightHandHoldingSlingshotNearDL,
|
gLinkChildRightHandHoldingSlingshotNearDL,
|
||||||
gLinkAdultRightHandHoldingBowFarDL,
|
gLinkAdultRightHandHoldingBowFarDL,
|
||||||
gLinkChildRightHandHoldingSlingshotFarDL,
|
gLinkChildRightHandHoldingSlingshotFarDL,
|
||||||
};
|
};
|
||||||
|
|
||||||
Gfx* D_80125E78[] = {
|
Gfx* sSwordAndSheathDLs[] = {
|
||||||
gLinkAdultMasterSwordAndSheathNearDL,
|
gLinkAdultMasterSwordAndSheathNearDL,
|
||||||
gLinkChildSwordAndSheathNearDL,
|
gLinkChildSwordAndSheathNearDL,
|
||||||
gLinkAdultMasterSwordAndSheathFarDL,
|
gLinkAdultMasterSwordAndSheathFarDL,
|
||||||
gLinkChildSwordAndSheathFarDL,
|
gLinkChildSwordAndSheathFarDL,
|
||||||
};
|
};
|
||||||
|
|
||||||
Gfx* D_80125E88[] = {
|
Gfx* sSheathDLs[] = {
|
||||||
gLinkAdultSheathNearDL,
|
gLinkAdultSheathNearDL,
|
||||||
gLinkChildSheathNearDL,
|
gLinkChildSheathNearDL,
|
||||||
gLinkAdultSheathFarDL,
|
gLinkAdultSheathFarDL,
|
||||||
gLinkChildSheathFarDL,
|
gLinkChildSheathFarDL,
|
||||||
};
|
};
|
||||||
|
|
||||||
Gfx* D_80125E98[] = {
|
Gfx* sPlayerWaistDLs[] = {
|
||||||
gLinkAdultWaistNearDL,
|
gLinkAdultWaistNearDL,
|
||||||
gLinkChildWaistNearDL,
|
gLinkChildWaistNearDL,
|
||||||
gLinkAdultWaistFarDL,
|
gLinkAdultWaistFarDL,
|
||||||
gLinkChildWaistFarDL,
|
gLinkChildWaistFarDL,
|
||||||
};
|
};
|
||||||
|
|
||||||
Gfx* D_80125EA8[] = {
|
Gfx* sPlayerRightHandBowSlingshotDLs2[] = {
|
||||||
gLinkAdultRightHandHoldingBowNearDL,
|
gLinkAdultRightHandHoldingBowNearDL,
|
||||||
gLinkChildRightHandHoldingSlingshotNearDL,
|
gLinkChildRightHandHoldingSlingshotNearDL,
|
||||||
gLinkAdultRightHandHoldingBowFarDL,
|
gLinkAdultRightHandHoldingBowFarDL,
|
||||||
gLinkChildRightHandHoldingSlingshotFarDL,
|
gLinkChildRightHandHoldingSlingshotFarDL,
|
||||||
};
|
};
|
||||||
|
|
||||||
Gfx* D_80125EB8[] = {
|
Gfx* sPlayerRightHandOcarinaDLs[] = {
|
||||||
gLinkAdultRightHandHoldingOotNearDL,
|
gLinkAdultRightHandHoldingOotNearDL,
|
||||||
gLinkChildRightHandHoldingFairyOcarinaNearDL,
|
gLinkChildRightHandHoldingFairyOcarinaNearDL,
|
||||||
gLinkAdultRightHandHoldingOotFarDL,
|
gLinkAdultRightHandHoldingOotFarDL,
|
||||||
gLinkChildRightHandHoldingFairyOcarinaFarDL,
|
gLinkChildRightHandHoldingFairyOcarinaFarDL,
|
||||||
};
|
};
|
||||||
|
|
||||||
Gfx* D_80125EC8[] = {
|
Gfx* sPlayerRightHandOotDLs[] = {
|
||||||
gLinkAdultRightHandHoldingOotNearDL,
|
gLinkAdultRightHandHoldingOotNearDL,
|
||||||
gLinkChildRightHandAndOotNearDL,
|
gLinkChildRightHandAndOotNearDL,
|
||||||
gLinkAdultRightHandHoldingOotFarDL,
|
gLinkAdultRightHandHoldingOotFarDL,
|
||||||
gLinkChildRightHandHoldingOOTFarDL,
|
gLinkChildRightHandHoldingOOTFarDL,
|
||||||
};
|
};
|
||||||
|
|
||||||
Gfx* D_80125ED8[] = {
|
Gfx* sPlayerRightHandHookshotDLs[] = {
|
||||||
gLinkAdultRightHandHoldingHookshotNearDL,
|
gLinkAdultRightHandHoldingHookshotNearDL,
|
||||||
gLinkChildRightHandNearDL,
|
gLinkChildRightHandNearDL,
|
||||||
gLinkAdultRightHandHoldingHookshotNearDL, // The 'far' display list exists but is not used
|
gLinkAdultRightHandHoldingHookshotNearDL, // The 'far' display list exists but is not used
|
||||||
gLinkChildRightHandFarDL,
|
gLinkChildRightHandFarDL,
|
||||||
};
|
};
|
||||||
|
|
||||||
Gfx* D_80125EE8[] = {
|
Gfx* sPlayerLeftHandHammerDLs[] = {
|
||||||
gLinkAdultLeftHandHoldingHammerNearDL,
|
gLinkAdultLeftHandHoldingHammerNearDL,
|
||||||
gLinkChildLeftHandNearDL,
|
gLinkChildLeftHandNearDL,
|
||||||
gLinkAdultLeftHandHoldingHammerFarDL,
|
gLinkAdultLeftHandHoldingHammerFarDL,
|
||||||
gLinkChildLeftHandFarDL,
|
gLinkChildLeftHandFarDL,
|
||||||
};
|
};
|
||||||
|
|
||||||
Gfx* D_80125EF8[] = {
|
Gfx* gPlayerLeftHandBoomerangDLs[] = {
|
||||||
gLinkAdultLeftHandNearDL,
|
gLinkAdultLeftHandNearDL,
|
||||||
gLinkChildLeftFistAndBoomerangNearDL,
|
gLinkChildLeftFistAndBoomerangNearDL,
|
||||||
gLinkAdultLeftHandFarDL,
|
gLinkAdultLeftHandFarDL,
|
||||||
gLinkChildLeftFistAndBoomerangFarDL,
|
gLinkChildLeftFistAndBoomerangFarDL,
|
||||||
};
|
};
|
||||||
|
|
||||||
Gfx* D_80125F08[] = {
|
Gfx* sPlayerLeftHandBottleDLs[] = {
|
||||||
gLinkAdultLeftHandOutNearDL,
|
gLinkAdultLeftHandOutNearDL,
|
||||||
gLinkChildLeftHandUpNearDL,
|
gLinkChildLeftHandUpNearDL,
|
||||||
gLinkAdultLeftHandOutNearDL,
|
gLinkAdultLeftHandOutNearDL,
|
||||||
gLinkChildLeftHandUpNearDL,
|
gLinkChildLeftHandUpNearDL,
|
||||||
};
|
};
|
||||||
|
|
||||||
Gfx* sArmOutDLs[] = {
|
Gfx* sFirstPersonLeftForearmDLs[] = {
|
||||||
gLinkAdultRightArmOutNearDL,
|
gLinkAdultRightArmOutNearDL,
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
Gfx* sHandOutDLs[] = {
|
Gfx* sFirstPersonLeftHandDLs[] = {
|
||||||
gLinkAdultRightHandOutNearDL,
|
gLinkAdultRightHandOutNearDL,
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
Gfx* sRightShoulderNearDLs[] = {
|
Gfx* sFirstPersonRightShoulderDLs[] = {
|
||||||
gLinkAdultRightShoulderNearDL,
|
gLinkAdultRightShoulderNearDL,
|
||||||
gLinkChildRightShoulderNearDL,
|
gLinkChildRightShoulderNearDL,
|
||||||
};
|
};
|
||||||
|
|
||||||
Gfx* D_80125F30[] = {
|
Gfx* sFirstPersonForearmDLs[] = {
|
||||||
gLinkAdultLeftArmOutNearDL,
|
gLinkAdultLeftArmOutNearDL,
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
|
|
||||||
Gfx* sHoldingFirstPersonWeaponDLs[] = {
|
Gfx* sFirstPersonRightHandHoldingWeaponDLs[] = {
|
||||||
gLinkAdultRightHandHoldingBowFirstPersonDL,
|
gLinkAdultRightHandHoldingBowFirstPersonDL,
|
||||||
gLinkChildRightArmStretchedSlingshotDL,
|
gLinkChildRightArmStretchedSlingshotDL,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Indexed by model types (left hand, right hand, sheath or waist)
|
// Indexed by model types (left hand, right hand, sheath or waist)
|
||||||
Gfx** sPlayerDListGroups[] = {
|
Gfx** sPlayerDListGroups[] = {
|
||||||
D_80125E08, D_80125E18, D_80125E38, D_80125E28, D_80125DE8, D_80125EE8, D_80125EF8,
|
gPlayerLeftHandOpenDLs, gPlayerLeftHandClosedDLs, sPlayerLeftHandSwordDLs, sPlayerLeftHandSwordDLs2, gPlayerLeftHandBgsDLs, sPlayerLeftHandHammerDLs, gPlayerLeftHandBoomerangDLs,
|
||||||
D_80125F08, D_80125E48, D_80125E58, D_80125CE8, D_80125E68, D_80125EA8, D_80125EB8,
|
sPlayerLeftHandBottleDLs, sPlayerRightHandOpenDLs, sPlayerRightHandClosedDLs, sPlayerRightHandShieldDLs, sPlayerRightHandBowSlingshotDLs, sPlayerRightHandBowSlingshotDLs2, sPlayerRightHandOcarinaDLs,
|
||||||
D_80125EC8, D_80125ED8, D_80125E78, D_80125E88, D_80125D28, D_80125D88, D_80125E98,
|
sPlayerRightHandOotDLs, sPlayerRightHandHookshotDLs, sSwordAndSheathDLs, sSheathDLs, sSheathWithSwordDLs, sSheathWithoutSwordDLs, sPlayerWaistDLs,
|
||||||
};
|
};
|
||||||
|
|
||||||
Gfx gCullBackDList[] = {
|
Gfx gCullBackDList[] = {
|
||||||
@ -285,8 +285,8 @@ Gfx gCullFrontDList[] = {
|
|||||||
Vec3f* D_80160000;
|
Vec3f* D_80160000;
|
||||||
s32 sDListsLodOffset;
|
s32 sDListsLodOffset;
|
||||||
Vec3f sGetItemRefPos;
|
Vec3f sGetItemRefPos;
|
||||||
s32 D_80160014;
|
s32 sLeftHandType;
|
||||||
s32 D_80160018;
|
s32 sRightHandType;
|
||||||
|
|
||||||
void Player_SetBootData(PlayState* play, Player* this) {
|
void Player_SetBootData(PlayState* play, Player* this) {
|
||||||
s32 currentBoots;
|
s32 currentBoots;
|
||||||
@ -371,7 +371,7 @@ s32 Player_ActionToModelGroup(Player* this, s32 actionParam) {
|
|||||||
void Player_SetModelsForHoldingShield(Player* this) {
|
void Player_SetModelsForHoldingShield(Player* this) {
|
||||||
if ((this->stateFlags1 & 0x400000) &&
|
if ((this->stateFlags1 & 0x400000) &&
|
||||||
((this->itemAction < 0) || (this->itemAction == this->heldItemAction))) {
|
((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)) {
|
!Player_HoldsTwoHandedWeapon(this)) && !Player_IsChildWithHylianShield(this)) {
|
||||||
this->rightHandType = 10;
|
this->rightHandType = 10;
|
||||||
this->rightHandDLists = &sPlayerDListGroups[10][gSaveContext.linkAge];
|
this->rightHandDLists = &sPlayerDListGroups[10][gSaveContext.linkAge];
|
||||||
@ -497,7 +497,7 @@ s32 Player_IsBurningStickInRange(PlayState* play, Vec3f* pos, f32 xzRange, f32 y
|
|||||||
Vec3f diff;
|
Vec3f diff;
|
||||||
s32 pad;
|
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);
|
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);
|
return ((SQ(diff.x) + SQ(diff.z)) <= SQ(xzRange)) && (0.0f <= diff.y) && (diff.y <= yRange);
|
||||||
} else {
|
} else {
|
||||||
@ -577,7 +577,7 @@ s32 func_8008F128(Player* this) {
|
|||||||
return Player_HoldsHookshot(this) && (this->heldActor == NULL);
|
return Player_HoldsHookshot(this) && (this->heldActor == NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 Player_ActionToSword(s32 actionParam) {
|
s32 Player_ActionToMeleeWeapon(s32 actionParam) {
|
||||||
s32 sword = actionParam - PLAYER_IA_FISHING_POLE;
|
s32 sword = actionParam - PLAYER_IA_FISHING_POLE;
|
||||||
|
|
||||||
if ((sword > 0) && (sword < 6)) {
|
if ((sword > 0) && (sword < 6)) {
|
||||||
@ -587,12 +587,12 @@ s32 Player_ActionToSword(s32 actionParam) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 Player_GetSwordHeld(Player* this) {
|
s32 Player_GetMeleeWeaponHeld(Player* this) {
|
||||||
return Player_ActionToSword(this->heldItemAction);
|
return Player_ActionToMeleeWeapon(this->heldItemAction);
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 Player_HoldsTwoHandedWeapon(Player* this) {
|
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;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
@ -600,7 +600,7 @@ s32 Player_HoldsTwoHandedWeapon(Player* this) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
s32 Player_HoldsBrokenKnife(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) {
|
s32 Player_ActionToBottle(Player* this, s32 actionParam) {
|
||||||
@ -647,7 +647,7 @@ return_neg:
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_8008F2F8(PlayState* play) {
|
s32 Player_GetEnvironmentalHazard(PlayState* play) {
|
||||||
Player* this = GET_PLAYER(play);
|
Player* this = GET_PLAYER(play);
|
||||||
TextTriggerEntry* triggerEntry;
|
TextTriggerEntry* triggerEntry;
|
||||||
s32 var;
|
s32 var;
|
||||||
@ -747,7 +747,7 @@ Gfx* sBootDListGroups[][2] = {
|
|||||||
{ gLinkAdultLeftHoverBootDL, gLinkAdultRightHoverBootDL },
|
{ 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,
|
s32 boots, s32 face, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw,
|
||||||
void* data) {
|
void* data) {
|
||||||
Color_RGB8* color;
|
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);
|
SkelAnime_DrawFlexLod(play, skeleton, jointTable, dListCount, overrideLimbDraw, postLimbDraw, data, lod);
|
||||||
|
|
||||||
if (((CVarGetInteger("gFPSGauntlets", 0) && LINK_IS_ADULT) || (overrideLimbDraw != func_800902F0)) &&
|
if (((CVarGetInteger("gFPSGauntlets", 0) && LINK_IS_ADULT) || (overrideLimbDraw != Player_OverrideLimbDrawGameplayFirstPerson)) &&
|
||||||
(overrideLimbDraw != func_80090440) &&
|
(overrideLimbDraw != Player_OverrideLimbDrawGameplayCrawling) &&
|
||||||
(gSaveContext.gameMode != 3)) {
|
(gSaveContext.gameMode != 3)) {
|
||||||
if (LINK_IS_ADULT) {
|
if (LINK_IS_ADULT) {
|
||||||
s32 strengthUpgrade = CUR_UPG_VALUE(UPG_STRENGTH);
|
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++, gLinkAdultLeftGauntletPlate1DL);
|
||||||
gSPDisplayList(POLY_OPA_DISP++, gLinkAdultRightGauntletPlate1DL);
|
gSPDisplayList(POLY_OPA_DISP++, gLinkAdultRightGauntletPlate1DL);
|
||||||
gSPDisplayList(POLY_OPA_DISP++,
|
gSPDisplayList(POLY_OPA_DISP++,
|
||||||
(D_80160014 == 0) ? gLinkAdultLeftGauntletPlate2DL : gLinkAdultLeftGauntletPlate3DL);
|
(sLeftHandType == 0) ? gLinkAdultLeftGauntletPlate2DL : gLinkAdultLeftGauntletPlate3DL);
|
||||||
gSPDisplayList(POLY_OPA_DISP++,
|
gSPDisplayList(POLY_OPA_DISP++,
|
||||||
(D_80160018 == 8) ? gLinkAdultRightGauntletPlate2DL : gLinkAdultRightGauntletPlate3DL);
|
(sRightHandType == 8) ? gLinkAdultRightGauntletPlate2DL : gLinkAdultRightGauntletPlate3DL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (boots != 0) {
|
if (boots != 0) {
|
||||||
@ -848,7 +848,7 @@ void func_8008F470(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dLis
|
|||||||
CLOSE_DISPS(play->state.gfxCtx);
|
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[] = {
|
Vec3f D_80126038[] = {
|
||||||
{ 1304.0f, 0.0f, 0.0f },
|
{ 1304.0f, 0.0f, 0.0f },
|
||||||
@ -896,10 +896,10 @@ void func_8008F87C(PlayState* play, Player* this, SkelAnime* skelAnime, Vec3f* p
|
|||||||
|
|
||||||
Matrix_Push();
|
Matrix_Push();
|
||||||
Matrix_TranslateRotateZYX(pos, rot);
|
Matrix_TranslateRotateZYX(pos, rot);
|
||||||
Matrix_MultVec3f(&D_8012602C, &spA4);
|
Matrix_MultVec3f(&sZeroVec, &spA4);
|
||||||
Matrix_TranslateRotateZYX(&D_80126038[gSaveContext.linkAge], &skelAnime->jointTable[shinLimbIndex]);
|
Matrix_TranslateRotateZYX(&D_80126038[gSaveContext.linkAge], &skelAnime->jointTable[shinLimbIndex]);
|
||||||
Matrix_Translate(D_80126050[gSaveContext.linkAge], 0.0f, 0.0f, MTXMODE_APPLY);
|
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_MultVec3f(&D_80126070, &footprintPos);
|
||||||
Matrix_Pop();
|
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;
|
Player* this = (Player*)thisx;
|
||||||
|
|
||||||
if (limbIndex == PLAYER_LIMB_ROOT) {
|
if (limbIndex == PLAYER_LIMB_ROOT) {
|
||||||
D_80160014 = this->leftHandType;
|
sLeftHandType = this->leftHandType;
|
||||||
D_80160018 = this->rightHandType;
|
sRightHandType = this->rightHandType;
|
||||||
D_80160000 = &this->meleeWeaponInfo[2].base;
|
D_80160000 = &this->meleeWeaponInfo[2].base;
|
||||||
|
|
||||||
if (!LINK_IS_ADULT) {
|
if (!LINK_IS_ADULT) {
|
||||||
@ -1036,33 +1036,33 @@ s32 func_8008FCC8(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s
|
|||||||
return false;
|
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;
|
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) {
|
if (limbIndex == PLAYER_LIMB_L_HAND) {
|
||||||
Gfx** dLists = this->leftHandDLists;
|
Gfx** dLists = this->leftHandDLists;
|
||||||
|
|
||||||
if ((D_80160014 == 4) && (gSaveContext.swordHealth <= 0.0f)) {
|
if ((sLeftHandType == 4) && (gSaveContext.swordHealth <= 0.0f)) {
|
||||||
dLists += 4;
|
dLists += 4;
|
||||||
} else if ((D_80160014 == 6) && (this->stateFlags1 & 0x2000000)) {
|
} else if ((sLeftHandType == 6) && (this->stateFlags1 & 0x2000000)) {
|
||||||
dLists = &D_80125E08[gSaveContext.linkAge];
|
dLists = &gPlayerLeftHandOpenDLs[gSaveContext.linkAge];
|
||||||
D_80160014 = 0;
|
sLeftHandType = 0;
|
||||||
} else if ((this->leftHandType == 0) && (this->actor.speedXZ > 2.0f) && !(this->stateFlags1 & 0x8000000)) {
|
} else if ((this->leftHandType == 0) && (this->actor.speedXZ > 2.0f) && !(this->stateFlags1 & 0x8000000)) {
|
||||||
dLists = &D_80125E18[gSaveContext.linkAge];
|
dLists = &gPlayerLeftHandClosedDLs[gSaveContext.linkAge];
|
||||||
D_80160014 = 1;
|
sLeftHandType = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
*dList = ResourceMgr_LoadGfxByName(dLists[sDListsLodOffset]);
|
*dList = ResourceMgr_LoadGfxByName(dLists[sDListsLodOffset]);
|
||||||
} else if (limbIndex == PLAYER_LIMB_R_HAND) {
|
} else if (limbIndex == PLAYER_LIMB_R_HAND) {
|
||||||
Gfx** dLists = this->rightHandDLists;
|
Gfx** dLists = this->rightHandDLists;
|
||||||
|
|
||||||
if (D_80160018 == 10) {
|
if (sRightHandType == 10) {
|
||||||
dLists += this->currentShield * 4;
|
dLists += this->currentShield * 4;
|
||||||
} else if ((this->rightHandType == 8) && (this->actor.speedXZ > 2.0f) && !(this->stateFlags1 & 0x8000000)) {
|
} else if ((this->rightHandType == 8) && (this->actor.speedXZ > 2.0f) && !(this->stateFlags1 & 0x8000000)) {
|
||||||
dLists = &D_80125E58[gSaveContext.linkAge];
|
dLists = &sPlayerRightHandClosedDLs[gSaveContext.linkAge];
|
||||||
D_80160018 = 9;
|
sRightHandType = 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
*dList = ResourceMgr_LoadGfxByName(dLists[sDListsLodOffset]);
|
*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)) &&
|
} else if (!LINK_IS_ADULT && ((this->sheathType == 16) || (this->sheathType == 17)) &&
|
||||||
(gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI)) {
|
(gSaveContext.equips.buttonItems[0] != ITEM_SWORD_KOKIRI)) {
|
||||||
dLists = &D_80125D28[16];
|
dLists = &sSheathWithSwordDLs[16];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dLists[sDListsLodOffset] != NULL) {
|
if (dLists[sDListsLodOffset] != NULL) {
|
||||||
@ -1105,24 +1105,24 @@ s32 func_80090014(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s
|
|||||||
return false;
|
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;
|
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) {
|
if (this->unk_6AD != 2) {
|
||||||
*dList = NULL;
|
*dList = NULL;
|
||||||
} else if (limbIndex == PLAYER_LIMB_L_FOREARM) {
|
} else if (limbIndex == PLAYER_LIMB_L_FOREARM) {
|
||||||
*dList = sArmOutDLs[gSaveContext.linkAge];
|
*dList = sFirstPersonLeftForearmDLs[gSaveContext.linkAge];
|
||||||
} else if (limbIndex == PLAYER_LIMB_L_HAND) {
|
} else if (limbIndex == PLAYER_LIMB_L_HAND) {
|
||||||
s32 handOutDlIndex = gSaveContext.linkAge;
|
s32 handOutDlIndex = gSaveContext.linkAge;
|
||||||
if (CVarGetInteger("gBowSlingShotAmmoFix", 0) && LINK_IS_ADULT && Player_HoldsSlingshot(this)) {
|
if (CVarGetInteger("gBowSlingShotAmmoFix", 0) && LINK_IS_ADULT && Player_HoldsSlingshot(this)) {
|
||||||
handOutDlIndex = 1;
|
handOutDlIndex = 1;
|
||||||
}
|
}
|
||||||
*dList = sHandOutDLs[handOutDlIndex];
|
*dList = sFirstPersonLeftHandDLs[handOutDlIndex];
|
||||||
} else if (limbIndex == PLAYER_LIMB_R_SHOULDER) {
|
} else if (limbIndex == PLAYER_LIMB_R_SHOULDER) {
|
||||||
*dList = sRightShoulderNearDLs[gSaveContext.linkAge];
|
*dList = sFirstPersonRightShoulderDLs[gSaveContext.linkAge];
|
||||||
} else if (limbIndex == PLAYER_LIMB_R_FOREARM) {
|
} else if (limbIndex == PLAYER_LIMB_R_FOREARM) {
|
||||||
*dList = D_80125F30[gSaveContext.linkAge];
|
*dList = sFirstPersonForearmDLs[gSaveContext.linkAge];
|
||||||
} else if (limbIndex == PLAYER_LIMB_R_HAND) {
|
} else if (limbIndex == PLAYER_LIMB_R_HAND) {
|
||||||
s32 firstPersonWeaponIndex = gSaveContext.linkAge;
|
s32 firstPersonWeaponIndex = gSaveContext.linkAge;
|
||||||
if (CVarGetInteger("gBowSlingShotAmmoFix", 0)) {
|
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
|
*dList = Player_HoldsHookshot(this) ? gLinkAdultRightHandHoldingHookshotFarDL
|
||||||
: sHoldingFirstPersonWeaponDLs[firstPersonWeaponIndex];
|
: sFirstPersonRightHandHoldingWeaponDLs[firstPersonWeaponIndex];
|
||||||
} else {
|
} else {
|
||||||
*dList = NULL;
|
*dList = NULL;
|
||||||
}
|
}
|
||||||
@ -1142,8 +1142,8 @@ s32 func_800902F0(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 func_80090440(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
|
s32 Player_OverrideLimbDrawGameplayCrawling(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
|
||||||
if (!func_8008FCC8(play, limbIndex, dList, pos, rot, thisx)) {
|
if (!Player_OverrideLimbDrawGameplayCommon(play, limbIndex, dList, pos, rot, thisx)) {
|
||||||
*dList = NULL;
|
*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] = {
|
static u8 shieldColTypes[PLAYER_SHIELD_MAX] = {
|
||||||
COLTYPE_METAL,
|
COLTYPE_METAL,
|
||||||
COLTYPE_WOOD,
|
COLTYPE_WOOD,
|
||||||
@ -1226,7 +1226,7 @@ void func_800906D4(PlayState* play, Player* this, Vec3f* newTipPos) {
|
|||||||
&this->meleeWeaponInfo[0].base);
|
&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[0], &this->meleeWeaponInfo[1], &newTipPos[1], &newBasePos[1]);
|
||||||
func_80090480(play, &this->meleeWeaponQuads[1], &this->meleeWeaponInfo[2], &newTipPos[2], &newBasePos[2]);
|
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 };
|
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,
|
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 },
|
{ 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[] = {
|
BowStringData sBowStringData[] = {
|
||||||
{ gLinkAdultBowStringDL, { 0.0f, -360.4f, 0.0f } }, // bow
|
{ gLinkAdultBowStringDL, { 0.0f, -360.4f, 0.0f } }, // bow
|
||||||
{ gLinkChildSlinghotStringDL, { 606.0f, 236.0f, 0.0f } }, // slingshot
|
{ gLinkChildSlinghotStringDL, { 606.0f, 236.0f, 0.0f } }, // slingshot
|
||||||
};
|
};
|
||||||
|
|
||||||
Vec3f D_80126154[] = {
|
Vec3f sRightHandLimbModelShieldQuadVertices[] = {
|
||||||
{ -4500.0f, -3000.0f, -600.0f },
|
{ -4500.0f, -3000.0f, -600.0f },
|
||||||
{ 1500.0f, -3000.0f, -600.0f },
|
{ 1500.0f, -3000.0f, -600.0f },
|
||||||
{ -4500.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_80126184 = { 100.0f, 1500.0f, 0.0f };
|
||||||
Vec3f D_80126190 = { 100.0f, 1640.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 },
|
||||||
{ -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 };
|
Vec3f sSheathLimbModelShieldOnBackPos = { 630.0f, 100.0f, -30.0f };
|
||||||
Vec3s D_801261D8 = { 0, 0, 0x7FFF };
|
Vec3s sSheathLimbModelShieldOnBackZyxRot = { 0, 0, 0x7FFF };
|
||||||
|
|
||||||
Vec3f D_801261E0[] = {
|
Vec3f sLeftRightFootLimbModelFootPos[] = {
|
||||||
{ 200.0f, 300.0f, 0.0f },
|
{ 200.0f, 300.0f, 0.0f },
|
||||||
{ 200.0f, 200.0f, 0.0f },
|
{ 200.0f, 200.0f, 0.0f },
|
||||||
};
|
};
|
||||||
@ -1428,11 +1428,11 @@ Vec3f D_801261E0[] = {
|
|||||||
// started working out properly
|
// started working out properly
|
||||||
#define RETICLE_MAX 3.402823466e+12f
|
#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;
|
Player* this = (Player*)thisx;
|
||||||
|
|
||||||
if (*dList != NULL) {
|
if (*dList != NULL) {
|
||||||
Matrix_MultVec3f(&D_8012602C, D_80160000);
|
Matrix_MultVec3f(&sZeroVec, D_80160000);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (limbIndex == PLAYER_LIMB_L_HAND) {
|
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);
|
Math_Vec3f_Copy(&this->leftHandPos, D_80160000);
|
||||||
|
|
||||||
if (this->itemAction == PLAYER_IA_STICK) {
|
if (this->itemAction == PLAYER_IA_DEKU_STICK) {
|
||||||
Vec3f sp124[3];
|
Vec3f sp124[3];
|
||||||
|
|
||||||
OPEN_DISPS(play->state.gfxCtx);
|
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) {
|
if (this->actor.scale.y >= 0.0f) {
|
||||||
D_80126080.x = this->unk_85C * 5000.0f;
|
D_80126080.x = this->unk_85C * 5000.0f;
|
||||||
func_80090A28(this, sp124);
|
func_80090A28(this, sp124);
|
||||||
if (this->swordState != 0) {
|
if (this->meleeWeaponState != 0) {
|
||||||
EffectBlure_ChangeType(Effect_GetByIndex(this->meleeWeaponEffectIndex), 7); // stick sword type
|
EffectBlure_ChangeType(Effect_GetByIndex(this->meleeWeaponEffectIndex), 7); // stick sword type
|
||||||
func_800906D4(play, this, sp124);
|
func_800906D4(play, this, sp124);
|
||||||
} else {
|
} else {
|
||||||
@ -1466,14 +1466,14 @@ void func_80090D20(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void
|
|||||||
gSPDisplayList(POLY_OPA_DISP++, gLinkChildLinkDekuStickDL);
|
gSPDisplayList(POLY_OPA_DISP++, gLinkChildLinkDekuStickDL);
|
||||||
|
|
||||||
CLOSE_DISPS(play->state.gfxCtx);
|
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];
|
Vec3f spE4[3];
|
||||||
|
|
||||||
if (Player_HoldsBrokenKnife(this)) {
|
if (Player_HoldsBrokenKnife(this)) {
|
||||||
D_80126080.x = 1500.0f;
|
D_80126080.x = 1500.0f;
|
||||||
} else {
|
} else {
|
||||||
D_80126080.x = sSwordLengths[Player_GetSwordHeld(this)];
|
D_80126080.x = sMeleeWeaponLengths[Player_GetMeleeWeaponHeld(this)];
|
||||||
EffectBlure_ChangeType(Effect_GetByIndex(this->meleeWeaponEffectIndex), sSwordTypes[Player_GetSwordHeld(this)]);
|
EffectBlure_ChangeType(Effect_GetByIndex(this->meleeWeaponEffectIndex), sSwordTypes[Player_GetMeleeWeaponHeld(this)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
func_80090A28(this, spE4);
|
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 (this->actor.scale.y >= 0.0f) {
|
||||||
if (!Player_HoldsHookshot(this) && ((hookedActor = this->heldActor) != NULL)) {
|
if (!Player_HoldsHookshot(this) && ((hookedActor = this->heldActor) != NULL)) {
|
||||||
if (this->stateFlags1 & 0x200) {
|
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_RotateZYX(0x69E8, -0x5708, 0x458E, MTXMODE_APPLY);
|
||||||
Matrix_Get(&sp14C);
|
Matrix_Get(&sp14C);
|
||||||
Matrix_MtxFToYXZRotS(&sp14C, &hookedActor->world.rot, 0);
|
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;
|
Vec3f sp90;
|
||||||
f32 distXYZ;
|
f32 distXYZ;
|
||||||
|
|
||||||
Matrix_MultVec3f(&D_8012602C, &sp90);
|
Matrix_MultVec3f(&sZeroVec, &sp90);
|
||||||
distXYZ = Math_Vec3f_DistXYZ(D_80160000, &sp90);
|
distXYZ = Math_Vec3f_DistXYZ(D_80160000, &sp90);
|
||||||
|
|
||||||
this->unk_858 = distXYZ - 3.0f;
|
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);
|
CLOSE_DISPS(play->state.gfxCtx);
|
||||||
} else if ((this->actor.scale.y >= 0.0f) && (this->rightHandType == 10)) {
|
} else if ((this->actor.scale.y >= 0.0f) && (this->rightHandType == 10)) {
|
||||||
Matrix_Get(&this->shieldMf);
|
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) {
|
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 (limbIndex == PLAYER_LIMB_SHEATH) {
|
||||||
if ((this->rightHandType != 10) && (this->rightHandType != 0xFF)) {
|
if ((this->rightHandType != 10) && (this->rightHandType != 0xFF)) {
|
||||||
if (Player_IsChildWithHylianShield(this)) {
|
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);
|
Matrix_Get(&this->shieldMf);
|
||||||
}
|
}
|
||||||
} else if (limbIndex == PLAYER_LIMB_HEAD) {
|
} else if (limbIndex == PLAYER_LIMB_HEAD) {
|
||||||
Matrix_MultVec3f(&D_801260D4, &this->actor.focus.pos);
|
Matrix_MultVec3f(&D_801260D4, &this->actor.focus.pos);
|
||||||
} else {
|
} 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);
|
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;
|
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* 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 type;
|
||||||
s32 dListOffset = 0;
|
s32 dListOffset = 0;
|
||||||
Gfx** dLists;
|
Gfx** dLists;
|
||||||
@ -1686,7 +1686,7 @@ s32 func_80091880(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s
|
|||||||
|
|
||||||
if (limbIndex == PLAYER_LIMB_L_HAND) {
|
if (limbIndex == PLAYER_LIMB_L_HAND) {
|
||||||
type = gPlayerModelTypes[modelGroup][1];
|
type = gPlayerModelTypes[modelGroup][1];
|
||||||
D_80160014 = type;
|
sLeftHandType = type;
|
||||||
|
|
||||||
if (ptr[0] == 0)
|
if (ptr[0] == 0)
|
||||||
type = 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) {
|
} else if (limbIndex == PLAYER_LIMB_R_HAND) {
|
||||||
type = gPlayerModelTypes[modelGroup][2];
|
type = gPlayerModelTypes[modelGroup][2];
|
||||||
D_80160018 = type;
|
sRightHandType = type;
|
||||||
if (type == 10) {
|
if (type == 10) {
|
||||||
dListOffset = ptr[1] * ptrSize;
|
dListOffset = ptr[1] * ptrSize;
|
||||||
}
|
}
|
||||||
@ -1741,7 +1741,7 @@ void Pause_DrawTriforceSpot(PlayState* play, s32 showLightColumn) {
|
|||||||
rotation += 0x03E8;
|
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 scale, s32 sword, s32 tunic, s32 shield, s32 boots, s32 width, s32 height, Vec3f* eye, Vec3f* at,
|
||||||
f32 fovy, void* img1, void* img2) {
|
f32 fovy, void* img1, void* img2) {
|
||||||
static Vp viewport = { 128, 224, 511, 0, 128, 224, 511, 0 };
|
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);
|
gSPSegment(POLY_OPA_DISP++, 0x0C, gCullBackDList);
|
||||||
|
|
||||||
func_8008F470(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount, 0, tunic, boots, 0,
|
Player_DrawImpl(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount, 0, tunic, boots, 0,
|
||||||
func_80091880, NULL, &sp12C);
|
Player_OverrideLimbDrawPause, NULL, &sp12C);
|
||||||
|
|
||||||
if (CVarGetInteger("gPauseTriforce", 0)) {
|
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 FrameCountSinceLastAnim = 0; // Time since last animation
|
||||||
s16 MinFrameCount; // Frame to wait before checking if we need to change the 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) {
|
s32 sword, s32 tunic, s32 shield, s32 boots) {
|
||||||
Input* p1Input = &play->state.input[0];
|
Input* p1Input = &play->state.input[0];
|
||||||
Vec3f eye = { 0.0f, 0.0f, -400.0f };
|
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,
|
boots, 64, 112, &eye, &at, 60.0f, play->state.gfxCtx->curFrameBuffer,
|
||||||
play->state.gfxCtx->curFrameBuffer + 0x1C00);
|
play->state.gfxCtx->curFrameBuffer + 0x1C00);
|
||||||
}
|
}
|
||||||
|
@ -2096,7 +2096,7 @@ void func_8009EE44(PlayState* play) {
|
|||||||
}
|
}
|
||||||
if ((play->roomCtx.unk_74[0] == 0) && playerHasCojiro) {
|
if ((play->roomCtx.unk_74[0] == 0) && playerHasCojiro) {
|
||||||
if (play->roomCtx.unk_74[1] == 50) {
|
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[0] = 1;
|
||||||
}
|
}
|
||||||
play->roomCtx.unk_74[1]++;
|
play->roomCtx.unk_74[1]++;
|
||||||
|
@ -352,7 +352,7 @@ void BgHeavyBlock_LiftedUp(BgHeavyBlock* this, PlayState* play) {
|
|||||||
|
|
||||||
if (this->timer == 11) {
|
if (this->timer == 11) {
|
||||||
func_800AA000(0.0f, 0xFF, 0x14, 0x14);
|
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");
|
LOG_STRING("NA_SE_PL_PULL_UP_BIGROCK");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ void BgHidanDalm_Wait(BgHidanDalm* this, PlayState* play) {
|
|||||||
this->dyna.actor.bgCheckFlags &= ~8;
|
this->dyna.actor.bgCheckFlags &= ~8;
|
||||||
this->dyna.actor.speedXZ = 10.0f;
|
this->dyna.actor.speedXZ = 10.0f;
|
||||||
Flags_SetSwitch(play, this->switchFlag);
|
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);
|
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_DARUMA_VANISH);
|
||||||
} else {
|
} else {
|
||||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
|
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
|
||||||
|
@ -154,7 +154,7 @@ void BgJyaGoroiwa_Move(BgJyaGoroiwa* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func_8002F6D4(play, thisx, 2.0f, thisx->yawTowardsPlayer, 0.0f, 0);
|
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->yOffsetSpeed = 10.0f;
|
||||||
this->speedFactor = 0.5f;
|
this->speedFactor = 0.5f;
|
||||||
|
@ -176,9 +176,9 @@ void func_808ACA08(BgSpot02Objects* this, PlayState* play) {
|
|||||||
// enter the cutscene context.
|
// enter the cutscene context.
|
||||||
if (play->csCtx.frames == 402 && !(gSaveContext.n64ddFlag)) {
|
if (play->csCtx.frames == 402 && !(gSaveContext.n64ddFlag)) {
|
||||||
if (!LINK_IS_ADULT) {
|
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 {
|
} else {
|
||||||
func_8002F7DC(&player->actor, NA_SE_VO_LI_DEMO_DAMAGE);
|
Player_PlaySfx(&player->actor, NA_SE_VO_LI_DEMO_DAMAGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -402,7 +402,7 @@ void BgYdanSp_WallWebIdle(BgYdanSp* this, PlayState* play) {
|
|||||||
if (Flags_GetSwitch(play, this->burnSwitchFlag) || (this->trisCollider.base.acFlags & 2)) {
|
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;
|
this->dyna.actor.home.pos.y = this->dyna.actor.world.pos.y + 80.0f;
|
||||||
BgYdanSp_BurnWeb(this, play);
|
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);
|
func_8002DBD0(&this->dyna.actor, &sp30, &player->meleeWeaponInfo[0].tip);
|
||||||
if (fabsf(sp30.x) < 100.0f && sp30.z < 1.0f && sp30.y < 200.0f) {
|
if (fabsf(sp30.x) < 100.0f && sp30.z < 1.0f && sp30.y < 200.0f) {
|
||||||
OnePointCutscene_Init(play, 3020, 40, &this->dyna.actor, MAIN_CAM);
|
OnePointCutscene_Init(play, 3020, 40, &this->dyna.actor, MAIN_CAM);
|
||||||
|
@ -613,7 +613,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (this->csTimer == 13) {
|
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) {
|
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.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;
|
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->unk_1C2 = 0xC;
|
||||||
this->actor.speedXZ = -30.0f;
|
this->actor.speedXZ = -30.0f;
|
||||||
func_8002D908(&this->actor);
|
func_8002D908(&this->actor);
|
||||||
|
@ -1679,7 +1679,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) {
|
|||||||
temp_f12 = this->unk_1B8.z - player->actor.world.pos.z;
|
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;
|
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) &&
|
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);
|
func_80064520(play, &play->csCtx);
|
||||||
gSaveContext.sohStats.itemTimestamp[TIMESTAMP_DEFEAT_GANON] = GAMEPLAYSTAT_TOTAL_TIME;
|
gSaveContext.sohStats.itemTimestamp[TIMESTAMP_DEFEAT_GANON] = GAMEPLAYSTAT_TOTAL_TIME;
|
||||||
BossRush_HandleCompleteBoss(play);
|
BossRush_HandleCompleteBoss(play);
|
||||||
|
@ -524,7 +524,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) {
|
|||||||
Audio_PlaySoundIncreasinglyTransposed(&this->tentTipPos, NA_SE_EN_MOFER_WAVE,
|
Audio_PlaySoundIncreasinglyTransposed(&this->tentTipPos, NA_SE_EN_MOFER_WAVE,
|
||||||
gMorphaTransposeTable);
|
gMorphaTransposeTable);
|
||||||
func_800AA000(0, 100, 5, 2);
|
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 {
|
} else {
|
||||||
maxSwingRateX = 2000.0f;
|
maxSwingRateX = 2000.0f;
|
||||||
@ -539,7 +539,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) {
|
|||||||
Audio_PlaySoundIncreasinglyTransposed(&this->tentTipPos, NA_SE_EN_MOFER_WAVE,
|
Audio_PlaySoundIncreasinglyTransposed(&this->tentTipPos, NA_SE_EN_MOFER_WAVE,
|
||||||
gMorphaTransposeTable);
|
gMorphaTransposeTable);
|
||||||
func_800AA000(0, 160, 5, 4);
|
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) {
|
} else if (this->work[MO_TENT_ACTION_STATE] == MO_TENT_RETREAT) {
|
||||||
|
@ -776,7 +776,7 @@ void BossSst_HeadCharge(BossSst* this, PlayState* play) {
|
|||||||
sHands[LEFT]->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT);
|
sHands[LEFT]->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT);
|
||||||
sHands[RIGHT]->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_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->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT);
|
||||||
this->ready = true;
|
this->ready = true;
|
||||||
func_8002F71C(play, &this->actor, 5.0f, this->actor.shape.rot.y - (this->vParity * 0x3800), 0.0f);
|
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);
|
newTargetYaw = this->actor.shape.rot.y - (this->vParity * 0x1400);
|
||||||
if (((s16)(newTargetYaw - this->targetYaw) * this->vParity) > 0) {
|
if (((s16)(newTargetYaw - this->targetYaw) * this->vParity) > 0) {
|
||||||
this->targetYaw = newTargetYaw;
|
this->targetYaw = newTargetYaw;
|
||||||
@ -1643,7 +1643,7 @@ void BossSst_HandPunch(BossSst* this, PlayState* play) {
|
|||||||
if (this->actor.bgCheckFlags & 8) {
|
if (this->actor.bgCheckFlags & 8) {
|
||||||
BossSst_HandSetupRetreat(this);
|
BossSst_HandSetupRetreat(this);
|
||||||
} else if (this->colliderJntSph.base.atFlags & AT_HIT) {
|
} 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);
|
func_8002F71C(play, &this->actor, 10.0f, this->actor.shape.rot.y, 5.0f);
|
||||||
BossSst_HandSetupRetreat(this);
|
BossSst_HandSetupRetreat(this);
|
||||||
}
|
}
|
||||||
@ -1880,9 +1880,9 @@ void BossSst_HandCrush(BossSst* this, PlayState* play) {
|
|||||||
if (this->timer == 0) {
|
if (this->timer == 0) {
|
||||||
this->timer = 20;
|
this->timer = 20;
|
||||||
if (!LINK_IS_ADULT) {
|
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 {
|
} 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);
|
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.x += 70.0f * Math_SinS(this->actor.shape.rot.y);
|
||||||
player->actor.world.pos.z += 70.0f * Math_CosS(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_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);
|
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);
|
OTHER_HAND(this)->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT);
|
||||||
sHead->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_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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -783,7 +783,7 @@ s32 BossTw_BeamHitPlayerCheck(BossTw* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
player->isBurning = true;
|
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) {
|
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)) {
|
if ((this->timers[3] != 0) && (this->timers[3] < 20)) {
|
||||||
@ -4053,7 +4053,7 @@ void BossTw_BlastFire(BossTw* this, PlayState* play) {
|
|||||||
player->isBurning = 1;
|
player->isBurning = 1;
|
||||||
|
|
||||||
if (this->work[BURN_TMR] == 0) {
|
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;
|
this->work[BURN_TMR] = 40;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -379,7 +379,7 @@ void DoorKiller_FallOver(DoorKiller* this, PlayState* play) {
|
|||||||
this->hasHitPlayerOrGround |= 1;
|
this->hasHitPlayerOrGround |= 1;
|
||||||
func_8002F6D4(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f, 16);
|
func_8002F6D4(play, &this->actor, 6.0f, this->actor.yawTowardsPlayer, 6.0f, 16);
|
||||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_KDOOR_HIT);
|
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)) {
|
if (!(this->hasHitPlayerOrGround & 1) && (this->timer == 2)) {
|
||||||
|
@ -225,7 +225,7 @@ void EnAnubice_Idle(EnAnubice* this, PlayState* play) {
|
|||||||
if (this->actor.shape.yOffset > -2.0f) {
|
if (this->actor.shape.yOffset > -2.0f) {
|
||||||
this->actor.shape.yOffset = 0.0f;
|
this->actor.shape.yOffset = 0.0f;
|
||||||
|
|
||||||
if (player->swordState != 0) {
|
if (player->meleeWeaponState != 0) {
|
||||||
this->actionFunc = EnAnubice_SetupShootFireball;
|
this->actionFunc = EnAnubice_SetupShootFireball;
|
||||||
} else if (this->isLinkOutOfRange) {
|
} else if (this->isLinkOutOfRange) {
|
||||||
this->actor.velocity.y = 0.0f;
|
this->actor.velocity.y = 0.0f;
|
||||||
|
@ -208,19 +208,19 @@ void EnArrow_Shoot(EnArrow* this, PlayState* play) {
|
|||||||
|
|
||||||
switch (this->actor.params) {
|
switch (this->actor.params) {
|
||||||
case ARROW_SEED:
|
case ARROW_SEED:
|
||||||
func_8002F7DC(&player->actor, NA_SE_IT_SLING_SHOT);
|
Player_PlaySfx(&player->actor, NA_SE_IT_SLING_SHOT);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ARROW_NORMAL_LIT:
|
case ARROW_NORMAL_LIT:
|
||||||
case ARROW_NORMAL_HORSE:
|
case ARROW_NORMAL_HORSE:
|
||||||
case ARROW_NORMAL:
|
case ARROW_NORMAL:
|
||||||
func_8002F7DC(&player->actor, NA_SE_IT_ARROW_SHOT);
|
Player_PlaySfx(&player->actor, NA_SE_IT_ARROW_SHOT);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ARROW_FIRE:
|
case ARROW_FIRE:
|
||||||
case ARROW_ICE:
|
case ARROW_ICE:
|
||||||
case ARROW_LIGHT:
|
case ARROW_LIGHT:
|
||||||
func_8002F7DC(&player->actor, NA_SE_IT_MAGIC_ARROW_SHOT);
|
Player_PlaySfx(&player->actor, NA_SE_IT_MAGIC_ARROW_SHOT);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -272,7 +272,7 @@ void EnButte_FlyAround(EnButte* this, PlayState* play) {
|
|||||||
EnButte_SelectFlightParams(this, &sFlyAroundParams[this->flightParamsIdx]);
|
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) &&
|
(this->swordDownTimer <= 0) &&
|
||||||
((Math3D_Dist2DSq(player->actor.world.pos.x, player->actor.world.pos.z, this->actor.home.pos.x,
|
((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)) ||
|
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,
|
distSqFromHome = Math3D_Dist2DSq(this->actor.world.pos.x, this->actor.world.pos.z, this->actor.home.pos.x,
|
||||||
this->actor.home.pos.z);
|
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)))) {
|
(this->swordDownTimer <= 0) && (distSqFromHome < SQ(320.0f)))) {
|
||||||
EnButte_SetupFlyAround(this);
|
EnButte_SetupFlyAround(this);
|
||||||
} else if (distSqFromHome > SQ(240.0f)) {
|
} else if (distSqFromHome > SQ(240.0f)) {
|
||||||
@ -401,7 +401,7 @@ void EnButte_Update(Actor* thisx, PlayState* play) {
|
|||||||
this->unk_260 += 0x600;
|
this->unk_260 += 0x600;
|
||||||
|
|
||||||
if ((this->actor.params & 1) == 1) {
|
if ((this->actor.params & 1) == 1) {
|
||||||
if (GET_PLAYER(play)->swordState == 0) {
|
if (GET_PLAYER(play)->meleeWeaponState == 0) {
|
||||||
if (this->swordDownTimer > 0) {
|
if (this->swordDownTimer > 0) {
|
||||||
this->swordDownTimer--;
|
this->swordDownTimer--;
|
||||||
}
|
}
|
||||||
|
@ -818,9 +818,9 @@ void EnFloormas_GrabLink(EnFloormas* this, PlayState* play) {
|
|||||||
// Damage link every 20 frames
|
// Damage link every 20 frames
|
||||||
if ((this->actionTarget % 20) == 0) {
|
if ((this->actionTarget % 20) == 0) {
|
||||||
if (!LINK_IS_ADULT) {
|
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 {
|
} 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);
|
play->damagePlayer(play, -8);
|
||||||
}
|
}
|
||||||
|
@ -448,7 +448,7 @@ void EnGeldB_Ready(EnGeldB* this, PlayState* play) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
angleToLink = player->actor.shape.rot.y - this->actor.shape.rot.y;
|
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;
|
this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||||
EnGeldB_SetupCircle(this);
|
EnGeldB_SetupCircle(this);
|
||||||
} else if (--this->timer == 0) {
|
} else if (--this->timer == 0) {
|
||||||
@ -504,7 +504,7 @@ void EnGeldB_Advance(EnGeldB* this, PlayState* play) {
|
|||||||
this->skelAnime.playSpeed = this->actor.speedXZ / 8.0f;
|
this->skelAnime.playSpeed = this->actor.speedXZ / 8.0f;
|
||||||
facingAngletoLink = player->actor.shape.rot.y - this->actor.shape.rot.y;
|
facingAngletoLink = player->actor.shape.rot.y - this->actor.shape.rot.y;
|
||||||
facingAngletoLink = ABS(facingAngletoLink);
|
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;
|
this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||||
if (Rand_ZeroOne() > 0.7f) {
|
if (Rand_ZeroOne() > 0.7f) {
|
||||||
EnGeldB_SetupCircle(this);
|
EnGeldB_SetupCircle(this);
|
||||||
@ -856,12 +856,12 @@ void EnGeldB_Slash(EnGeldB* this, PlayState* play) {
|
|||||||
this->actor.speedXZ = 0.0f;
|
this->actor.speedXZ = 0.0f;
|
||||||
if ((s32)this->skelAnime.curFrame == 1) {
|
if ((s32)this->skelAnime.curFrame == 1) {
|
||||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GERUDOFT_ATTACK);
|
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GERUDOFT_ATTACK);
|
||||||
this->swordState = 1;
|
this->meleeWeaponState = 1;
|
||||||
} else if ((s32)this->skelAnime.curFrame == 6) {
|
} else if ((s32)this->skelAnime.curFrame == 6) {
|
||||||
this->swordState = -1;
|
this->meleeWeaponState = -1;
|
||||||
}
|
}
|
||||||
if (this->swordCollider.base.atFlags & AT_BOUNCED) {
|
if (this->swordCollider.base.atFlags & AT_BOUNCED) {
|
||||||
this->swordState = -1;
|
this->meleeWeaponState = -1;
|
||||||
this->swordCollider.base.atFlags &= ~(AT_HIT | AT_BOUNCED);
|
this->swordCollider.base.atFlags &= ~(AT_HIT | AT_BOUNCED);
|
||||||
EnGeldB_SetupRollBack(this);
|
EnGeldB_SetupRollBack(this);
|
||||||
} else if (SkelAnime_Update(&this->skelAnime)) {
|
} else if (SkelAnime_Update(&this->skelAnime)) {
|
||||||
@ -932,13 +932,13 @@ void EnGeldB_SpinAttack(EnGeldB* this, PlayState* play) {
|
|||||||
} else if ((s32)this->skelAnime.curFrame == 13) {
|
} 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->leftFootPos, 3.0f, 2, 2.0f, 0, 0, false);
|
||||||
Actor_SpawnFloorDustRing(play, &this->actor, &this->rightFootPos, 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;
|
this->actor.speedXZ = 10.0f;
|
||||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GERUDOFT_ATTACK);
|
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GERUDOFT_ATTACK);
|
||||||
} else if ((s32)this->skelAnime.curFrame == 21) {
|
} else if ((s32)this->skelAnime.curFrame == 21) {
|
||||||
this->actor.speedXZ = 0.0f;
|
this->actor.speedXZ = 0.0f;
|
||||||
} else if ((s32)this->skelAnime.curFrame == 24) {
|
} else if ((s32)this->skelAnime.curFrame == 24) {
|
||||||
this->swordState = -1;
|
this->meleeWeaponState = -1;
|
||||||
}
|
}
|
||||||
if (SkelAnime_Update(&this->skelAnime) && (this->spinAttackState < 2)) {
|
if (SkelAnime_Update(&this->skelAnime) && (this->spinAttackState < 2)) {
|
||||||
if (!Actor_IsFacingPlayer(&this->actor, 0x1554)) {
|
if (!Actor_IsFacingPlayer(&this->actor, 0x1554)) {
|
||||||
@ -1116,8 +1116,8 @@ void EnGeldB_Jump(EnGeldB* this, PlayState* play) {
|
|||||||
void EnGeldB_SetupBlock(EnGeldB* this) {
|
void EnGeldB_SetupBlock(EnGeldB* this) {
|
||||||
f32 lastFrame = Animation_GetLastFrame(&gGerudoRedBlockAnim);
|
f32 lastFrame = Animation_GetLastFrame(&gGerudoRedBlockAnim);
|
||||||
|
|
||||||
if (this->swordState != 0) {
|
if (this->meleeWeaponState != 0) {
|
||||||
this->swordState = -1;
|
this->meleeWeaponState = -1;
|
||||||
}
|
}
|
||||||
this->actor.speedXZ = 0.0f;
|
this->actor.speedXZ = 0.0f;
|
||||||
this->action = GELDB_BLOCK;
|
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)) {
|
if ((this->action == GELDB_BLOCK) && (this->skelAnime.curFrame == 0.0f)) {
|
||||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->blockCollider.base);
|
CollisionCheck_SetAC(play, &play->colChkCtx, &this->blockCollider.base);
|
||||||
}
|
}
|
||||||
if (this->swordState > 0) {
|
if (this->meleeWeaponState > 0) {
|
||||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->swordCollider.base);
|
CollisionCheck_SetAT(play, &play->colChkCtx, &this->swordCollider.base);
|
||||||
}
|
}
|
||||||
if (this->blinkState == 0) {
|
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(&swordTipOffset, &swordTip);
|
||||||
Matrix_MultVec3f(&swordHiltOffset, &swordHilt);
|
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));
|
EffectBlure_AddSpace(Effect_GetByIndex(this->blureIndex));
|
||||||
this->swordState = 0;
|
this->meleeWeaponState = 0;
|
||||||
} else if (this->swordState > 0) {
|
} else if (this->meleeWeaponState > 0) {
|
||||||
EffectBlure_AddVertex(Effect_GetByIndex(this->blureIndex), &swordTip, &swordHilt);
|
EffectBlure_AddVertex(Effect_GetByIndex(this->blureIndex), &swordTip, &swordHilt);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -53,7 +53,7 @@ typedef struct EnGeldB {
|
|||||||
/* 0x0304 */ f32 approachRate;
|
/* 0x0304 */ f32 approachRate;
|
||||||
/* 0x0308 */ char unk_308[4];
|
/* 0x0308 */ char unk_308[4];
|
||||||
/* 0x030C */ f32 unkFloat;
|
/* 0x030C */ f32 unkFloat;
|
||||||
/* 0x0310 */ s16 swordState;
|
/* 0x0310 */ s16 meleeWeaponState;
|
||||||
/* 0x0312 */ s16 spinAttackState;
|
/* 0x0312 */ s16 spinAttackState;
|
||||||
/* 0x0314 */ s16 keyFlag;
|
/* 0x0314 */ s16 keyFlag;
|
||||||
/* 0x0316 */ char unk_316[2];
|
/* 0x0316 */ char unk_316[2];
|
||||||
|
@ -733,7 +733,7 @@ void EnGoma_Update(Actor* thisx, PlayState* play) {
|
|||||||
EnGoma_LookAtPlayer(this, play);
|
EnGoma_LookAtPlayer(this, play);
|
||||||
EnGoma_UpdateEyeEnvColor(this);
|
EnGoma_UpdateEyeEnvColor(this);
|
||||||
this->visualState = 1;
|
this->visualState = 1;
|
||||||
if (player->swordState != 0) {
|
if (player->meleeWeaponState != 0) {
|
||||||
this->colCyl2.dim.radius = 35;
|
this->colCyl2.dim.radius = 35;
|
||||||
this->colCyl2.dim.height = 35;
|
this->colCyl2.dim.height = 35;
|
||||||
this->colCyl2.dim.yShift = 0;
|
this->colCyl2.dim.yShift = 0;
|
||||||
|
@ -600,7 +600,7 @@ void EnGoroiwa_Roll(EnGoroiwa* this, PlayState* play) {
|
|||||||
osSyncPrintf("Player ぶっ飛ばし\n"); // "Player knocked down"
|
osSyncPrintf("Player ぶっ飛ばし\n"); // "Player knocked down"
|
||||||
osSyncPrintf(VT_RST);
|
osSyncPrintf(VT_RST);
|
||||||
onHitSetupFuncs[(this->actor.params >> 10) & 1](this);
|
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) {
|
if ((this->actor.home.rot.z & 1) == 1) {
|
||||||
this->collisionDisabledTimer = 50;
|
this->collisionDisabledTimer = 50;
|
||||||
}
|
}
|
||||||
@ -682,7 +682,7 @@ void EnGoroiwa_MoveUp(EnGoroiwa* this, PlayState* play) {
|
|||||||
if (this->collider.base.atFlags & AT_HIT) {
|
if (this->collider.base.atFlags & AT_HIT) {
|
||||||
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_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) {
|
if ((this->actor.home.rot.z & 1) == 1) {
|
||||||
this->collisionDisabledTimer = 50;
|
this->collisionDisabledTimer = 50;
|
||||||
}
|
}
|
||||||
@ -707,7 +707,7 @@ void EnGoroiwa_MoveDown(EnGoroiwa* this, PlayState* play) {
|
|||||||
if (this->collider.base.atFlags & AT_HIT) {
|
if (this->collider.base.atFlags & AT_HIT) {
|
||||||
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_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) {
|
if ((this->actor.home.rot.z & 1) == 1) {
|
||||||
this->collisionDisabledTimer = 50;
|
this->collisionDisabledTimer = 50;
|
||||||
}
|
}
|
||||||
|
@ -234,7 +234,7 @@ void func_80A6E8CC(EnHs* this, PlayState* play) {
|
|||||||
if (this->unk_2AA > 0) {
|
if (this->unk_2AA > 0) {
|
||||||
this->unk_2AA--;
|
this->unk_2AA--;
|
||||||
if (this->unk_2AA == 0) {
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -279,7 +279,7 @@ void UseHammer(Actor* thisx, PlayState* play, u8 started) {
|
|||||||
Vec3f shockwavePos = this->actor.world.pos;
|
Vec3f shockwavePos = this->actor.world.pos;
|
||||||
|
|
||||||
func_808429B4(play, 27767, 7, 20);
|
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);
|
EffectSsBlast_SpawnWhiteShockwave(play, &shockwavePos, &zeroVec, &zeroVec);
|
||||||
|
|
||||||
|
@ -352,7 +352,7 @@ void func_80AD97C8(EnPoSisters* this, PlayState* play) {
|
|||||||
f32 sp20;
|
f32 sp20;
|
||||||
|
|
||||||
if (this->unk_195 == 0 || this->actionFunc != func_80ADAAA4) {
|
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) {
|
player->actor.world.pos.y - player->actor.floorHeight < 1.0f) {
|
||||||
Math_StepToF(&this->unk_294, 110.0f, 3.0f);
|
Math_StepToF(&this->unk_294, 110.0f, 3.0f);
|
||||||
} else {
|
} else {
|
||||||
|
@ -528,7 +528,7 @@ void func_80AE3454(EnRd* this, PlayState* play) {
|
|||||||
play->damagePlayer(play, -8);
|
play->damagePlayer(play, -8);
|
||||||
func_800AA000(this->actor.xzDistToPlayer, 0xF0, 1, 0xC);
|
func_800AA000(this->actor.xzDistToPlayer, 0xF0, 1, 0xC);
|
||||||
this->unk_319 = 20;
|
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;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
|
@ -497,7 +497,7 @@ void EnTest_Idle(EnTest* this, PlayState* play) {
|
|||||||
yawDiff = player->actor.shape.rot.y - this->actor.shape.rot.y;
|
yawDiff = player->actor.shape.rot.y - this->actor.shape.rot.y;
|
||||||
|
|
||||||
if (this->actor.xzDistToPlayer < 100.0f) {
|
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;
|
this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||||
|
|
||||||
if (Rand_ZeroOne() > 0.7f && player->meleeWeaponAnimation != 0x11) {
|
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;
|
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) {
|
if (ABS(yawDiff) >= 0x1F40) {
|
||||||
this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
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)) {
|
if ((this->skelAnime.curFrame > 7.0f) && (this->skelAnime.curFrame < 11.0f)) {
|
||||||
this->swordState = 1;
|
this->meleeWeaponState = 1;
|
||||||
} else {
|
} else {
|
||||||
this->swordState = 0;
|
this->meleeWeaponState = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SkelAnime_Update(&this->skelAnime)) {
|
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)) {
|
if ((this->skelAnime.curFrame > 1.0f) && (this->skelAnime.curFrame < 8.0f)) {
|
||||||
this->swordState = 1;
|
this->meleeWeaponState = 1;
|
||||||
} else {
|
} else {
|
||||||
this->swordState = 0;
|
this->meleeWeaponState = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SkelAnime_Update(&this->skelAnime)) {
|
if (SkelAnime_Update(&this->skelAnime)) {
|
||||||
@ -1100,7 +1100,7 @@ void EnTest_Jumpslash(EnTest* this, PlayState* play) {
|
|||||||
if (this->timer == 0) {
|
if (this->timer == 0) {
|
||||||
Animation_PlayOnce(&this->skelAnime, &gStalfosJumpslashAnim);
|
Animation_PlayOnce(&this->skelAnime, &gStalfosJumpslashAnim);
|
||||||
this->timer = 1;
|
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_SAKEBI);
|
||||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL_JUMP);
|
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL_JUMP);
|
||||||
} else {
|
} else {
|
||||||
@ -1110,7 +1110,7 @@ void EnTest_Jumpslash(EnTest* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((this->timer != 0) && (this->skelAnime.curFrame >= 5.0f)) {
|
if ((this->timer != 0) && (this->skelAnime.curFrame >= 5.0f)) {
|
||||||
this->swordState = 0;
|
this->meleeWeaponState = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->actor.world.pos.y <= this->actor.floorHeight) {
|
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) &&
|
if ((this->actor.bgCheckFlags & 8) && ((ABS((s16)(this->actor.wallYaw - this->actor.shape.rot.y)) < 0x38A4) &&
|
||||||
(this->actor.xzDistToPlayer < 80.0f))) {
|
(this->actor.xzDistToPlayer < 80.0f))) {
|
||||||
EnTest_SetupJumpUp(this);
|
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) &&
|
if ((this->actor.bgCheckFlags & 8) && ((ABS((s16)(this->actor.wallYaw - this->actor.shape.rot.y)) < 0x38A4) &&
|
||||||
(this->actor.xzDistToPlayer < 80.0f))) {
|
(this->actor.xzDistToPlayer < 80.0f))) {
|
||||||
EnTest_SetupJumpUp(this);
|
EnTest_SetupJumpUp(this);
|
||||||
@ -1294,7 +1294,7 @@ void func_80862418(EnTest* this, PlayState* play) {
|
|||||||
void EnTest_SetupStunned(EnTest* this) {
|
void EnTest_SetupStunned(EnTest* this) {
|
||||||
this->unk_7C8 = 0xB;
|
this->unk_7C8 = 0xB;
|
||||||
this->unk_7DE = 0;
|
this->unk_7DE = 0;
|
||||||
this->swordState = 0;
|
this->meleeWeaponState = 0;
|
||||||
this->skelAnime.playSpeed = 0.0f;
|
this->skelAnime.playSpeed = 0.0f;
|
||||||
this->actor.speedXZ = -4.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.colorFilterTimer == 0) {
|
||||||
if (this->actor.colChkInfo.health == 0) {
|
if (this->actor.colChkInfo.health == 0) {
|
||||||
func_80862FA8(this, play);
|
func_80862FA8(this, play);
|
||||||
} else if (player->swordState != 0) {
|
} else if (player->meleeWeaponState != 0) {
|
||||||
if ((this->actor.bgCheckFlags & 8) &&
|
if ((this->actor.bgCheckFlags & 8) &&
|
||||||
((ABS((s16)(this->actor.wallYaw - this->actor.shape.rot.y)) < 0x38A4) &&
|
((ABS((s16)(this->actor.wallYaw - this->actor.shape.rot.y)) < 0x38A4) &&
|
||||||
(this->actor.xzDistToPlayer < 80.0f))) {
|
(this->actor.xzDistToPlayer < 80.0f))) {
|
||||||
@ -1484,9 +1484,9 @@ void func_80862DBC(EnTest* this, PlayState* play) {
|
|||||||
BodyBreak_Alloc(&this->bodyBreak, 60, play);
|
BodyBreak_Alloc(&this->bodyBreak, 60, play);
|
||||||
this->actor.home.rot.x = 0;
|
this->actor.home.rot.x = 0;
|
||||||
|
|
||||||
if (this->swordState >= 0) {
|
if (this->meleeWeaponState >= 0) {
|
||||||
EffectBlure_AddSpace(Effect_GetByIndex(this->effectIndex));
|
EffectBlure_AddSpace(Effect_GetByIndex(this->effectIndex));
|
||||||
this->swordState = -1;
|
this->meleeWeaponState = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
|
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
|
||||||
@ -1593,7 +1593,7 @@ void func_8086318C(EnTest* this, PlayState* play) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void EnTest_SetupRecoil(EnTest* this) {
|
void EnTest_SetupRecoil(EnTest* this) {
|
||||||
this->swordState = 0;
|
this->meleeWeaponState = 0;
|
||||||
this->skelAnime.moveFlags = 2;
|
this->skelAnime.moveFlags = 2;
|
||||||
this->unk_7C8 = 0x13;
|
this->unk_7C8 = 0x13;
|
||||||
this->skelAnime.playSpeed = -1.0f;
|
this->skelAnime.playSpeed = -1.0f;
|
||||||
@ -1668,8 +1668,8 @@ void EnTest_UpdateDamage(EnTest* this, PlayState* play) {
|
|||||||
if ((this->actor.colChkInfo.damageEffect != STALFOS_DMGEFF_SLING) &&
|
if ((this->actor.colChkInfo.damageEffect != STALFOS_DMGEFF_SLING) &&
|
||||||
(this->actor.colChkInfo.damageEffect != STALFOS_DMGEFF_FIREMAGIC)) {
|
(this->actor.colChkInfo.damageEffect != STALFOS_DMGEFF_FIREMAGIC)) {
|
||||||
this->lastDamageEffect = this->actor.colChkInfo.damageEffect;
|
this->lastDamageEffect = this->actor.colChkInfo.damageEffect;
|
||||||
if (this->swordState >= 1) {
|
if (this->meleeWeaponState >= 1) {
|
||||||
this->swordState = 0;
|
this->meleeWeaponState = 0;
|
||||||
}
|
}
|
||||||
this->unk_7DC = player->unk_845;
|
this->unk_7DC = player->unk_845;
|
||||||
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
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)) {
|
if (!(this->swordCollider.base.atFlags & AT_BOUNCED)) {
|
||||||
CollisionCheck_SetAT(play, &play->colChkCtx, &this->swordCollider.base);
|
CollisionCheck_SetAT(play, &play->colChkCtx, &this->swordCollider.base);
|
||||||
} else {
|
} else {
|
||||||
@ -1883,12 +1883,12 @@ void EnTest_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot
|
|||||||
Matrix_MultVec3f(&D_80864664, &sp70);
|
Matrix_MultVec3f(&D_80864664, &sp70);
|
||||||
Matrix_MultVec3f(&D_80864670, &sp64);
|
Matrix_MultVec3f(&D_80864670, &sp64);
|
||||||
|
|
||||||
if ((this->swordState >= 1) &&
|
if ((this->meleeWeaponState >= 1) &&
|
||||||
((this->actor.params != STALFOS_TYPE_INVISIBLE) || play->actorCtx.lensActive)) {
|
((this->actor.params != STALFOS_TYPE_INVISIBLE) || play->actorCtx.lensActive)) {
|
||||||
EffectBlure_AddVertex(Effect_GetByIndex(this->effectIndex), &sp70, &sp64);
|
EffectBlure_AddVertex(Effect_GetByIndex(this->effectIndex), &sp70, &sp64);
|
||||||
} else if (this->swordState >= 0) {
|
} else if (this->meleeWeaponState >= 0) {
|
||||||
EffectBlure_AddSpace(Effect_GetByIndex(this->effectIndex));
|
EffectBlure_AddSpace(Effect_GetByIndex(this->effectIndex));
|
||||||
this->swordState = -1;
|
this->meleeWeaponState = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if ((limbIndex == STALFOS_LIMB_SHIELD) && (this->unk_7DE != 0)) {
|
} else if ((limbIndex == STALFOS_LIMB_SHIELD) && (this->unk_7DE != 0)) {
|
||||||
|
@ -95,7 +95,7 @@ typedef struct EnTest {
|
|||||||
/* 0x7E8 */ s32 timer;
|
/* 0x7E8 */ s32 timer;
|
||||||
/* 0x7EC */ f32 unk_7EC;
|
/* 0x7EC */ f32 unk_7EC;
|
||||||
/* 0x7F0 */ BodyBreak bodyBreak;
|
/* 0x7F0 */ BodyBreak bodyBreak;
|
||||||
/* 0x808 */ s8 swordState;
|
/* 0x808 */ s8 meleeWeaponState;
|
||||||
/* 0x80C */ s32 effectIndex;
|
/* 0x80C */ s32 effectIndex;
|
||||||
/* 0x810 */ ColliderCylinder bodyCollider;
|
/* 0x810 */ ColliderCylinder bodyCollider;
|
||||||
/* 0x85C */ ColliderQuad swordCollider;
|
/* 0x85C */ ColliderQuad swordCollider;
|
||||||
|
@ -314,7 +314,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
|
|||||||
sStaggerTimer = 50;
|
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[0].base);
|
||||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->meleeWeaponQuads[1].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
|
// 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)) {
|
(player->meleeWeaponAnimation == JUMPSLASH_START)) {
|
||||||
this->actor.world.rot.y = this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
|
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,
|
player->actor.world.pos.z,
|
||||||
1.0f, 5.0f, 0.0f);
|
1.0f, 5.0f, 0.0f);
|
||||||
sSwordJumpTimer--;
|
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;
|
this->actor.world.rot.y = this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
|
||||||
input->cur.button = BTN_A;
|
input->cur.button = BTN_A;
|
||||||
player->stateFlags3 &= ~4;
|
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,
|
// Handles the reaction to a one-handed stab. If the conditions are satisfied,
|
||||||
// Dark Link jumps on Link's sword. Otherwise he backflips away.
|
// 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) &&
|
(player->meleeWeaponAnimation == STAB_1H) && (this->actor.xzDistToPlayer <= 85.0f) &&
|
||||||
Actor_IsTargeted(play, &this->actor)) {
|
Actor_IsTargeted(play, &this->actor)) {
|
||||||
|
|
||||||
@ -407,7 +407,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
|
|||||||
player->stateFlags3 |= 4;
|
player->stateFlags3 |= 4;
|
||||||
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
|
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
|
||||||
sSwordJumpTimer = 27;
|
sSwordJumpTimer = 27;
|
||||||
player->swordState = 0;
|
player->meleeWeaponState = 0;
|
||||||
player->linearVelocity = 0.0f;
|
player->linearVelocity = 0.0f;
|
||||||
this->invincibilityTimer = -7;
|
this->invincibilityTimer = -7;
|
||||||
this->linearVelocity = 0.0f;
|
this->linearVelocity = 0.0f;
|
||||||
@ -440,8 +440,8 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
|
|||||||
} else {
|
} else {
|
||||||
EnTorch2_Backflip(this, input, &this->actor);
|
EnTorch2_Backflip(this, input, &this->actor);
|
||||||
}
|
}
|
||||||
if (!CHECK_BTN_ANY(input->cur.button, BTN_A | BTN_R) && (this->swordState == 0) &&
|
if (!CHECK_BTN_ANY(input->cur.button, BTN_A | BTN_R) && (this->meleeWeaponState == 0) &&
|
||||||
(player->swordState != 0)) {
|
(player->meleeWeaponState != 0)) {
|
||||||
sCounterState = 1;
|
sCounterState = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -455,9 +455,9 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
|
|||||||
(ABS(sp5A) >= 0x7800) && (this->actor.isTargeted || !(player->stateFlags1 & 0x00400000))) {
|
(ABS(sp5A) >= 0x7800) && (this->actor.isTargeted || !(player->stateFlags1 & 0x00400000))) {
|
||||||
EnTorch2_SwingSword(play, input, this);
|
EnTorch2_SwingSword(play, input, this);
|
||||||
} else if (((this->actor.xzDistToPlayer <= 70.0f) ||
|
} else if (((this->actor.xzDistToPlayer <= 70.0f) ||
|
||||||
((this->actor.xzDistToPlayer <= 80.0f + sp50) && (player->swordState != 0))) &&
|
((this->actor.xzDistToPlayer <= 80.0f + sp50) && (player->meleeWeaponState != 0))) &&
|
||||||
(this->swordState == 0)) {
|
(this->meleeWeaponState == 0)) {
|
||||||
if (!EnTorch2_SwingSword(play, input, this) && (this->swordState == 0) &&
|
if (!EnTorch2_SwingSword(play, input, this) && (this->meleeWeaponState == 0) &&
|
||||||
(sCounterState == 0)) {
|
(sCounterState == 0)) {
|
||||||
EnTorch2_Backflip(this, input, &this->actor);
|
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);
|
Math_SmoothStepToS(&sStickAngle, player->actor.shape.rot.y + 0x7FFF, 1, 0x2328, 0);
|
||||||
}
|
}
|
||||||
} else if (this->actor.xzDistToPlayer > 100.0f + sp50) {
|
} 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)) {
|
(player->meleeWeaponAnimation > BIG_SPIN_2H) || (this->actor.xzDistToPlayer >= 280.0f)) {
|
||||||
sStickTilt = 127.0f;
|
sStickTilt = 127.0f;
|
||||||
sStickAngle = this->actor.yawTowardsPlayer;
|
sStickAngle = this->actor.yawTowardsPlayer;
|
||||||
@ -520,7 +520,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case ENTORCH2_DAMAGE:
|
case ENTORCH2_DAMAGE:
|
||||||
this->swordState = 0;
|
this->meleeWeaponState = 0;
|
||||||
input->cur.stick_x = input->cur.stick_y = 0;
|
input->cur.stick_x = input->cur.stick_y = 0;
|
||||||
if ((this->invincibilityTimer > 0) && (this->actor.world.pos.y < (this->actor.floorHeight - 160.0f))) {
|
if ((this->invincibilityTimer > 0) && (this->actor.world.pos.y < (this->actor.floorHeight - 160.0f))) {
|
||||||
this->stateFlags3 &= ~1;
|
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
|
// 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))) {
|
(player->meleeWeaponAnimation > BIG_SPIN_2H))) {
|
||||||
sStickTilt = 0.0f;
|
sStickTilt = 0.0f;
|
||||||
input->cur.stick_x = 0;
|
input->cur.stick_x = 0;
|
||||||
@ -586,7 +586,7 @@ void EnTorch2_Update(Actor* thisx, PlayState* play2) {
|
|||||||
pad54 = input->prev.button ^ input->cur.button;
|
pad54 = input->prev.button ^ input->cur.button;
|
||||||
input->press.button = input->cur.button & pad54;
|
input->press.button = input->cur.button & pad54;
|
||||||
if (CHECK_BTN_ANY(input->cur.button, BTN_R)) {
|
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->rel.button = input->prev.button & pad54;
|
||||||
input->prev.button = input->cur.button & (u16) ~(BTN_A | BTN_B);
|
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.
|
* This ensures Dark Link's counter animation mirrors Link's exactly.
|
||||||
*/
|
*/
|
||||||
if ((sCounterState != 0) && (sCounterState == 1)) {
|
if ((sCounterState != 0) && (sCounterState == 1)) {
|
||||||
if (this->swordState == 0) {
|
if (this->meleeWeaponState == 0) {
|
||||||
sCounterState = 0;
|
sCounterState = 0;
|
||||||
} else {
|
} else {
|
||||||
sCounterState = 2;
|
sCounterState = 2;
|
||||||
this->swordState = 1;
|
this->meleeWeaponState = 1;
|
||||||
this->skelAnime.curFrame = player->skelAnime.curFrame - player->skelAnime.playSpeed;
|
this->skelAnime.curFrame = player->skelAnime.curFrame - player->skelAnime.playSpeed;
|
||||||
this->skelAnime.playSpeed = player->skelAnime.playSpeed;
|
this->skelAnime.playSpeed = player->skelAnime.playSpeed;
|
||||||
LinkAnimation_Update(play, &this->skelAnime);
|
LinkAnimation_Update(play, &this->skelAnime);
|
||||||
@ -772,13 +772,13 @@ s32 EnTorch2_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f
|
|||||||
Gfx** gfx) {
|
Gfx** gfx) {
|
||||||
Player* this = (Player*)thisx;
|
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) {
|
void EnTorch2_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfx) {
|
||||||
Player* this = (Player*)thisx;
|
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) {
|
void EnTorch2_Draw(Actor* thisx, PlayState* play2) {
|
||||||
|
@ -450,9 +450,9 @@ void EnWallmas_TakePlayer(EnWallmas* this, PlayState* play) {
|
|||||||
|
|
||||||
if (Animation_OnFrame(&this->skelAnime, 1.0f) != 0) {
|
if (Animation_OnFrame(&this->skelAnime, 1.0f) != 0) {
|
||||||
if (!LINK_IS_ADULT) {
|
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 {
|
} 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);
|
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 (this->timer == -0x1E) {
|
||||||
if (!LINK_IS_ADULT) {
|
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 {
|
} 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) {
|
if (this->timer == 0) {
|
||||||
|
@ -461,7 +461,7 @@ void EnWf_Wait(EnWf* this, PlayState* play) {
|
|||||||
angle = player->actor.shape.rot.y - this->actor.shape.rot.y;
|
angle = player->actor.shape.rot.y - this->actor.shape.rot.y;
|
||||||
angle = ABS(angle);
|
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;
|
this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||||
EnWf_SetupRunAroundPlayer(this);
|
EnWf_SetupRunAroundPlayer(this);
|
||||||
} else {
|
} else {
|
||||||
@ -522,7 +522,7 @@ void EnWf_RunAtPlayer(EnWf* this, PlayState* play) {
|
|||||||
playerFacingAngleDiff = player->actor.shape.rot.y - this->actor.shape.rot.y;
|
playerFacingAngleDiff = player->actor.shape.rot.y - this->actor.shape.rot.y;
|
||||||
playerFacingAngleDiff = ABS(playerFacingAngleDiff);
|
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)) {
|
(playerFacingAngleDiff >= 8000)) {
|
||||||
this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||||
|
|
||||||
|
@ -721,7 +721,7 @@ void func_80B4543C(EnZf* this, PlayState* play) {
|
|||||||
angleToPlayer = player->actor.shape.rot.y - this->actor.shape.rot.y;
|
angleToPlayer = player->actor.shape.rot.y - this->actor.shape.rot.y;
|
||||||
angleToPlayer = ABS(angleToPlayer);
|
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;
|
this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||||
func_80B483E4(this, play);
|
func_80B483E4(this, play);
|
||||||
} else if (this->unk_3F0 != 0) {
|
} 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 = player->actor.shape.rot.y - this->actor.shape.rot.y;
|
||||||
temp_v1 = ABS(temp_v1);
|
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)) {
|
(temp_v1 >= 0x1F40)) {
|
||||||
this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||||
|
|
||||||
|
@ -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);
|
Animation_Change(&this->skelAnime, &gChildZelda1Anim_00438, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP, 0.0f);
|
||||||
func_8002DF54(play, &this->actor, 1);
|
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;
|
this->actor.textId = 0x7039;
|
||||||
Message_StartTextbox(play, this->actor.textId, NULL);
|
Message_StartTextbox(play, this->actor.textId, NULL);
|
||||||
this->unk_1E2 = 0;
|
this->unk_1E2 = 0;
|
||||||
|
@ -109,7 +109,7 @@ void MagicFire_UpdateBeforeCast(Actor* thisx, PlayState* play) {
|
|||||||
this->actionTimer--;
|
this->actionTimer--;
|
||||||
} else {
|
} else {
|
||||||
this->actor.update = MagicFire_Update;
|
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;
|
this->actor.world.pos = player->actor.world.pos;
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,7 @@ void MagicWind_Init(Actor* thisx, PlayState* play) {
|
|||||||
MagicWind_SetupAction(this, MagicWind_Shrink);
|
MagicWind_SetupAction(this, MagicWind_Shrink);
|
||||||
// "Means start"
|
// "Means start"
|
||||||
LOG_STRING("表示開始");
|
LOG_STRING("表示開始");
|
||||||
func_8002F7DC(&player->actor, NA_SE_PL_MAGIC_WIND_WARP);
|
Player_PlaySfx(&player->actor, NA_SE_PL_MAGIC_WIND_WARP);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -95,7 +95,7 @@ void MagicWind_WaitForTimer(MagicWind* this, PlayState* play) {
|
|||||||
|
|
||||||
// "Means start"
|
// "Means start"
|
||||||
LOG_STRING("表示開始");
|
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_UpdateAlpha(1.0f);
|
||||||
MagicWind_SetupAction(this, MagicWind_Grow);
|
MagicWind_SetupAction(this, MagicWind_Grow);
|
||||||
SkelCurve_Update(play, &this->skelCurve);
|
SkelCurve_Update(play, &this->skelCurve);
|
||||||
|
@ -223,7 +223,7 @@ void ObjKibako_Idle(ObjKibako* this, PlayState* play) {
|
|||||||
void ObjKibako_SetupHeld(ObjKibako* this) {
|
void ObjKibako_SetupHeld(ObjKibako* this) {
|
||||||
this->actionFunc = ObjKibako_Held;
|
this->actionFunc = ObjKibako_Held;
|
||||||
this->actor.room = -1;
|
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) {
|
void ObjKibako_Held(ObjKibako* this, PlayState* play) {
|
||||||
|
@ -176,7 +176,7 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2) {
|
|||||||
if (dmgFlags & 0x20820) {
|
if (dmgFlags & 0x20820) {
|
||||||
interactionType = 1;
|
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);
|
Math_Vec3f_Diff(&player->meleeWeaponInfo[0].tip, &this->actor.world.pos, &tipToFlame);
|
||||||
tipToFlame.y -= 67.0f;
|
tipToFlame.y -= 67.0f;
|
||||||
if ((SQ(tipToFlame.x) + SQ(tipToFlame.y) + SQ(tipToFlame.z)) < SQ(20.0f)) {
|
if ((SQ(tipToFlame.x) + SQ(tipToFlame.y) + SQ(tipToFlame.z)) < SQ(20.0f)) {
|
||||||
|
@ -283,7 +283,7 @@ void ObjTsubo_Idle(ObjTsubo* this, PlayState* play) {
|
|||||||
void ObjTsubo_SetupLiftedUp(ObjTsubo* this) {
|
void ObjTsubo_SetupLiftedUp(ObjTsubo* this) {
|
||||||
this->actionFunc = ObjTsubo_LiftedUp;
|
this->actionFunc = ObjTsubo_LiftedUp;
|
||||||
this->actor.room = -1;
|
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;
|
this->actor.flags |= ACTOR_FLAG_UPDATE_WHILE_CULLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -152,7 +152,7 @@ void KaleidoScope_DrawPlayerWork(PlayState* play) {
|
|||||||
|
|
||||||
extern int fbTest;
|
extern int fbTest;
|
||||||
gsSPSetFB(play->state.gfxCtx->polyOpa.p++, 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_SWORD), CUR_EQUIP_VALUE(EQUIP_TUNIC) - 1, CUR_EQUIP_VALUE(EQUIP_SHIELD),
|
||||||
CUR_EQUIP_VALUE(EQUIP_BOOTS) - 1);
|
CUR_EQUIP_VALUE(EQUIP_BOOTS) - 1);
|
||||||
gsSPResetFB(play->state.gfxCtx->polyOpa.p++);
|
gsSPResetFB(play->state.gfxCtx->polyOpa.p++);
|
||||||
|
Loading…
Reference in New Issue
Block a user