mirror of
https://github.com/zeldaret/oot.git
synced 2025-05-11 11:33:48 +00:00
PlayerActionParam
-> PlayerItemAction
(#1394)
* `PLAYER_AP_` -> `PLAYER_IA_` * Change temps, args, comments, members to "item action" * Format
This commit is contained in:
parent
e7558cc305
commit
b6d9a8183b
13 changed files with 400 additions and 407 deletions
|
@ -1013,13 +1013,13 @@ s32 Player_InBlockingCsMode(PlayState* play, Player* this);
|
|||
s32 Player_InCsMode(PlayState* play);
|
||||
s32 func_8008E9C4(Player* this);
|
||||
s32 Player_IsChildWithHylianShield(Player* this);
|
||||
s32 Player_ActionToModelGroup(Player* this, s32 actionParam);
|
||||
s32 Player_ActionToModelGroup(Player* this, s32 itemAction);
|
||||
void Player_SetModelsForHoldingShield(Player* this);
|
||||
void Player_SetModels(Player* this, s32 modelGroup);
|
||||
void Player_SetModelGroup(Player* this, s32 modelGroup);
|
||||
void func_8008EC70(Player* this);
|
||||
void Player_SetEquipmentData(PlayState* play, Player* this);
|
||||
void Player_UpdateBottleHeld(PlayState* play, Player* this, s32 item, s32 actionParam);
|
||||
void Player_UpdateBottleHeld(PlayState* play, Player* this, s32 item, s32 itemAction);
|
||||
void func_8008EDF0(Player* this);
|
||||
void func_8008EE08(Player* this);
|
||||
void func_8008EEAC(PlayState* play, Actor* actor);
|
||||
|
@ -1030,18 +1030,18 @@ u8 Player_GetMask(PlayState* play);
|
|||
Player* Player_UnsetMask(PlayState* play);
|
||||
s32 Player_HasMirrorShieldEquipped(PlayState* play);
|
||||
s32 Player_HasMirrorShieldSetToDraw(PlayState* play);
|
||||
s32 Player_ActionToMagicSpell(Player* this, s32 actionParam);
|
||||
s32 Player_ActionToMagicSpell(Player* this, s32 itemAction);
|
||||
s32 Player_HoldsHookshot(Player* this);
|
||||
s32 func_8008F128(Player* this);
|
||||
s32 Player_ActionToMeleeWeapon(s32 actionParam);
|
||||
s32 Player_ActionToMeleeWeapon(s32 itemAction);
|
||||
s32 Player_GetMeleeWeaponHeld(Player* this);
|
||||
s32 Player_HoldsTwoHandedWeapon(Player* this);
|
||||
s32 Player_HoldsBrokenKnife(Player* this);
|
||||
s32 Player_ActionToBottle(Player* this, s32 actionParam);
|
||||
s32 Player_ActionToBottle(Player* this, s32 itemAction);
|
||||
s32 Player_GetBottleHeld(Player* this);
|
||||
s32 Player_ActionToExplosive(Player* this, s32 actionParam);
|
||||
s32 Player_ActionToExplosive(Player* this, s32 itemAction);
|
||||
s32 Player_GetExplosiveHeld(Player* this);
|
||||
s32 func_8008F2BC(Player* this, s32 actionParam);
|
||||
s32 func_8008F2BC(Player* this, s32 itemAction);
|
||||
s32 func_8008F2F8(PlayState* play);
|
||||
void Player_DrawImpl(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dListCount, s32 lod, s32 tunic,
|
||||
s32 boots, s32 face, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw,
|
||||
|
|
|
@ -62,75 +62,75 @@ typedef enum {
|
|||
} PlayerMask;
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ PLAYER_AP_NONE,
|
||||
/* 0x01 */ PLAYER_AP_LAST_USED,
|
||||
/* 0x02 */ PLAYER_AP_FISHING_POLE,
|
||||
/* 0x03 */ PLAYER_AP_SWORD_MASTER,
|
||||
/* 0x04 */ PLAYER_AP_SWORD_KOKIRI,
|
||||
/* 0x05 */ PLAYER_AP_SWORD_BGS,
|
||||
/* 0x06 */ PLAYER_AP_STICK,
|
||||
/* 0x07 */ PLAYER_AP_HAMMER,
|
||||
/* 0x08 */ PLAYER_AP_BOW,
|
||||
/* 0x09 */ PLAYER_AP_BOW_FIRE,
|
||||
/* 0x0A */ PLAYER_AP_BOW_ICE,
|
||||
/* 0x0B */ PLAYER_AP_BOW_LIGHT,
|
||||
/* 0x0C */ PLAYER_AP_BOW_0C,
|
||||
/* 0x0D */ PLAYER_AP_BOW_0D,
|
||||
/* 0x0E */ PLAYER_AP_BOW_0E,
|
||||
/* 0x0F */ PLAYER_AP_SLINGSHOT,
|
||||
/* 0x10 */ PLAYER_AP_HOOKSHOT,
|
||||
/* 0x11 */ PLAYER_AP_LONGSHOT,
|
||||
/* 0x12 */ PLAYER_AP_BOMB,
|
||||
/* 0x13 */ PLAYER_AP_BOMBCHU,
|
||||
/* 0x14 */ PLAYER_AP_BOOMERANG,
|
||||
/* 0x15 */ PLAYER_AP_MAGIC_SPELL_15,
|
||||
/* 0x16 */ PLAYER_AP_MAGIC_SPELL_16,
|
||||
/* 0x17 */ PLAYER_AP_MAGIC_SPELL_17,
|
||||
/* 0x18 */ PLAYER_AP_FARORES_WIND,
|
||||
/* 0x19 */ PLAYER_AP_NAYRUS_LOVE,
|
||||
/* 0x1A */ PLAYER_AP_DINS_FIRE,
|
||||
/* 0x1B */ PLAYER_AP_NUT,
|
||||
/* 0x1C */ PLAYER_AP_OCARINA_FAIRY,
|
||||
/* 0x1D */ PLAYER_AP_OCARINA_TIME,
|
||||
/* 0x1E */ PLAYER_AP_BOTTLE,
|
||||
/* 0x1F */ PLAYER_AP_BOTTLE_FISH,
|
||||
/* 0x20 */ PLAYER_AP_BOTTLE_FIRE,
|
||||
/* 0x21 */ PLAYER_AP_BOTTLE_BUG,
|
||||
/* 0x22 */ PLAYER_AP_BOTTLE_POE,
|
||||
/* 0x23 */ PLAYER_AP_BOTTLE_BIG_POE,
|
||||
/* 0x24 */ PLAYER_AP_BOTTLE_LETTER,
|
||||
/* 0x25 */ PLAYER_AP_BOTTLE_POTION_RED,
|
||||
/* 0x26 */ PLAYER_AP_BOTTLE_POTION_BLUE,
|
||||
/* 0x27 */ PLAYER_AP_BOTTLE_POTION_GREEN,
|
||||
/* 0x28 */ PLAYER_AP_BOTTLE_MILK,
|
||||
/* 0x29 */ PLAYER_AP_BOTTLE_MILK_HALF,
|
||||
/* 0x2A */ PLAYER_AP_BOTTLE_FAIRY,
|
||||
/* 0x2B */ PLAYER_AP_LETTER_ZELDA,
|
||||
/* 0x2C */ PLAYER_AP_WEIRD_EGG,
|
||||
/* 0x2D */ PLAYER_AP_CHICKEN,
|
||||
/* 0x2E */ PLAYER_AP_BEAN,
|
||||
/* 0x2F */ PLAYER_AP_POCKET_EGG,
|
||||
/* 0x30 */ PLAYER_AP_POCKET_CUCCO,
|
||||
/* 0x31 */ PLAYER_AP_COJIRO,
|
||||
/* 0x32 */ PLAYER_AP_ODD_MUSHROOM,
|
||||
/* 0x33 */ PLAYER_AP_ODD_POTION,
|
||||
/* 0x34 */ PLAYER_AP_SAW,
|
||||
/* 0x35 */ PLAYER_AP_SWORD_BROKEN,
|
||||
/* 0x36 */ PLAYER_AP_PRESCRIPTION,
|
||||
/* 0x37 */ PLAYER_AP_FROG,
|
||||
/* 0x38 */ PLAYER_AP_EYEDROPS,
|
||||
/* 0x39 */ PLAYER_AP_CLAIM_CHECK,
|
||||
/* 0x3A */ PLAYER_AP_MASK_KEATON,
|
||||
/* 0x3B */ PLAYER_AP_MASK_SKULL,
|
||||
/* 0x3C */ PLAYER_AP_MASK_SPOOKY,
|
||||
/* 0x3D */ PLAYER_AP_MASK_BUNNY,
|
||||
/* 0x3E */ PLAYER_AP_MASK_GORON,
|
||||
/* 0x3F */ PLAYER_AP_MASK_ZORA,
|
||||
/* 0x40 */ PLAYER_AP_MASK_GERUDO,
|
||||
/* 0x41 */ PLAYER_AP_MASK_TRUTH,
|
||||
/* 0x42 */ PLAYER_AP_LENS,
|
||||
/* 0x43 */ PLAYER_AP_MAX
|
||||
} PlayerActionParam;
|
||||
/* 0x00 */ PLAYER_IA_NONE,
|
||||
/* 0x01 */ PLAYER_IA_LAST_USED,
|
||||
/* 0x02 */ PLAYER_IA_FISHING_POLE,
|
||||
/* 0x03 */ PLAYER_IA_SWORD_MASTER,
|
||||
/* 0x04 */ PLAYER_IA_SWORD_KOKIRI,
|
||||
/* 0x05 */ PLAYER_IA_SWORD_BGS,
|
||||
/* 0x06 */ PLAYER_IA_STICK,
|
||||
/* 0x07 */ PLAYER_IA_HAMMER,
|
||||
/* 0x08 */ PLAYER_IA_BOW,
|
||||
/* 0x09 */ PLAYER_IA_BOW_FIRE,
|
||||
/* 0x0A */ PLAYER_IA_BOW_ICE,
|
||||
/* 0x0B */ PLAYER_IA_BOW_LIGHT,
|
||||
/* 0x0C */ PLAYER_IA_BOW_0C,
|
||||
/* 0x0D */ PLAYER_IA_BOW_0D,
|
||||
/* 0x0E */ PLAYER_IA_BOW_0E,
|
||||
/* 0x0F */ PLAYER_IA_SLINGSHOT,
|
||||
/* 0x10 */ PLAYER_IA_HOOKSHOT,
|
||||
/* 0x11 */ PLAYER_IA_LONGSHOT,
|
||||
/* 0x12 */ PLAYER_IA_BOMB,
|
||||
/* 0x13 */ PLAYER_IA_BOMBCHU,
|
||||
/* 0x14 */ PLAYER_IA_BOOMERANG,
|
||||
/* 0x15 */ PLAYER_IA_MAGIC_SPELL_15,
|
||||
/* 0x16 */ PLAYER_IA_MAGIC_SPELL_16,
|
||||
/* 0x17 */ PLAYER_IA_MAGIC_SPELL_17,
|
||||
/* 0x18 */ PLAYER_IA_FARORES_WIND,
|
||||
/* 0x19 */ PLAYER_IA_NAYRUS_LOVE,
|
||||
/* 0x1A */ PLAYER_IA_DINS_FIRE,
|
||||
/* 0x1B */ PLAYER_IA_NUT,
|
||||
/* 0x1C */ PLAYER_IA_OCARINA_FAIRY,
|
||||
/* 0x1D */ PLAYER_IA_OCARINA_TIME,
|
||||
/* 0x1E */ PLAYER_IA_BOTTLE,
|
||||
/* 0x1F */ PLAYER_IA_BOTTLE_FISH,
|
||||
/* 0x20 */ PLAYER_IA_BOTTLE_FIRE,
|
||||
/* 0x21 */ PLAYER_IA_BOTTLE_BUG,
|
||||
/* 0x22 */ PLAYER_IA_BOTTLE_POE,
|
||||
/* 0x23 */ PLAYER_IA_BOTTLE_BIG_POE,
|
||||
/* 0x24 */ PLAYER_IA_BOTTLE_LETTER,
|
||||
/* 0x25 */ PLAYER_IA_BOTTLE_POTION_RED,
|
||||
/* 0x26 */ PLAYER_IA_BOTTLE_POTION_BLUE,
|
||||
/* 0x27 */ PLAYER_IA_BOTTLE_POTION_GREEN,
|
||||
/* 0x28 */ PLAYER_IA_BOTTLE_MILK,
|
||||
/* 0x29 */ PLAYER_IA_BOTTLE_MILK_HALF,
|
||||
/* 0x2A */ PLAYER_IA_BOTTLE_FAIRY,
|
||||
/* 0x2B */ PLAYER_IA_LETTER_ZELDA,
|
||||
/* 0x2C */ PLAYER_IA_WEIRD_EGG,
|
||||
/* 0x2D */ PLAYER_IA_CHICKEN,
|
||||
/* 0x2E */ PLAYER_IA_BEAN,
|
||||
/* 0x2F */ PLAYER_IA_POCKET_EGG,
|
||||
/* 0x30 */ PLAYER_IA_POCKET_CUCCO,
|
||||
/* 0x31 */ PLAYER_IA_COJIRO,
|
||||
/* 0x32 */ PLAYER_IA_ODD_MUSHROOM,
|
||||
/* 0x33 */ PLAYER_IA_ODD_POTION,
|
||||
/* 0x34 */ PLAYER_IA_SAW,
|
||||
/* 0x35 */ PLAYER_IA_SWORD_BROKEN,
|
||||
/* 0x36 */ PLAYER_IA_PRESCRIPTION,
|
||||
/* 0x37 */ PLAYER_IA_FROG,
|
||||
/* 0x38 */ PLAYER_IA_EYEDROPS,
|
||||
/* 0x39 */ PLAYER_IA_CLAIM_CHECK,
|
||||
/* 0x3A */ PLAYER_IA_MASK_KEATON,
|
||||
/* 0x3B */ PLAYER_IA_MASK_SKULL,
|
||||
/* 0x3C */ PLAYER_IA_MASK_SPOOKY,
|
||||
/* 0x3D */ PLAYER_IA_MASK_BUNNY,
|
||||
/* 0x3E */ PLAYER_IA_MASK_GORON,
|
||||
/* 0x3F */ PLAYER_IA_MASK_ZORA,
|
||||
/* 0x40 */ PLAYER_IA_MASK_GERUDO,
|
||||
/* 0x41 */ PLAYER_IA_MASK_TRUTH,
|
||||
/* 0x42 */ PLAYER_IA_LENS,
|
||||
/* 0x43 */ PLAYER_IA_MAX
|
||||
} PlayerItemAction;
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ PLAYER_LIMB_NONE,
|
||||
|
@ -469,10 +469,10 @@ typedef struct Player {
|
|||
/* 0x014E */ s8 currentShield; // current shield from `PlayerShield`
|
||||
/* 0x014F */ s8 currentBoots; // current boots from `PlayerBoots`
|
||||
/* 0x0150 */ s8 heldItemButton; // Button index for the item currently used
|
||||
/* 0x0151 */ s8 heldItemActionParam; // Action param for the item currently used
|
||||
/* 0x0151 */ s8 heldItemAction; // Item action for the item currently used
|
||||
/* 0x0152 */ u8 heldItemId; // Item id for the item currently used
|
||||
/* 0x0153 */ s8 prevBoots; // previous boots from `PlayerBoots`
|
||||
/* 0x0154 */ s8 itemActionParam; // the difference between this and heldItemActionParam is unclear
|
||||
/* 0x0154 */ s8 itemAction; // the difference between this and heldItemAction is unclear
|
||||
/* 0x0155 */ char unk_155[0x003];
|
||||
/* 0x0158 */ u8 modelGroup;
|
||||
/* 0x0159 */ u8 nextModelGroup;
|
||||
|
|
|
@ -24,75 +24,75 @@ s16 sBootData[PLAYER_BOOTS_MAX][17] = {
|
|||
{ 200, 1000, 300, 800, 500, 400, 800, 400, 800, 550, -100, 600, 540, 750, 125, 400, 200 },
|
||||
};
|
||||
|
||||
// Used to map action params to model groups
|
||||
u8 sActionModelGroups[PLAYER_AP_MAX] = {
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_NONE
|
||||
PLAYER_MODELGROUP_15, // PLAYER_AP_LAST_USED
|
||||
PLAYER_MODELGROUP_10, // PLAYER_AP_FISHING_POLE
|
||||
PLAYER_MODELGROUP_SWORD, // PLAYER_AP_SWORD_MASTER
|
||||
PLAYER_MODELGROUP_SWORD, // PLAYER_AP_SWORD_KOKIRI
|
||||
PLAYER_MODELGROUP_BGS, // PLAYER_AP_SWORD_BGS
|
||||
PLAYER_MODELGROUP_10, // PLAYER_AP_STICK
|
||||
PLAYER_MODELGROUP_HAMMER, // PLAYER_AP_HAMMER
|
||||
PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_AP_BOW
|
||||
PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_AP_BOW_FIRE
|
||||
PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_AP_BOW_ICE
|
||||
PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_AP_BOW_LIGHT
|
||||
PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_AP_BOW_0C
|
||||
PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_AP_BOW_0D
|
||||
PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_AP_BOW_0E
|
||||
PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_AP_SLINGSHOT
|
||||
PLAYER_MODELGROUP_HOOKSHOT, // PLAYER_AP_HOOKSHOT
|
||||
PLAYER_MODELGROUP_HOOKSHOT, // PLAYER_AP_LONGSHOT
|
||||
PLAYER_MODELGROUP_EXPLOSIVES, // PLAYER_AP_BOMB
|
||||
PLAYER_MODELGROUP_EXPLOSIVES, // PLAYER_AP_BOMBCHU
|
||||
PLAYER_MODELGROUP_BOOMERANG, // PLAYER_AP_BOOMERANG
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_MAGIC_SPELL_15
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_MAGIC_SPELL_16
|
||||
PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_AP_MAGIC_SPELL_17
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_FARORES_WIND
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_NAYRUS_LOVE
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_DINS_FIRE
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_NUT
|
||||
PLAYER_MODELGROUP_OCARINA, // PLAYER_AP_OCARINA_FAIRY
|
||||
PLAYER_MODELGROUP_OOT, // PLAYER_AP_OCARINA_TIME
|
||||
PLAYER_MODELGROUP_BOTTLE, // PLAYER_AP_BOTTLE
|
||||
PLAYER_MODELGROUP_BOTTLE, // PLAYER_AP_BOTTLE_FISH
|
||||
PLAYER_MODELGROUP_BOTTLE, // PLAYER_AP_BOTTLE_FIRE
|
||||
PLAYER_MODELGROUP_BOTTLE, // PLAYER_AP_BOTTLE_BUG
|
||||
PLAYER_MODELGROUP_BOTTLE, // PLAYER_AP_BOTTLE_POE
|
||||
PLAYER_MODELGROUP_BOTTLE, // PLAYER_AP_BOTTLE_BIG_POE
|
||||
PLAYER_MODELGROUP_BOTTLE, // PLAYER_AP_BOTTLE_LETTER
|
||||
PLAYER_MODELGROUP_BOTTLE, // PLAYER_AP_BOTTLE_POTION_RED
|
||||
PLAYER_MODELGROUP_BOTTLE, // PLAYER_AP_BOTTLE_POTION_BLUE
|
||||
PLAYER_MODELGROUP_BOTTLE, // PLAYER_AP_BOTTLE_POTION_GREEN
|
||||
PLAYER_MODELGROUP_BOTTLE, // PLAYER_AP_BOTTLE_MILK
|
||||
PLAYER_MODELGROUP_BOTTLE, // PLAYER_AP_BOTTLE_MILK_HALF
|
||||
PLAYER_MODELGROUP_BOTTLE, // PLAYER_AP_BOTTLE_FAIRY
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_LETTER_ZELDA
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_WEIRD_EGG
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_CHICKEN
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_BEAN
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_POCKET_EGG
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_POCKET_CUCCO
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_COJIRO
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_ODD_MUSHROOM
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_ODD_POTION
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_SAW
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_SWORD_BROKEN
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_PRESCRIPTION
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_FROG
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_EYEDROPS
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_CLAIM_CHECK
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_MASK_KEATON
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_MASK_SKULL
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_MASK_SPOOKY
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_MASK_BUNNY
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_MASK_GORON
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_MASK_ZORA
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_MASK_GERUDO
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_MASK_TRUTH
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_AP_LENS
|
||||
// Used to map item actions to model groups
|
||||
u8 sActionModelGroups[PLAYER_IA_MAX] = {
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_NONE
|
||||
PLAYER_MODELGROUP_15, // PLAYER_IA_LAST_USED
|
||||
PLAYER_MODELGROUP_10, // PLAYER_IA_FISHING_POLE
|
||||
PLAYER_MODELGROUP_SWORD, // PLAYER_IA_SWORD_MASTER
|
||||
PLAYER_MODELGROUP_SWORD, // PLAYER_IA_SWORD_KOKIRI
|
||||
PLAYER_MODELGROUP_BGS, // PLAYER_IA_SWORD_BGS
|
||||
PLAYER_MODELGROUP_10, // PLAYER_IA_STICK
|
||||
PLAYER_MODELGROUP_HAMMER, // PLAYER_IA_HAMMER
|
||||
PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW
|
||||
PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_FIRE
|
||||
PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_ICE
|
||||
PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_LIGHT
|
||||
PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_0C
|
||||
PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_0D
|
||||
PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_BOW_0E
|
||||
PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_SLINGSHOT
|
||||
PLAYER_MODELGROUP_HOOKSHOT, // PLAYER_IA_HOOKSHOT
|
||||
PLAYER_MODELGROUP_HOOKSHOT, // PLAYER_IA_LONGSHOT
|
||||
PLAYER_MODELGROUP_EXPLOSIVES, // PLAYER_IA_BOMB
|
||||
PLAYER_MODELGROUP_EXPLOSIVES, // PLAYER_IA_BOMBCHU
|
||||
PLAYER_MODELGROUP_BOOMERANG, // PLAYER_IA_BOOMERANG
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MAGIC_SPELL_15
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MAGIC_SPELL_16
|
||||
PLAYER_MODELGROUP_BOW_SLINGSHOT, // PLAYER_IA_MAGIC_SPELL_17
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_FARORES_WIND
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_NAYRUS_LOVE
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_DINS_FIRE
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_NUT
|
||||
PLAYER_MODELGROUP_OCARINA, // PLAYER_IA_OCARINA_FAIRY
|
||||
PLAYER_MODELGROUP_OOT, // PLAYER_IA_OCARINA_TIME
|
||||
PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE
|
||||
PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_FISH
|
||||
PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_FIRE
|
||||
PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_BUG
|
||||
PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_POE
|
||||
PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_BIG_POE
|
||||
PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_LETTER
|
||||
PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_POTION_RED
|
||||
PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_POTION_BLUE
|
||||
PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_POTION_GREEN
|
||||
PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_MILK
|
||||
PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_MILK_HALF
|
||||
PLAYER_MODELGROUP_BOTTLE, // PLAYER_IA_BOTTLE_FAIRY
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_LETTER_ZELDA
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_WEIRD_EGG
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_CHICKEN
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_BEAN
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_POCKET_EGG
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_POCKET_CUCCO
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_COJIRO
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_ODD_MUSHROOM
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_ODD_POTION
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_SAW
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_SWORD_BROKEN
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_PRESCRIPTION
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_FROG
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_EYEDROPS
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_CLAIM_CHECK
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_KEATON
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_SKULL
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_SPOOKY
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_BUNNY
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_GORON
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_ZORA
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_GERUDO
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_MASK_TRUTH
|
||||
PLAYER_MODELGROUP_DEFAULT, // PLAYER_IA_LENS
|
||||
};
|
||||
|
||||
TextTriggerEntry sTextTriggers[] = {
|
||||
|
@ -491,8 +491,7 @@ s32 Player_InBlockingCsMode(PlayState* play, Player* this) {
|
|||
return (this->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_29)) || (this->csMode != 0) ||
|
||||
(play->transitionTrigger == TRANS_TRIGGER_START) || (this->stateFlags1 & PLAYER_STATE1_0) ||
|
||||
(this->stateFlags3 & PLAYER_STATE3_7) ||
|
||||
((gSaveContext.magicState != MAGIC_STATE_IDLE) &&
|
||||
(Player_ActionToMagicSpell(this, this->itemActionParam) >= 0));
|
||||
((gSaveContext.magicState != MAGIC_STATE_IDLE) && (Player_ActionToMagicSpell(this, this->itemAction) >= 0));
|
||||
}
|
||||
|
||||
s32 Player_InCsMode(PlayState* play) {
|
||||
|
@ -509,8 +508,8 @@ s32 Player_IsChildWithHylianShield(Player* this) {
|
|||
return gSaveContext.linkAge != LINK_AGE_ADULT && (this->currentShield == PLAYER_SHIELD_HYLIAN);
|
||||
}
|
||||
|
||||
s32 Player_ActionToModelGroup(Player* this, s32 actionParam) {
|
||||
s32 modelGroup = sActionModelGroups[actionParam];
|
||||
s32 Player_ActionToModelGroup(Player* this, s32 itemAction) {
|
||||
s32 modelGroup = sActionModelGroups[itemAction];
|
||||
|
||||
if ((modelGroup == PLAYER_MODELGROUP_SWORD) && Player_IsChildWithHylianShield(this)) {
|
||||
// child, using kokiri sword with hylian shield equipped
|
||||
|
@ -522,7 +521,7 @@ s32 Player_ActionToModelGroup(Player* this, s32 actionParam) {
|
|||
|
||||
void Player_SetModelsForHoldingShield(Player* this) {
|
||||
if ((this->stateFlags1 & PLAYER_STATE1_22) &&
|
||||
((this->itemActionParam < 0) || (this->itemActionParam == this->heldItemActionParam))) {
|
||||
((this->itemAction < 0) || (this->itemAction == this->heldItemAction))) {
|
||||
if (!Player_HoldsTwoHandedWeapon(this) && !Player_IsChildWithHylianShield(this)) {
|
||||
this->rightHandType = PLAYER_MODELTYPE_RH_SHIELD;
|
||||
this->rightHandDLists = sPlayerDListGroups[PLAYER_MODELTYPE_RH_SHIELD] + ((void)0, gSaveContext.linkAge);
|
||||
|
@ -533,7 +532,7 @@ void Player_SetModelsForHoldingShield(Player* this) {
|
|||
}
|
||||
this->sheathDLists = sPlayerDListGroups[this->sheathType] + ((void)0, gSaveContext.linkAge);
|
||||
this->modelAnimType = PLAYER_ANIMTYPE_2;
|
||||
this->itemActionParam = -1;
|
||||
this->itemAction = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -572,8 +571,8 @@ void Player_SetModelGroup(Player* this, s32 modelGroup) {
|
|||
}
|
||||
|
||||
void func_8008EC70(Player* this) {
|
||||
this->itemActionParam = this->heldItemActionParam;
|
||||
Player_SetModelGroup(this, Player_ActionToModelGroup(this, this->heldItemActionParam));
|
||||
this->itemAction = this->heldItemAction;
|
||||
Player_SetModelGroup(this, Player_ActionToModelGroup(this, this->heldItemAction));
|
||||
this->unk_6AD = 0;
|
||||
}
|
||||
|
||||
|
@ -583,20 +582,20 @@ void Player_SetEquipmentData(PlayState* play, Player* this) {
|
|||
this->currentTunic = TUNIC_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_TUNIC));
|
||||
this->currentBoots = BOOTS_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_BOOTS));
|
||||
this->currentSwordItemId = B_BTN_ITEM;
|
||||
Player_SetModelGroup(this, Player_ActionToModelGroup(this, this->heldItemActionParam));
|
||||
Player_SetModelGroup(this, Player_ActionToModelGroup(this, this->heldItemAction));
|
||||
Player_SetBootData(play, this);
|
||||
}
|
||||
}
|
||||
|
||||
void Player_UpdateBottleHeld(PlayState* play, Player* this, s32 item, s32 actionParam) {
|
||||
void Player_UpdateBottleHeld(PlayState* play, Player* this, s32 item, s32 itemAction) {
|
||||
Inventory_UpdateBottleItem(play, item, this->heldItemButton);
|
||||
|
||||
if (item != ITEM_BOTTLE) {
|
||||
this->heldItemId = item;
|
||||
this->heldItemActionParam = actionParam;
|
||||
this->heldItemAction = itemAction;
|
||||
}
|
||||
|
||||
this->itemActionParam = actionParam;
|
||||
this->itemAction = itemAction;
|
||||
}
|
||||
|
||||
void func_8008EDF0(Player* this) {
|
||||
|
@ -645,7 +644,7 @@ s32 Player_IsBurningStickInRange(PlayState* play, Vec3f* pos, f32 xzRange, f32 y
|
|||
Vec3f diff;
|
||||
s32 pad;
|
||||
|
||||
if ((this->heldItemActionParam == PLAYER_AP_STICK) && (this->unk_860 != 0)) {
|
||||
if ((this->heldItemAction == PLAYER_IA_STICK) && (this->unk_860 != 0)) {
|
||||
Math_Vec3f_Diff(&this->meleeWeaponInfo[0].tip, pos, &diff);
|
||||
return ((SQ(diff.x) + SQ(diff.z)) <= SQ(xzRange)) && (0.0f <= diff.y) && (diff.y <= yRange);
|
||||
} else {
|
||||
|
@ -691,8 +690,8 @@ s32 Player_HasMirrorShieldSetToDraw(PlayState* play) {
|
|||
return (this->rightHandType == PLAYER_MODELTYPE_RH_SHIELD) && (this->currentShield == PLAYER_SHIELD_MIRROR);
|
||||
}
|
||||
|
||||
s32 Player_ActionToMagicSpell(Player* this, s32 actionParam) {
|
||||
s32 magicSpell = actionParam - PLAYER_AP_MAGIC_SPELL_15;
|
||||
s32 Player_ActionToMagicSpell(Player* this, s32 itemAction) {
|
||||
s32 magicSpell = itemAction - PLAYER_IA_MAGIC_SPELL_15;
|
||||
|
||||
if ((magicSpell >= 0) && (magicSpell < 6)) {
|
||||
return magicSpell;
|
||||
|
@ -702,15 +701,15 @@ s32 Player_ActionToMagicSpell(Player* this, s32 actionParam) {
|
|||
}
|
||||
|
||||
s32 Player_HoldsHookshot(Player* this) {
|
||||
return (this->heldItemActionParam == PLAYER_AP_HOOKSHOT) || (this->heldItemActionParam == PLAYER_AP_LONGSHOT);
|
||||
return (this->heldItemAction == PLAYER_IA_HOOKSHOT) || (this->heldItemAction == PLAYER_IA_LONGSHOT);
|
||||
}
|
||||
|
||||
s32 func_8008F128(Player* this) {
|
||||
return Player_HoldsHookshot(this) && (this->heldActor == NULL);
|
||||
}
|
||||
|
||||
s32 Player_ActionToMeleeWeapon(s32 actionParam) {
|
||||
s32 meleeWeapon = actionParam - PLAYER_AP_FISHING_POLE;
|
||||
s32 Player_ActionToMeleeWeapon(s32 itemAction) {
|
||||
s32 meleeWeapon = itemAction - PLAYER_IA_FISHING_POLE;
|
||||
|
||||
if ((meleeWeapon > 0) && (meleeWeapon < 6)) {
|
||||
return meleeWeapon;
|
||||
|
@ -720,11 +719,11 @@ s32 Player_ActionToMeleeWeapon(s32 actionParam) {
|
|||
}
|
||||
|
||||
s32 Player_GetMeleeWeaponHeld(Player* this) {
|
||||
return Player_ActionToMeleeWeapon(this->heldItemActionParam);
|
||||
return Player_ActionToMeleeWeapon(this->heldItemAction);
|
||||
}
|
||||
|
||||
s32 Player_HoldsTwoHandedWeapon(Player* this) {
|
||||
if ((this->heldItemActionParam >= PLAYER_AP_SWORD_BGS) && (this->heldItemActionParam <= PLAYER_AP_HAMMER)) {
|
||||
if ((this->heldItemAction >= PLAYER_IA_SWORD_BGS) && (this->heldItemAction <= PLAYER_IA_HAMMER)) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
|
@ -732,11 +731,11 @@ s32 Player_HoldsTwoHandedWeapon(Player* this) {
|
|||
}
|
||||
|
||||
s32 Player_HoldsBrokenKnife(Player* this) {
|
||||
return (this->heldItemActionParam == PLAYER_AP_SWORD_BGS) && (gSaveContext.swordHealth <= 0.0f);
|
||||
return (this->heldItemAction == PLAYER_IA_SWORD_BGS) && (gSaveContext.swordHealth <= 0.0f);
|
||||
}
|
||||
|
||||
s32 Player_ActionToBottle(Player* this, s32 actionParam) {
|
||||
s32 bottle = actionParam - PLAYER_AP_BOTTLE;
|
||||
s32 Player_ActionToBottle(Player* this, s32 itemAction) {
|
||||
s32 bottle = itemAction - PLAYER_IA_BOTTLE;
|
||||
|
||||
if ((bottle >= 0) && (bottle < 13)) {
|
||||
return bottle;
|
||||
|
@ -746,11 +745,11 @@ s32 Player_ActionToBottle(Player* this, s32 actionParam) {
|
|||
}
|
||||
|
||||
s32 Player_GetBottleHeld(Player* this) {
|
||||
return Player_ActionToBottle(this, this->heldItemActionParam);
|
||||
return Player_ActionToBottle(this, this->heldItemAction);
|
||||
}
|
||||
|
||||
s32 Player_ActionToExplosive(Player* this, s32 actionParam) {
|
||||
s32 explosive = actionParam - PLAYER_AP_BOMB;
|
||||
s32 Player_ActionToExplosive(Player* this, s32 itemAction) {
|
||||
s32 explosive = itemAction - PLAYER_IA_BOMB;
|
||||
|
||||
if ((explosive >= 0) && (explosive < 2)) {
|
||||
return explosive;
|
||||
|
@ -760,14 +759,14 @@ s32 Player_ActionToExplosive(Player* this, s32 actionParam) {
|
|||
}
|
||||
|
||||
s32 Player_GetExplosiveHeld(Player* this) {
|
||||
return Player_ActionToExplosive(this, this->heldItemActionParam);
|
||||
return Player_ActionToExplosive(this, this->heldItemAction);
|
||||
}
|
||||
|
||||
s32 func_8008F2BC(Player* this, s32 actionParam) {
|
||||
s32 func_8008F2BC(Player* this, s32 itemAction) {
|
||||
s32 sword = 0;
|
||||
|
||||
if (actionParam != PLAYER_AP_LAST_USED) {
|
||||
sword = actionParam - PLAYER_AP_SWORD_MASTER;
|
||||
if (itemAction != PLAYER_IA_LAST_USED) {
|
||||
sword = itemAction - PLAYER_IA_SWORD_MASTER;
|
||||
if ((sword < 0) || (sword >= 3)) {
|
||||
goto return_neg;
|
||||
}
|
||||
|
@ -979,7 +978,7 @@ void func_8008F87C(PlayState* play, Player* this, SkelAnime* skelAnime, Vec3f* p
|
|||
s32 temp3;
|
||||
|
||||
if ((this->actor.scale.y >= 0.0f) && !(this->stateFlags1 & PLAYER_STATE1_7) &&
|
||||
(Player_ActionToMagicSpell(this, this->itemActionParam) < 0)) {
|
||||
(Player_ActionToMagicSpell(this, this->itemAction) < 0)) {
|
||||
s32 pad;
|
||||
|
||||
sp7C = D_80126058[(void)0, gSaveContext.linkAge];
|
||||
|
@ -1454,7 +1453,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
|
|||
|
||||
Math_Vec3f_Copy(&this->leftHandPos, sCurBodyPartPos);
|
||||
|
||||
if (this->itemActionParam == PLAYER_AP_STICK) {
|
||||
if (this->itemAction == PLAYER_IA_STICK) {
|
||||
Vec3f sp124[3];
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_player_lib.c", 2633);
|
||||
|
@ -1490,7 +1489,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
|
|||
func_80090A28(this, spE4);
|
||||
func_800906D4(play, this, spE4);
|
||||
} else if ((*dList != NULL) && (this->leftHandType == PLAYER_MODELTYPE_LH_BOTTLE)) {
|
||||
Color_RGB8* bottleColor = &sBottleColors[Player_ActionToBottle(this, this->itemActionParam)];
|
||||
Color_RGB8* bottleColor = &sBottleColors[Player_ActionToBottle(this, this->itemAction)];
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_player_lib.c", 2710);
|
||||
|
||||
|
@ -1580,8 +1579,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
|
|||
}
|
||||
|
||||
if (this->actor.scale.y >= 0.0f) {
|
||||
if ((this->heldItemActionParam == PLAYER_AP_HOOKSHOT) ||
|
||||
(this->heldItemActionParam == PLAYER_AP_LONGSHOT)) {
|
||||
if ((this->heldItemAction == PLAYER_IA_HOOKSHOT) || (this->heldItemAction == PLAYER_IA_LONGSHOT)) {
|
||||
Matrix_MultVec3f(&D_80126184, &this->unk_3C8);
|
||||
|
||||
if (heldActor != NULL) {
|
||||
|
@ -1596,8 +1594,8 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
|
|||
|
||||
if (func_8002DD78(this) != 0) {
|
||||
Matrix_Translate(500.0f, 300.0f, 0.0f, MTXMODE_APPLY);
|
||||
Player_DrawHookshotReticle(
|
||||
play, this, (this->heldItemActionParam == PLAYER_AP_HOOKSHOT) ? 38600.0f : 77600.0f);
|
||||
Player_DrawHookshotReticle(play, this,
|
||||
(this->heldItemAction == PLAYER_IA_HOOKSHOT) ? 38600.0f : 77600.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ void ArmsHook_Wait(ArmsHook* this, PlayState* play) {
|
|||
if (this->actor.parent == NULL) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
// get correct timer length for hookshot or longshot
|
||||
s32 length = (player->heldItemActionParam == PLAYER_AP_HOOKSHOT) ? 13 : 26;
|
||||
s32 length = (player->heldItemAction == PLAYER_IA_HOOKSHOT) ? 13 : 26;
|
||||
|
||||
ArmsHook_SetupAction(this, ArmsHook_Shoot);
|
||||
func_8002D9A4(&this->actor, 20.0f);
|
||||
|
@ -120,7 +120,7 @@ s32 ArmsHook_CheckForCancel(ArmsHook* this) {
|
|||
Player* player = (Player*)this->actor.parent;
|
||||
|
||||
if (Player_HoldsHookshot(player)) {
|
||||
if ((player->itemActionParam != player->heldItemActionParam) || (player->actor.flags & ACTOR_FLAG_8) ||
|
||||
if ((player->itemAction != player->heldItemAction) || (player->actor.flags & ACTOR_FLAG_8) ||
|
||||
((player->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_26)))) {
|
||||
this->timer = 0;
|
||||
ArmsHook_DetachHookFromActor(this);
|
||||
|
|
|
@ -399,7 +399,7 @@ void BgYdanSp_WallWebIdle(BgYdanSp* this, PlayState* play) {
|
|||
if (Flags_GetSwitch(play, this->burnSwitchFlag) || (this->trisCollider.base.acFlags & AC_HIT)) {
|
||||
this->dyna.actor.home.pos.y = this->dyna.actor.world.pos.y + 80.0f;
|
||||
BgYdanSp_BurnWeb(this, play);
|
||||
} else if (player->heldItemActionParam == PLAYER_AP_STICK && player->unk_860 != 0) {
|
||||
} else if (player->heldItemAction == PLAYER_IA_STICK && player->unk_860 != 0) {
|
||||
func_8002DBD0(&this->dyna.actor, &sp30, &player->meleeWeaponInfo[0].tip);
|
||||
if (fabsf(sp30.x) < 100.0f && sp30.z < 1.0f && sp30.y < 200.0f) {
|
||||
OnePointCutscene_Init(play, 3020, 40, &this->dyna.actor, CAM_ID_MAIN);
|
||||
|
|
|
@ -1636,7 +1636,7 @@ void func_8090120C(BossGanon2* this, PlayState* play) {
|
|||
temp_f12 = this->unk_1B8.z - player->actor.world.pos.z;
|
||||
temp_a0_2 = Math_Atan2S(temp_f12, temp_f14) - player->actor.shape.rot.y;
|
||||
if ((ABS(temp_a0_2) < 0x2000) && (sqrtf(SQ(temp_f14) + SQ(temp_f12)) < 70.0f) &&
|
||||
(player->meleeWeaponState != 0) && (player->heldItemActionParam == PLAYER_AP_SWORD_MASTER)) {
|
||||
(player->meleeWeaponState != 0) && (player->heldItemAction == PLAYER_IA_SWORD_MASTER)) {
|
||||
func_80064520(play, &play->csCtx);
|
||||
this->subCamId = Play_CreateSubCamera(play);
|
||||
Play_ChangeCameraStatus(play, CAM_ID_MAIN, CAM_STAT_WAIT);
|
||||
|
|
|
@ -268,8 +268,7 @@ void EnButte_FlyAround(EnButte* this, PlayState* play) {
|
|||
EnButte_SelectFlightParams(this, &sFlyAroundParams[this->flightParamsIdx]);
|
||||
}
|
||||
|
||||
if (((this->actor.params & 1) == 1) && (player->heldItemActionParam == PLAYER_AP_STICK) &&
|
||||
(this->swordDownTimer <= 0) &&
|
||||
if (((this->actor.params & 1) == 1) && (player->heldItemAction == PLAYER_IA_STICK) && (this->swordDownTimer <= 0) &&
|
||||
((Math3D_Dist2DSq(player->actor.world.pos.x, player->actor.world.pos.z, this->actor.home.pos.x,
|
||||
this->actor.home.pos.z) < SQ(120.0f)) ||
|
||||
(this->actor.xzDistToPlayer < 60.0f))) {
|
||||
|
@ -334,7 +333,7 @@ void EnButte_FollowLink(EnButte* this, PlayState* play) {
|
|||
|
||||
distSqFromHome = Math3D_Dist2DSq(this->actor.world.pos.x, this->actor.world.pos.z, this->actor.home.pos.x,
|
||||
this->actor.home.pos.z);
|
||||
if (!((player->heldItemActionParam == PLAYER_AP_STICK) && (fabsf(player->actor.speedXZ) < 1.8f) &&
|
||||
if (!((player->heldItemAction == PLAYER_IA_STICK) && (fabsf(player->actor.speedXZ) < 1.8f) &&
|
||||
(this->swordDownTimer <= 0) && (distSqFromHome < SQ(320.0f)))) {
|
||||
EnButte_SetupFlyAround(this);
|
||||
} else if (distSqFromHome > SQ(240.0f)) {
|
||||
|
|
|
@ -317,7 +317,7 @@ void func_80A2F9C0(EnGb* this, PlayState* play) {
|
|||
SET_INFTABLE(INFTABLE_B6);
|
||||
}
|
||||
func_80A2F180(this);
|
||||
Player_UpdateBottleHeld(play, GET_PLAYER(play), ITEM_BOTTLE, PLAYER_AP_BOTTLE);
|
||||
Player_UpdateBottleHeld(play, GET_PLAYER(play), ITEM_BOTTLE, PLAYER_IA_BOTTLE);
|
||||
Rupees_ChangeBy(10);
|
||||
this->actionFunc = func_80A2F83C;
|
||||
}
|
||||
|
@ -329,7 +329,7 @@ void func_80A2FA50(EnGb* this, PlayState* play) {
|
|||
SET_INFTABLE(INFTABLE_B6);
|
||||
}
|
||||
func_80A2F180(this);
|
||||
Player_UpdateBottleHeld(play, GET_PLAYER(play), ITEM_BOTTLE, PLAYER_AP_BOTTLE);
|
||||
Player_UpdateBottleHeld(play, GET_PLAYER(play), ITEM_BOTTLE, PLAYER_IA_BOTTLE);
|
||||
Rupees_ChangeBy(50);
|
||||
HIGH_SCORE(HS_POE_POINTS) += 100;
|
||||
if (HIGH_SCORE(HS_POE_POINTS) != 1000) {
|
||||
|
|
|
@ -592,7 +592,7 @@ s16 func_80A70058(PlayState* play, Actor* thisx) {
|
|||
case 0x70F3:
|
||||
Rupees_ChangeBy(beggarRewards[this->actor.textId - 0x70F0]);
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENHY_ANIM_17);
|
||||
Player_UpdateBottleHeld(play, GET_PLAYER(play), ITEM_BOTTLE, PLAYER_AP_BOTTLE);
|
||||
Player_UpdateBottleHeld(play, GET_PLAYER(play), ITEM_BOTTLE, PLAYER_IA_BOTTLE);
|
||||
break;
|
||||
case 0x7016:
|
||||
SET_INFTABLE(INFTABLE_C0);
|
||||
|
|
|
@ -663,7 +663,7 @@ void EnTest_WalkAndBlock(EnTest* this, PlayState* play) {
|
|||
EnTest_SetupJumpslash(this);
|
||||
return;
|
||||
}
|
||||
} else if (player->heldItemActionParam != PLAYER_AP_NONE) {
|
||||
} else if (player->heldItemAction != PLAYER_IA_NONE) {
|
||||
if (this->actor.isTargeted) {
|
||||
if ((play->gameplayFrames % 2) != 0) {
|
||||
func_808627C4(this, play);
|
||||
|
@ -1462,7 +1462,7 @@ void func_808628C8(EnTest* this, PlayState* play) {
|
|||
if (!EnTest_ReactToProjectile(play, this)) {
|
||||
EnTest_ChooseAction(this, play);
|
||||
}
|
||||
} else if (player->heldItemActionParam != PLAYER_AP_NONE) {
|
||||
} else if (player->heldItemAction != PLAYER_IA_NONE) {
|
||||
if ((play->gameplayFrames % 2) != 0) {
|
||||
EnTest_SetupIdle(this);
|
||||
} else {
|
||||
|
|
|
@ -96,7 +96,7 @@ void EnTorch2_Init(Actor* thisx, PlayState* play2) {
|
|||
sInput.cur.button = sInput.press.button = sInput.rel.button = 0;
|
||||
sInput.cur.stick_x = sInput.cur.stick_y = 0;
|
||||
this->currentShield = PLAYER_SHIELD_HYLIAN;
|
||||
this->heldItemActionParam = this->heldItemId = PLAYER_AP_SWORD_MASTER;
|
||||
this->heldItemAction = this->heldItemId = PLAYER_IA_SWORD_MASTER;
|
||||
Player_SetModelGroup(this, PLAYER_MODELGROUP_SWORD);
|
||||
play->playerInit(this, play, &gDarkLinkSkel);
|
||||
this->actor.naviEnemyId = NAVI_ENEMY_DARK_LINK;
|
||||
|
|
|
@ -175,7 +175,7 @@ void ObjSyokudai_Update(Actor* thisx, PlayState* play2) {
|
|||
if (dmgFlags & (DMG_FIRE | DMG_ARROW_NORMAL)) {
|
||||
interactionType = 1;
|
||||
}
|
||||
} else if (player->heldItemActionParam == PLAYER_AP_STICK) {
|
||||
} else if (player->heldItemAction == PLAYER_IA_STICK) {
|
||||
Math_Vec3f_Diff(&player->meleeWeaponInfo[0].tip, &this->actor.world.pos, &tipToFlame);
|
||||
tipToFlame.y -= 67.0f;
|
||||
if ((SQ(tipToFlame.x) + SQ(tipToFlame.y) + SQ(tipToFlame.z)) < SQ(20.0f)) {
|
||||
|
|
|
@ -47,7 +47,7 @@ typedef struct {
|
|||
typedef struct {
|
||||
/* 0x00 */ s16 actorId;
|
||||
/* 0x02 */ u8 itemId;
|
||||
/* 0x03 */ u8 actionParam;
|
||||
/* 0x03 */ u8 itemAction;
|
||||
/* 0x04 */ u8 textId;
|
||||
} BottleCatchInfo; // size = 0x06
|
||||
|
||||
|
@ -128,7 +128,7 @@ void func_8083377C(PlayState* play, Player* this);
|
|||
void func_808337D4(PlayState* play, Player* this);
|
||||
void func_80833910(PlayState* play, Player* this);
|
||||
void func_80833984(PlayState* play, Player* this);
|
||||
void func_8083399C(PlayState* play, Player* this, s8 actionParam);
|
||||
void func_8083399C(PlayState* play, Player* this, s8 itemAction);
|
||||
s32 func_8083485C(Player* this, PlayState* play);
|
||||
s32 func_808349DC(Player* this, PlayState* play);
|
||||
s32 func_80834A2C(Player* this, PlayState* play);
|
||||
|
@ -1023,70 +1023,70 @@ static u8 D_80853E7C[] = {
|
|||
0, 0, 1, 1, 2, 2, 2, 2, 10, 10, 10, 10, 10, 10, 3, 3, 4, 4, 8, 8, 5, 5, 6, 6, 7, 7, 9, 9, 0,
|
||||
};
|
||||
|
||||
// Used to map item IDs to action params
|
||||
static s8 sItemActionParams[] = {
|
||||
PLAYER_AP_STICK,
|
||||
PLAYER_AP_NUT,
|
||||
PLAYER_AP_BOMB,
|
||||
PLAYER_AP_BOW,
|
||||
PLAYER_AP_BOW_FIRE,
|
||||
PLAYER_AP_DINS_FIRE,
|
||||
PLAYER_AP_SLINGSHOT,
|
||||
PLAYER_AP_OCARINA_FAIRY,
|
||||
PLAYER_AP_OCARINA_TIME,
|
||||
PLAYER_AP_BOMBCHU,
|
||||
PLAYER_AP_HOOKSHOT,
|
||||
PLAYER_AP_LONGSHOT,
|
||||
PLAYER_AP_BOW_ICE,
|
||||
PLAYER_AP_FARORES_WIND,
|
||||
PLAYER_AP_BOOMERANG,
|
||||
PLAYER_AP_LENS,
|
||||
PLAYER_AP_BEAN,
|
||||
PLAYER_AP_HAMMER,
|
||||
PLAYER_AP_BOW_LIGHT,
|
||||
PLAYER_AP_NAYRUS_LOVE,
|
||||
PLAYER_AP_BOTTLE,
|
||||
PLAYER_AP_BOTTLE_POTION_RED,
|
||||
PLAYER_AP_BOTTLE_POTION_GREEN,
|
||||
PLAYER_AP_BOTTLE_POTION_BLUE,
|
||||
PLAYER_AP_BOTTLE_FAIRY,
|
||||
PLAYER_AP_BOTTLE_FISH,
|
||||
PLAYER_AP_BOTTLE_MILK,
|
||||
PLAYER_AP_BOTTLE_LETTER,
|
||||
PLAYER_AP_BOTTLE_FIRE,
|
||||
PLAYER_AP_BOTTLE_BUG,
|
||||
PLAYER_AP_BOTTLE_BIG_POE,
|
||||
PLAYER_AP_BOTTLE_MILK_HALF,
|
||||
PLAYER_AP_BOTTLE_POE,
|
||||
PLAYER_AP_WEIRD_EGG,
|
||||
PLAYER_AP_CHICKEN,
|
||||
PLAYER_AP_LETTER_ZELDA,
|
||||
PLAYER_AP_MASK_KEATON,
|
||||
PLAYER_AP_MASK_SKULL,
|
||||
PLAYER_AP_MASK_SPOOKY,
|
||||
PLAYER_AP_MASK_BUNNY,
|
||||
PLAYER_AP_MASK_GORON,
|
||||
PLAYER_AP_MASK_ZORA,
|
||||
PLAYER_AP_MASK_GERUDO,
|
||||
PLAYER_AP_MASK_TRUTH,
|
||||
PLAYER_AP_SWORD_MASTER,
|
||||
PLAYER_AP_POCKET_EGG,
|
||||
PLAYER_AP_POCKET_CUCCO,
|
||||
PLAYER_AP_COJIRO,
|
||||
PLAYER_AP_ODD_MUSHROOM,
|
||||
PLAYER_AP_ODD_POTION,
|
||||
PLAYER_AP_SAW,
|
||||
PLAYER_AP_SWORD_BROKEN,
|
||||
PLAYER_AP_PRESCRIPTION,
|
||||
PLAYER_AP_FROG,
|
||||
PLAYER_AP_EYEDROPS,
|
||||
PLAYER_AP_CLAIM_CHECK,
|
||||
PLAYER_AP_BOW_FIRE,
|
||||
PLAYER_AP_BOW_ICE,
|
||||
PLAYER_AP_BOW_LIGHT,
|
||||
PLAYER_AP_SWORD_KOKIRI,
|
||||
PLAYER_AP_SWORD_MASTER,
|
||||
PLAYER_AP_SWORD_BGS,
|
||||
// Used to map item IDs to item actions
|
||||
static s8 sItemActions[] = {
|
||||
PLAYER_IA_STICK,
|
||||
PLAYER_IA_NUT,
|
||||
PLAYER_IA_BOMB,
|
||||
PLAYER_IA_BOW,
|
||||
PLAYER_IA_BOW_FIRE,
|
||||
PLAYER_IA_DINS_FIRE,
|
||||
PLAYER_IA_SLINGSHOT,
|
||||
PLAYER_IA_OCARINA_FAIRY,
|
||||
PLAYER_IA_OCARINA_TIME,
|
||||
PLAYER_IA_BOMBCHU,
|
||||
PLAYER_IA_HOOKSHOT,
|
||||
PLAYER_IA_LONGSHOT,
|
||||
PLAYER_IA_BOW_ICE,
|
||||
PLAYER_IA_FARORES_WIND,
|
||||
PLAYER_IA_BOOMERANG,
|
||||
PLAYER_IA_LENS,
|
||||
PLAYER_IA_BEAN,
|
||||
PLAYER_IA_HAMMER,
|
||||
PLAYER_IA_BOW_LIGHT,
|
||||
PLAYER_IA_NAYRUS_LOVE,
|
||||
PLAYER_IA_BOTTLE,
|
||||
PLAYER_IA_BOTTLE_POTION_RED,
|
||||
PLAYER_IA_BOTTLE_POTION_GREEN,
|
||||
PLAYER_IA_BOTTLE_POTION_BLUE,
|
||||
PLAYER_IA_BOTTLE_FAIRY,
|
||||
PLAYER_IA_BOTTLE_FISH,
|
||||
PLAYER_IA_BOTTLE_MILK,
|
||||
PLAYER_IA_BOTTLE_LETTER,
|
||||
PLAYER_IA_BOTTLE_FIRE,
|
||||
PLAYER_IA_BOTTLE_BUG,
|
||||
PLAYER_IA_BOTTLE_BIG_POE,
|
||||
PLAYER_IA_BOTTLE_MILK_HALF,
|
||||
PLAYER_IA_BOTTLE_POE,
|
||||
PLAYER_IA_WEIRD_EGG,
|
||||
PLAYER_IA_CHICKEN,
|
||||
PLAYER_IA_LETTER_ZELDA,
|
||||
PLAYER_IA_MASK_KEATON,
|
||||
PLAYER_IA_MASK_SKULL,
|
||||
PLAYER_IA_MASK_SPOOKY,
|
||||
PLAYER_IA_MASK_BUNNY,
|
||||
PLAYER_IA_MASK_GORON,
|
||||
PLAYER_IA_MASK_ZORA,
|
||||
PLAYER_IA_MASK_GERUDO,
|
||||
PLAYER_IA_MASK_TRUTH,
|
||||
PLAYER_IA_SWORD_MASTER,
|
||||
PLAYER_IA_POCKET_EGG,
|
||||
PLAYER_IA_POCKET_CUCCO,
|
||||
PLAYER_IA_COJIRO,
|
||||
PLAYER_IA_ODD_MUSHROOM,
|
||||
PLAYER_IA_ODD_POTION,
|
||||
PLAYER_IA_SAW,
|
||||
PLAYER_IA_SWORD_BROKEN,
|
||||
PLAYER_IA_PRESCRIPTION,
|
||||
PLAYER_IA_FROG,
|
||||
PLAYER_IA_EYEDROPS,
|
||||
PLAYER_IA_CLAIM_CHECK,
|
||||
PLAYER_IA_BOW_FIRE,
|
||||
PLAYER_IA_BOW_ICE,
|
||||
PLAYER_IA_BOW_LIGHT,
|
||||
PLAYER_IA_SWORD_KOKIRI,
|
||||
PLAYER_IA_SWORD_MASTER,
|
||||
PLAYER_IA_SWORD_BGS,
|
||||
};
|
||||
|
||||
static s32 (*D_80853EDC[])(Player* this, PlayState* play) = {
|
||||
|
@ -1403,7 +1403,7 @@ void func_808323B4(PlayState* play, Player* this) {
|
|||
}
|
||||
|
||||
if (Player_GetExplosiveHeld(this) >= 0) {
|
||||
func_8083399C(play, this, PLAYER_AP_NONE);
|
||||
func_8083399C(play, this, PLAYER_IA_NONE);
|
||||
this->heldItemId = ITEM_NONE_FE;
|
||||
}
|
||||
}
|
||||
|
@ -1436,7 +1436,7 @@ void func_80832440(PlayState* play, Player* this) {
|
|||
}
|
||||
|
||||
s32 func_80832528(PlayState* play, Player* this) {
|
||||
if (this->heldItemActionParam >= PLAYER_AP_FISHING_POLE) {
|
||||
if (this->heldItemAction >= PLAYER_IA_FISHING_POLE) {
|
||||
func_80835F44(play, this, ITEM_NONE);
|
||||
return 1;
|
||||
} else {
|
||||
|
@ -1852,7 +1852,7 @@ void func_80833638(Player* this, PlayerFunc82C arg1) {
|
|||
func_808326F0(this);
|
||||
}
|
||||
|
||||
void func_80833664(PlayState* play, Player* this, s8 actionParam) {
|
||||
void func_80833664(PlayState* play, Player* this, s8 itemAction) {
|
||||
LinkAnimationHeader* current = this->skelAnime.animation;
|
||||
LinkAnimationHeader** iter = D_80853914 + this->modelAnimType;
|
||||
u32 i;
|
||||
|
@ -1866,22 +1866,22 @@ void func_80833664(PlayState* play, Player* this, s8 actionParam) {
|
|||
iter += PLAYER_ANIMTYPE_MAX;
|
||||
}
|
||||
|
||||
func_8083399C(play, this, actionParam);
|
||||
func_8083399C(play, this, itemAction);
|
||||
|
||||
if (i < PLAYER_ANIMGROUP_MAX) {
|
||||
this->skelAnime.animation = GET_PLAYER_ANIM(i, this->modelAnimType);
|
||||
}
|
||||
}
|
||||
|
||||
s8 Player_ItemToActionParam(s32 item) {
|
||||
s8 Player_ItemToItemAction(s32 item) {
|
||||
if (item >= ITEM_NONE_FE) {
|
||||
return PLAYER_AP_NONE;
|
||||
return PLAYER_IA_NONE;
|
||||
} else if (item == ITEM_LAST_USED) {
|
||||
return PLAYER_AP_LAST_USED;
|
||||
return PLAYER_IA_LAST_USED;
|
||||
} else if (item == ITEM_FISHING_POLE) {
|
||||
return PLAYER_AP_FISHING_POLE;
|
||||
return PLAYER_IA_FISHING_POLE;
|
||||
} else {
|
||||
return sItemActionParams[item];
|
||||
return sItemActions[item];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1898,7 +1898,7 @@ void func_80833790(PlayState* play, Player* this) {
|
|||
void func_8083379C(PlayState* play, Player* this) {
|
||||
this->stateFlags1 |= PLAYER_STATE1_3;
|
||||
|
||||
if (this->heldItemActionParam != PLAYER_AP_SLINGSHOT) {
|
||||
if (this->heldItemAction != PLAYER_IA_SLINGSHOT) {
|
||||
this->unk_860 = -1;
|
||||
} else {
|
||||
this->unk_860 = -2;
|
||||
|
@ -1952,17 +1952,17 @@ void func_80833984(PlayState* play, Player* this) {
|
|||
this->stateFlags1 |= PLAYER_STATE1_24;
|
||||
}
|
||||
|
||||
void func_8083399C(PlayState* play, Player* this, s8 actionParam) {
|
||||
void func_8083399C(PlayState* play, Player* this, s8 itemAction) {
|
||||
this->unk_860 = 0;
|
||||
this->unk_85C = 0.0f;
|
||||
this->unk_858 = 0.0f;
|
||||
|
||||
this->heldItemActionParam = this->itemActionParam = actionParam;
|
||||
this->heldItemAction = this->itemAction = itemAction;
|
||||
this->modelGroup = this->nextModelGroup;
|
||||
|
||||
this->stateFlags1 &= ~(PLAYER_STATE1_3 | PLAYER_STATE1_24);
|
||||
|
||||
D_80853FE8[actionParam](play, this);
|
||||
D_80853FE8[itemAction](play, this);
|
||||
|
||||
Player_SetModelGroup(this, this->modelGroup);
|
||||
}
|
||||
|
@ -1972,14 +1972,14 @@ void func_80833A20(Player* this, s32 newMeleeWeaponState) {
|
|||
u16 voiceSfx;
|
||||
|
||||
if (this->meleeWeaponState == 0) {
|
||||
if ((this->heldItemActionParam == PLAYER_AP_SWORD_BGS) && (gSaveContext.swordHealth > 0.0f)) {
|
||||
if ((this->heldItemAction == PLAYER_IA_SWORD_BGS) && (gSaveContext.swordHealth > 0.0f)) {
|
||||
itemSfx = NA_SE_IT_HAMMER_SWING;
|
||||
} else {
|
||||
itemSfx = NA_SE_IT_SWORD_SWING;
|
||||
}
|
||||
|
||||
voiceSfx = NA_SE_VO_LI_SWORD_N;
|
||||
if (this->heldItemActionParam == PLAYER_AP_HAMMER) {
|
||||
if (this->heldItemAction == PLAYER_IA_HAMMER) {
|
||||
itemSfx = NA_SE_IT_HAMMER_SWING;
|
||||
} else if (this->meleeWeaponAnimation >= PLAYER_MWA_SPIN_ATTACK_1H) {
|
||||
itemSfx = 0;
|
||||
|
@ -2039,15 +2039,15 @@ void func_80833C3C(Player* this) {
|
|||
}
|
||||
|
||||
s32 func_80833C50(Player* this, s32 item) {
|
||||
if ((item < ITEM_NONE_FE) && (Player_ItemToActionParam(item) == this->itemActionParam)) {
|
||||
if ((item < ITEM_NONE_FE) && (Player_ItemToItemAction(item) == this->itemAction)) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
s32 func_80833C98(s32 item1, s32 actionParam) {
|
||||
if ((item1 < ITEM_NONE_FE) && (Player_ItemToActionParam(item1) == actionParam)) {
|
||||
s32 func_80833C98(s32 item1, s32 itemAction) {
|
||||
if ((item1 < ITEM_NONE_FE) && (Player_ItemToItemAction(item1) == itemAction)) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
|
@ -2071,20 +2071,20 @@ s32 func_80833CDC(PlayState* play, s32 index) {
|
|||
}
|
||||
|
||||
void func_80833DF8(Player* this, PlayState* play) {
|
||||
s32 maskActionParam;
|
||||
s32 maskItemAction;
|
||||
s32 item;
|
||||
s32 i;
|
||||
|
||||
if (this->currentMask != PLAYER_MASK_NONE) {
|
||||
maskActionParam = this->currentMask - 1 + PLAYER_AP_MASK_KEATON;
|
||||
if (!func_80833C98(C_BTN_ITEM(0), maskActionParam) && !func_80833C98(C_BTN_ITEM(1), maskActionParam) &&
|
||||
!func_80833C98(C_BTN_ITEM(2), maskActionParam)) {
|
||||
maskItemAction = this->currentMask - 1 + PLAYER_IA_MASK_KEATON;
|
||||
if (!func_80833C98(C_BTN_ITEM(0), maskItemAction) && !func_80833C98(C_BTN_ITEM(1), maskItemAction) &&
|
||||
!func_80833C98(C_BTN_ITEM(2), maskItemAction)) {
|
||||
this->currentMask = PLAYER_MASK_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
if (!(this->stateFlags1 & (PLAYER_STATE1_11 | PLAYER_STATE1_29)) && !func_8008F128(this)) {
|
||||
if (this->itemActionParam >= PLAYER_AP_FISHING_POLE) {
|
||||
if (this->itemAction >= PLAYER_IA_FISHING_POLE) {
|
||||
if (!func_80833C50(this, B_BTN_ITEM) && !func_80833C50(this, C_BTN_ITEM(0)) &&
|
||||
!func_80833C50(this, C_BTN_ITEM(1)) && !func_80833C50(this, C_BTN_ITEM(2))) {
|
||||
func_80835F44(play, this, ITEM_NONE);
|
||||
|
@ -2107,7 +2107,7 @@ void func_80833DF8(Player* this, PlayState* play) {
|
|||
}
|
||||
|
||||
item = func_80833CDC(play, i);
|
||||
if ((item < ITEM_NONE_FE) && (Player_ItemToActionParam(item) == this->heldItemActionParam)) {
|
||||
if ((item < ITEM_NONE_FE) && (Player_ItemToItemAction(item) == this->heldItemAction)) {
|
||||
D_80853618 = true;
|
||||
}
|
||||
} else {
|
||||
|
@ -2127,15 +2127,15 @@ void func_808340DC(Player* this, PlayState* play) {
|
|||
s8 sp37;
|
||||
s32 nextAnimType;
|
||||
|
||||
sp37 = Player_ItemToActionParam(this->heldItemId);
|
||||
sp37 = Player_ItemToItemAction(this->heldItemId);
|
||||
func_80833638(this, func_80834A2C);
|
||||
|
||||
nextAnimType = gPlayerModelTypes[this->nextModelGroup][PLAYER_MODELGROUPENTRY_ANIM];
|
||||
sp38 = D_80854164[gPlayerModelTypes[this->modelGroup][PLAYER_MODELGROUPENTRY_ANIM]][nextAnimType];
|
||||
if ((sp37 == PLAYER_AP_BOTTLE) || (sp37 == PLAYER_AP_BOOMERANG) ||
|
||||
((sp37 == PLAYER_AP_NONE) &&
|
||||
((this->heldItemActionParam == PLAYER_AP_BOTTLE) || (this->heldItemActionParam == PLAYER_AP_BOOMERANG)))) {
|
||||
sp38 = (sp37 == PLAYER_AP_NONE) ? -PLAYER_D_808540F4_13 : PLAYER_D_808540F4_13;
|
||||
if ((sp37 == PLAYER_IA_BOTTLE) || (sp37 == PLAYER_IA_BOOMERANG) ||
|
||||
((sp37 == PLAYER_IA_NONE) &&
|
||||
((this->heldItemAction == PLAYER_IA_BOTTLE) || (this->heldItemAction == PLAYER_IA_BOOMERANG)))) {
|
||||
sp38 = (sp37 == PLAYER_IA_NONE) ? -PLAYER_D_808540F4_13 : PLAYER_D_808540F4_13;
|
||||
}
|
||||
|
||||
this->unk_15A = ABS(sp38);
|
||||
|
@ -2157,7 +2157,7 @@ void func_808340DC(Player* this, PlayState* play) {
|
|||
phi_f12 = phi_f2;
|
||||
}
|
||||
|
||||
if (sp37 != PLAYER_AP_NONE) {
|
||||
if (sp37 != PLAYER_IA_NONE) {
|
||||
phi_f0 *= 2.0f;
|
||||
}
|
||||
|
||||
|
@ -2168,7 +2168,7 @@ void func_808340DC(Player* this, PlayState* play) {
|
|||
|
||||
void func_80834298(Player* this, PlayState* play) {
|
||||
if ((this->actor.category == ACTORCAT_PLAYER) && !(this->stateFlags1 & PLAYER_STATE1_8) &&
|
||||
((this->heldItemActionParam == this->itemActionParam) || (this->stateFlags1 & PLAYER_STATE1_22)) &&
|
||||
((this->heldItemAction == this->itemAction) || (this->stateFlags1 & PLAYER_STATE1_22)) &&
|
||||
(gSaveContext.health != 0) && (play->csCtx.state == CS_STATE_IDLE) && (this->csMode == 0) &&
|
||||
(play->shootingGalleryStatus == 0) && (play->activeCamId == CAM_ID_MAIN) &&
|
||||
(play->transitionTrigger != TRANS_TRIGGER_START) && (gSaveContext.timer1State != 10)) {
|
||||
|
@ -2186,7 +2186,7 @@ s32 func_80834380(PlayState* play, Player* this, s32* itemPtr, s32* typePtr) {
|
|||
if (this->stateFlags1 & PLAYER_STATE1_23) {
|
||||
*typePtr = ARROW_NORMAL_HORSE;
|
||||
} else {
|
||||
*typePtr = ARROW_NORMAL + (this->heldItemActionParam - PLAYER_AP_BOW);
|
||||
*typePtr = ARROW_NORMAL + (this->heldItemAction - PLAYER_IA_BOW);
|
||||
}
|
||||
} else {
|
||||
*itemPtr = ITEM_SLINGSHOT;
|
||||
|
@ -2207,7 +2207,7 @@ s32 func_8083442C(Player* this, PlayState* play) {
|
|||
s32 arrowType;
|
||||
s32 magicArrowType;
|
||||
|
||||
if ((this->heldItemActionParam >= PLAYER_AP_BOW_FIRE) && (this->heldItemActionParam <= PLAYER_AP_BOW_0E) &&
|
||||
if ((this->heldItemAction >= PLAYER_IA_BOW_FIRE) && (this->heldItemAction <= PLAYER_IA_BOW_0E) &&
|
||||
(gSaveContext.magicState != MAGIC_STATE_IDLE)) {
|
||||
func_80078884(NA_SE_SY_ERROR);
|
||||
} else {
|
||||
|
@ -2242,8 +2242,8 @@ s32 func_8083442C(Player* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80834594(PlayState* play, Player* this) {
|
||||
if (this->heldItemActionParam != PLAYER_AP_NONE) {
|
||||
if (func_8008F2BC(this, this->heldItemActionParam) >= 0) {
|
||||
if (this->heldItemAction != PLAYER_IA_NONE) {
|
||||
if (func_8008F2BC(this, this->heldItemAction) >= 0) {
|
||||
func_808328EC(this, NA_SE_IT_SWORD_PUTAWAY);
|
||||
} else {
|
||||
func_808328EC(this, NA_SE_PL_CHANGE_ARMS);
|
||||
|
@ -2252,9 +2252,9 @@ void func_80834594(PlayState* play, Player* this) {
|
|||
|
||||
func_80835F44(play, this, this->heldItemId);
|
||||
|
||||
if (func_8008F2BC(this, this->heldItemActionParam) >= 0) {
|
||||
if (func_8008F2BC(this, this->heldItemAction) >= 0) {
|
||||
func_808328EC(this, NA_SE_IT_SWORD_PICKOUT);
|
||||
} else if (this->heldItemActionParam != PLAYER_AP_NONE) {
|
||||
} else if (this->heldItemAction != PLAYER_IA_NONE) {
|
||||
func_808328EC(this, NA_SE_PL_CHANGE_ARMS);
|
||||
}
|
||||
}
|
||||
|
@ -2264,7 +2264,7 @@ void func_80834644(PlayState* play, Player* this) {
|
|||
func_80834594(play, this);
|
||||
}
|
||||
|
||||
func_80833638(this, D_80853EDC[this->heldItemActionParam]);
|
||||
func_80833638(this, D_80853EDC[this->heldItemAction]);
|
||||
this->unk_834 = 0;
|
||||
this->unk_6AC = 0;
|
||||
func_808323B4(play, this);
|
||||
|
@ -2287,7 +2287,7 @@ s32 func_80834758(PlayState* play, Player* this) {
|
|||
f32 frame;
|
||||
|
||||
if (!(this->stateFlags1 & (PLAYER_STATE1_22 | PLAYER_STATE1_23 | PLAYER_STATE1_29)) &&
|
||||
(play->shootingGalleryStatus == 0) && (this->heldItemActionParam == this->itemActionParam) &&
|
||||
(play->shootingGalleryStatus == 0) && (this->heldItemAction == this->itemAction) &&
|
||||
(this->currentShield != PLAYER_SHIELD_NONE) && !Player_IsChildWithHylianShield(this) && func_80833BCC(this) &&
|
||||
CHECK_BTN_ALL(sControlInput->cur.button, BTN_R)) {
|
||||
|
||||
|
@ -2313,7 +2313,7 @@ s32 func_8083485C(Player* this, PlayState* play) {
|
|||
void func_80834894(Player* this) {
|
||||
func_80833638(this, func_80834C74);
|
||||
|
||||
if (this->itemActionParam < 0) {
|
||||
if (this->itemAction < 0) {
|
||||
func_8008EC70(this);
|
||||
}
|
||||
|
||||
|
@ -2355,10 +2355,10 @@ s32 func_808349DC(Player* this, PlayState* play) {
|
|||
|
||||
s32 func_80834A2C(Player* this, PlayState* play) {
|
||||
if (LinkAnimation_Update(play, &this->skelAnime2) ||
|
||||
((Player_ItemToActionParam(this->heldItemId) == this->heldItemActionParam) &&
|
||||
((Player_ItemToItemAction(this->heldItemId) == this->heldItemAction) &&
|
||||
(D_80853614 =
|
||||
(D_80853614 || ((this->modelAnimType != PLAYER_ANIMTYPE_3) && (play->shootingGalleryStatus == 0)))))) {
|
||||
func_80833638(this, D_80853EDC[this->heldItemActionParam]);
|
||||
func_80833638(this, D_80853EDC[this->heldItemAction]);
|
||||
this->unk_834 = 0;
|
||||
this->unk_6AC = 0;
|
||||
D_80853618 = D_80853614;
|
||||
|
@ -2409,7 +2409,7 @@ s32 func_80834C74(Player* this, PlayState* play) {
|
|||
D_80853614 = D_80853618;
|
||||
|
||||
if (D_80853614 || LinkAnimation_Update(play, &this->skelAnime2)) {
|
||||
func_80833638(this, D_80853EDC[this->heldItemActionParam]);
|
||||
func_80833638(this, D_80853EDC[this->heldItemAction]);
|
||||
LinkAnimation_PlayLoop(play, &this->skelAnime2, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_0, this->modelAnimType));
|
||||
this->unk_6AC = 0;
|
||||
this->func_82C(this, play);
|
||||
|
@ -2422,7 +2422,7 @@ s32 func_80834C74(Player* this, PlayState* play) {
|
|||
s32 func_80834D2C(Player* this, PlayState* play) {
|
||||
LinkAnimationHeader* anim;
|
||||
|
||||
if (this->heldItemActionParam != PLAYER_AP_BOOMERANG) {
|
||||
if (this->heldItemAction != PLAYER_IA_BOOMERANG) {
|
||||
if (!func_8083442C(this, play)) {
|
||||
return 0;
|
||||
}
|
||||
|
@ -2820,8 +2820,7 @@ s32 func_80835C58(PlayState* play, Player* this, PlayerFunc674 func, s32 flags)
|
|||
|
||||
this->func_674 = func;
|
||||
|
||||
if ((this->itemActionParam != this->heldItemActionParam) &&
|
||||
(!(flags & 1) || !(this->stateFlags1 & PLAYER_STATE1_22))) {
|
||||
if ((this->itemAction != this->heldItemAction) && (!(flags & 1) || !(this->stateFlags1 & PLAYER_STATE1_22))) {
|
||||
func_8008EC70(this);
|
||||
}
|
||||
|
||||
|
@ -2855,12 +2854,12 @@ void func_80835DAC(PlayState* play, Player* this, PlayerFunc674 func, s32 flags)
|
|||
void func_80835DE4(PlayState* play, Player* this, PlayerFunc674 func, s32 flags) {
|
||||
s32 temp;
|
||||
|
||||
if (this->itemActionParam >= 0) {
|
||||
temp = this->itemActionParam;
|
||||
this->itemActionParam = this->heldItemActionParam;
|
||||
if (this->itemAction >= 0) {
|
||||
temp = this->itemAction;
|
||||
this->itemAction = this->heldItemAction;
|
||||
func_80835C58(play, this, func, flags);
|
||||
this->itemActionParam = temp;
|
||||
Player_SetModels(this, Player_ActionToModelGroup(this, this->itemActionParam));
|
||||
this->itemAction = temp;
|
||||
Player_SetModels(this, Player_ActionToModelGroup(this, this->itemAction));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2892,30 +2891,29 @@ void func_80835EFC(Player* this) {
|
|||
}
|
||||
|
||||
void func_80835F44(PlayState* play, Player* this, s32 item) {
|
||||
s8 actionParam;
|
||||
s8 itemAction;
|
||||
s32 temp;
|
||||
s32 nextAnimType;
|
||||
|
||||
actionParam = Player_ItemToActionParam(item);
|
||||
itemAction = Player_ItemToItemAction(item);
|
||||
|
||||
if (((this->heldItemActionParam == this->itemActionParam) &&
|
||||
(!(this->stateFlags1 & PLAYER_STATE1_22) || (Player_ActionToMeleeWeapon(actionParam) != 0) ||
|
||||
(actionParam == PLAYER_AP_NONE))) ||
|
||||
((this->itemActionParam < 0) &&
|
||||
((Player_ActionToMeleeWeapon(actionParam) != 0) || (actionParam == PLAYER_AP_NONE)))) {
|
||||
if (((this->heldItemAction == this->itemAction) &&
|
||||
(!(this->stateFlags1 & PLAYER_STATE1_22) || (Player_ActionToMeleeWeapon(itemAction) != 0) ||
|
||||
(itemAction == PLAYER_IA_NONE))) ||
|
||||
((this->itemAction < 0) && ((Player_ActionToMeleeWeapon(itemAction) != 0) || (itemAction == PLAYER_IA_NONE)))) {
|
||||
|
||||
if ((actionParam == PLAYER_AP_NONE) || !(this->stateFlags1 & PLAYER_STATE1_27) ||
|
||||
if ((itemAction == PLAYER_IA_NONE) || !(this->stateFlags1 & PLAYER_STATE1_27) ||
|
||||
((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) &&
|
||||
((actionParam == PLAYER_AP_HOOKSHOT) || (actionParam == PLAYER_AP_LONGSHOT)))) {
|
||||
((itemAction == PLAYER_IA_HOOKSHOT) || (itemAction == PLAYER_IA_LONGSHOT)))) {
|
||||
|
||||
if ((play->bombchuBowlingStatus == 0) &&
|
||||
(((actionParam == PLAYER_AP_STICK) && (AMMO(ITEM_STICK) == 0)) ||
|
||||
((actionParam == PLAYER_AP_BEAN) && (AMMO(ITEM_BEAN) == 0)) ||
|
||||
(temp = Player_ActionToExplosive(this, actionParam),
|
||||
(((itemAction == PLAYER_IA_STICK) && (AMMO(ITEM_STICK) == 0)) ||
|
||||
((itemAction == PLAYER_IA_BEAN) && (AMMO(ITEM_BEAN) == 0)) ||
|
||||
(temp = Player_ActionToExplosive(this, itemAction),
|
||||
((temp >= 0) && ((AMMO(sExplosiveInfos[temp].itemId) == 0) ||
|
||||
(play->actorCtx.actorLists[ACTORCAT_EXPLOSIVE].length >= 3)))))) {
|
||||
func_80078884(NA_SE_SY_ERROR);
|
||||
} else if (actionParam == PLAYER_AP_LENS) {
|
||||
} else if (itemAction == PLAYER_IA_LENS) {
|
||||
if (Magic_RequestChange(play, 0, MAGIC_CONSUME_LENS)) {
|
||||
if (play->actorCtx.lensActive) {
|
||||
Actor_DisableLens(play);
|
||||
|
@ -2927,43 +2925,43 @@ void func_80835F44(PlayState* play, Player* this, s32 item) {
|
|||
} else {
|
||||
func_80078884(NA_SE_SY_ERROR);
|
||||
}
|
||||
} else if (actionParam == PLAYER_AP_NUT) {
|
||||
} else if (itemAction == PLAYER_IA_NUT) {
|
||||
if (AMMO(ITEM_NUT) != 0) {
|
||||
func_8083C61C(play, this);
|
||||
} else {
|
||||
func_80078884(NA_SE_SY_ERROR);
|
||||
}
|
||||
} else if ((temp = Player_ActionToMagicSpell(this, actionParam)) >= 0) {
|
||||
if (((actionParam == PLAYER_AP_FARORES_WIND) && (gSaveContext.respawn[RESPAWN_MODE_TOP].data > 0)) ||
|
||||
} else if ((temp = Player_ActionToMagicSpell(this, itemAction)) >= 0) {
|
||||
if (((itemAction == PLAYER_IA_FARORES_WIND) && (gSaveContext.respawn[RESPAWN_MODE_TOP].data > 0)) ||
|
||||
((gSaveContext.magicCapacity != 0) && (gSaveContext.magicState == MAGIC_STATE_IDLE) &&
|
||||
(gSaveContext.magic >= sMagicSpellCosts[temp]))) {
|
||||
this->itemActionParam = actionParam;
|
||||
this->itemAction = itemAction;
|
||||
this->unk_6AD = 4;
|
||||
} else {
|
||||
func_80078884(NA_SE_SY_ERROR);
|
||||
}
|
||||
} else if (actionParam >= PLAYER_AP_MASK_KEATON) {
|
||||
} else if (itemAction >= PLAYER_IA_MASK_KEATON) {
|
||||
if (this->currentMask != PLAYER_MASK_NONE) {
|
||||
this->currentMask = PLAYER_MASK_NONE;
|
||||
} else {
|
||||
this->currentMask = actionParam - PLAYER_AP_MASK_KEATON + 1;
|
||||
this->currentMask = itemAction - PLAYER_IA_MASK_KEATON + 1;
|
||||
}
|
||||
|
||||
func_808328EC(this, NA_SE_PL_CHANGE_ARMS);
|
||||
} else if (((actionParam >= PLAYER_AP_OCARINA_FAIRY) && (actionParam <= PLAYER_AP_OCARINA_TIME)) ||
|
||||
(actionParam >= PLAYER_AP_BOTTLE_FISH)) {
|
||||
} else if (((itemAction >= PLAYER_IA_OCARINA_FAIRY) && (itemAction <= PLAYER_IA_OCARINA_TIME)) ||
|
||||
(itemAction >= PLAYER_IA_BOTTLE_FISH)) {
|
||||
if (!func_8008E9C4(this) ||
|
||||
((actionParam >= PLAYER_AP_BOTTLE_POTION_RED) && (actionParam <= PLAYER_AP_BOTTLE_FAIRY))) {
|
||||
((itemAction >= PLAYER_IA_BOTTLE_POTION_RED) && (itemAction <= PLAYER_IA_BOTTLE_FAIRY))) {
|
||||
TitleCard_Clear(play, &play->actorCtx.titleCtx);
|
||||
this->unk_6AD = 4;
|
||||
this->itemActionParam = actionParam;
|
||||
this->itemAction = itemAction;
|
||||
}
|
||||
} else if ((actionParam != this->heldItemActionParam) ||
|
||||
((this->heldActor == NULL) && (Player_ActionToExplosive(this, actionParam) >= 0))) {
|
||||
this->nextModelGroup = Player_ActionToModelGroup(this, actionParam);
|
||||
} else if ((itemAction != this->heldItemAction) ||
|
||||
((this->heldActor == NULL) && (Player_ActionToExplosive(this, itemAction) >= 0))) {
|
||||
this->nextModelGroup = Player_ActionToModelGroup(this, itemAction);
|
||||
nextAnimType = gPlayerModelTypes[this->nextModelGroup][PLAYER_MODELGROUPENTRY_ANIM];
|
||||
|
||||
if ((this->heldItemActionParam >= 0) && (Player_ActionToMagicSpell(this, actionParam) < 0) &&
|
||||
if ((this->heldItemAction >= 0) && (Player_ActionToMagicSpell(this, itemAction) < 0) &&
|
||||
(item != this->heldItemId) &&
|
||||
(D_80854164[gPlayerModelTypes[this->modelGroup][PLAYER_MODELGROUPENTRY_ANIM]][nextAnimType] !=
|
||||
PLAYER_D_808540F4_0)) {
|
||||
|
@ -2972,7 +2970,7 @@ void func_80835F44(PlayState* play, Player* this, s32 item) {
|
|||
} else {
|
||||
func_80835EFC(this);
|
||||
func_808323B4(play, this);
|
||||
func_80833664(play, this, actionParam);
|
||||
func_80833664(play, this, itemAction);
|
||||
}
|
||||
} else {
|
||||
D_80853614 = D_80853618 = true;
|
||||
|
@ -3021,8 +3019,7 @@ s32 func_808365C8(Player* this) {
|
|||
return (!(func_808458D0 == this->func_674) ||
|
||||
((this->stateFlags1 & PLAYER_STATE1_8) &&
|
||||
((this->heldItemId == ITEM_LAST_USED) || (this->heldItemId == ITEM_NONE)))) &&
|
||||
(!(func_80834A2C == this->func_82C) ||
|
||||
(Player_ItemToActionParam(this->heldItemId) == this->heldItemActionParam));
|
||||
(!(func_80834A2C == this->func_82C) || (Player_ItemToItemAction(this->heldItemId) == this->heldItemAction));
|
||||
}
|
||||
|
||||
s32 func_80836670(Player* this, PlayState* play) {
|
||||
|
@ -3175,7 +3172,7 @@ void func_80836BEC(Player* this, PlayState* play) {
|
|||
if (cond || (this->unk_66C != 0) || (this->stateFlags1 & (PLAYER_STATE1_12 | PLAYER_STATE1_25))) {
|
||||
if (!cond) {
|
||||
if (!(this->stateFlags1 & PLAYER_STATE1_25) &&
|
||||
((this->heldItemActionParam != PLAYER_AP_FISHING_POLE) || (this->unk_860 == 0)) &&
|
||||
((this->heldItemAction != PLAYER_IA_FISHING_POLE) || (this->unk_860 == 0)) &&
|
||||
CHECK_BTN_ALL(sControlInput->press.button, BTN_Z)) {
|
||||
|
||||
if (this->actor.category == ACTORCAT_PLAYER) {
|
||||
|
@ -3407,7 +3404,7 @@ s32 func_808375D8(Player* this) {
|
|||
s8 temp2;
|
||||
s32 i;
|
||||
|
||||
if ((this->heldItemActionParam == PLAYER_AP_STICK) || Player_HoldsBrokenKnife(this)) {
|
||||
if ((this->heldItemAction == PLAYER_IA_STICK) || Player_HoldsBrokenKnife(this)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -3473,7 +3470,7 @@ s32 func_80837818(Player* this) {
|
|||
s32 sp1C = this->unk_84B[this->unk_846];
|
||||
s32 sp18;
|
||||
|
||||
if (this->heldItemActionParam == PLAYER_AP_HAMMER) {
|
||||
if (this->heldItemAction == PLAYER_IA_HAMMER) {
|
||||
if (sp1C < 0) {
|
||||
sp1C = 0;
|
||||
}
|
||||
|
@ -3498,7 +3495,7 @@ s32 func_80837818(Player* this) {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (this->heldItemActionParam == PLAYER_AP_STICK) {
|
||||
if (this->heldItemAction == PLAYER_IA_STICK) {
|
||||
sp18 = PLAYER_MWA_FORWARD_SLASH_1H;
|
||||
}
|
||||
}
|
||||
|
@ -4954,7 +4951,7 @@ s32 func_8083B040(Player* this, PlayState* play) {
|
|||
|
||||
if (!func_8083ADD4(play, this)) {
|
||||
if (this->unk_6AD == 4) {
|
||||
sp2C = Player_ActionToMagicSpell(this, this->itemActionParam);
|
||||
sp2C = Player_ActionToMagicSpell(this, this->itemAction);
|
||||
if (sp2C >= 0) {
|
||||
if ((sp2C != 3) || (gSaveContext.respawn[RESPAWN_MODE_TOP].data <= 0)) {
|
||||
func_8083AF44(play, this, sp2C);
|
||||
|
@ -4969,13 +4966,13 @@ s32 func_8083B040(Player* this, PlayState* play) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
sp2C = this->itemActionParam - PLAYER_AP_LETTER_ZELDA;
|
||||
sp2C = this->itemAction - PLAYER_IA_LETTER_ZELDA;
|
||||
if ((sp2C >= 0) ||
|
||||
(sp28 = Player_ActionToBottle(this, this->itemActionParam) - 1,
|
||||
(sp28 = Player_ActionToBottle(this, this->itemAction) - 1,
|
||||
((sp28 >= 0) && (sp28 < 6) &&
|
||||
((this->itemActionParam > PLAYER_AP_BOTTLE_POE) ||
|
||||
((this->itemAction > PLAYER_IA_BOTTLE_POE) ||
|
||||
((this->targetActor != NULL) &&
|
||||
(((this->itemActionParam == PLAYER_AP_BOTTLE_POE) && (this->exchangeItemId == EXCH_ITEM_POE)) ||
|
||||
(((this->itemAction == PLAYER_IA_BOTTLE_POE) && (this->exchangeItemId == EXCH_ITEM_POE)) ||
|
||||
(this->exchangeItemId == EXCH_ITEM_BLUE_FIRE))))))) {
|
||||
|
||||
if ((play->actorCtx.titleCtx.delayTimer == 0) && (play->actorCtx.titleCtx.alpha == 0)) {
|
||||
|
@ -4999,10 +4996,10 @@ s32 func_8083B040(Player* this, PlayState* play) {
|
|||
if ((targetActor != NULL) &&
|
||||
((this->exchangeItemId == sp2C) || (this->exchangeItemId == EXCH_ITEM_BLUE_FIRE) ||
|
||||
((this->exchangeItemId == EXCH_ITEM_POE) &&
|
||||
(this->itemActionParam == PLAYER_AP_BOTTLE_BIG_POE)) ||
|
||||
(this->itemAction == PLAYER_IA_BOTTLE_BIG_POE)) ||
|
||||
((this->exchangeItemId == EXCH_ITEM_BEAN) &&
|
||||
(this->itemActionParam == PLAYER_AP_BOTTLE_BUG))) &&
|
||||
((this->exchangeItemId != EXCH_ITEM_BEAN) || (this->itemActionParam == PLAYER_AP_BEAN))) {
|
||||
(this->itemAction == PLAYER_IA_BOTTLE_BUG))) &&
|
||||
((this->exchangeItemId != EXCH_ITEM_BEAN) || (this->itemAction == PLAYER_IA_BEAN))) {
|
||||
if (this->exchangeItemId == EXCH_ITEM_BEAN) {
|
||||
Inventory_ChangeAmmo(ITEM_BEAN, -1);
|
||||
func_80835DE4(play, this, func_8084279C, 0);
|
||||
|
@ -5036,7 +5033,7 @@ s32 func_8083B040(Player* this, PlayState* play) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
sp2C = Player_ActionToBottle(this, this->itemActionParam);
|
||||
sp2C = Player_ActionToBottle(this, this->itemAction);
|
||||
if (sp2C >= 0) {
|
||||
if (sp2C == 0xC) {
|
||||
func_80835DE4(play, this, func_8084EED8, 0);
|
||||
|
@ -5359,7 +5356,7 @@ s32 func_8083C1DC(Player* this, PlayState* play) {
|
|||
if (func_8083BC7C(this, play)) {
|
||||
return 1;
|
||||
}
|
||||
if ((this->unk_837 == 0) && (this->heldItemActionParam >= PLAYER_AP_SWORD_MASTER)) {
|
||||
if ((this->unk_837 == 0) && (this->heldItemAction >= PLAYER_IA_SWORD_MASTER)) {
|
||||
func_80835F44(play, this, ITEM_NONE);
|
||||
} else {
|
||||
this->stateFlags2 ^= PLAYER_STATE2_20;
|
||||
|
@ -5440,8 +5437,8 @@ void func_8083C50C(Player* this) {
|
|||
s32 func_8083C544(Player* this, PlayState* play) {
|
||||
if (CHECK_BTN_ALL(sControlInput->cur.button, BTN_B)) {
|
||||
if (!(this->stateFlags1 & PLAYER_STATE1_22) && (Player_GetMeleeWeaponHeld(this) != 0) && (this->unk_844 == 1) &&
|
||||
(this->heldItemActionParam != PLAYER_AP_STICK)) {
|
||||
if ((this->heldItemActionParam != PLAYER_AP_SWORD_BGS) || (gSaveContext.swordHealth > 0.0f)) {
|
||||
(this->heldItemAction != PLAYER_IA_STICK)) {
|
||||
if ((this->heldItemAction != PLAYER_IA_SWORD_BGS) || (gSaveContext.swordHealth > 0.0f)) {
|
||||
func_808377DC(play, this);
|
||||
return 1;
|
||||
}
|
||||
|
@ -5488,7 +5485,7 @@ s32 func_8083C6B8(PlayState* play, Player* this) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
if (this->heldItemActionParam == PLAYER_AP_FISHING_POLE) {
|
||||
if (this->heldItemAction == PLAYER_IA_FISHING_POLE) {
|
||||
sp24 = this->actor.world.pos;
|
||||
sp24.y += 50.0f;
|
||||
|
||||
|
@ -6221,16 +6218,16 @@ s32 func_8083E5A8(Player* this, PlayState* play) {
|
|||
|
||||
if ((this->heldActor == NULL) || Player_HoldsHookshot(this)) {
|
||||
if ((interactedActor->id == ACTOR_BG_TOKI_SWD) && LINK_IS_ADULT) {
|
||||
s32 sp24 = this->itemActionParam;
|
||||
s32 sp24 = this->itemAction;
|
||||
|
||||
this->itemActionParam = PLAYER_AP_NONE;
|
||||
this->itemAction = PLAYER_IA_NONE;
|
||||
this->modelAnimType = PLAYER_ANIMTYPE_0;
|
||||
this->heldItemActionParam = this->itemActionParam;
|
||||
this->heldItemAction = this->itemAction;
|
||||
func_80836898(play, this, func_8083A0F4);
|
||||
|
||||
if (sp24 == PLAYER_AP_SWORD_MASTER) {
|
||||
this->nextModelGroup = Player_ActionToModelGroup(this, PLAYER_AP_LAST_USED);
|
||||
func_8083399C(play, this, PLAYER_AP_LAST_USED);
|
||||
if (sp24 == PLAYER_IA_SWORD_MASTER) {
|
||||
this->nextModelGroup = Player_ActionToModelGroup(this, PLAYER_IA_LAST_USED);
|
||||
func_8083399C(play, this, PLAYER_IA_LAST_USED);
|
||||
} else {
|
||||
func_80835F44(play, this, ITEM_LAST_USED);
|
||||
}
|
||||
|
@ -7714,7 +7711,7 @@ void func_80842A88(PlayState* play, Player* this) {
|
|||
}
|
||||
|
||||
s32 func_80842AC4(PlayState* play, Player* this) {
|
||||
if ((this->heldItemActionParam == PLAYER_AP_STICK) && (this->unk_85C > 0.5f)) {
|
||||
if ((this->heldItemAction == PLAYER_IA_STICK) && (this->unk_85C > 0.5f)) {
|
||||
if (AMMO(ITEM_STICK) != 0) {
|
||||
EffectSsStick_Spawn(play, &this->bodyPartsPos[PLAYER_BODYPART_R_HAND], this->actor.shape.rot.y + 0x8000);
|
||||
this->unk_85C = 0.5f;
|
||||
|
@ -7729,7 +7726,7 @@ s32 func_80842AC4(PlayState* play, Player* this) {
|
|||
}
|
||||
|
||||
s32 func_80842B7C(PlayState* play, Player* this) {
|
||||
if (this->heldItemActionParam == PLAYER_AP_SWORD_BGS) {
|
||||
if (this->heldItemAction == PLAYER_IA_SWORD_BGS) {
|
||||
if (!gSaveContext.bgsFlag && (gSaveContext.swordHealth > 0.0f)) {
|
||||
if ((gSaveContext.swordHealth -= 1.0f) <= 0.0f) {
|
||||
EffectSsStick_Spawn(play, &this->bodyPartsPos[PLAYER_BODYPART_R_HAND],
|
||||
|
@ -7811,7 +7808,7 @@ s32 func_80842DF4(PlayState* play, Player* this) {
|
|||
(SurfaceType_GetFloorType(&play->colCtx, sp78, sp74) != FLOOR_TYPE_6) &&
|
||||
(func_8002F9EC(play, &this->actor, sp78, sp74, &sp5C) == 0)) {
|
||||
|
||||
if (this->heldItemActionParam == PLAYER_AP_HAMMER) {
|
||||
if (this->heldItemAction == PLAYER_IA_HAMMER) {
|
||||
func_80832630(play);
|
||||
func_80842A28(play, this);
|
||||
func_80842D20(play, this);
|
||||
|
@ -7856,7 +7853,7 @@ s32 func_80842DF4(PlayState* play, Player* this) {
|
|||
}
|
||||
}
|
||||
|
||||
if ((func_80842AC4(play, this) == 0) && (this->heldItemActionParam != PLAYER_AP_HAMMER)) {
|
||||
if ((func_80842AC4(play, this) == 0) && (this->heldItemAction != PLAYER_IA_HAMMER)) {
|
||||
func_80842B7C(play, this);
|
||||
|
||||
if (this->actor.colChkInfo.atHitEffect == 1) {
|
||||
|
@ -7948,7 +7945,7 @@ void func_80843188(Player* this, PlayState* play) {
|
|||
ANIMMODE_ONCE, 0.0f);
|
||||
func_80832F54(play, this, 4);
|
||||
} else {
|
||||
if (this->itemActionParam < 0) {
|
||||
if (this->itemAction < 0) {
|
||||
func_8008EC70(this);
|
||||
}
|
||||
func_8083A098(this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_22, this->modelAnimType), play);
|
||||
|
@ -9220,15 +9217,15 @@ static u8 D_808546F0[] = { ITEM_SWORD_MASTER, ITEM_SWORD_KOKIRI };
|
|||
|
||||
void func_80846720(PlayState* play, Player* this, s32 arg2) {
|
||||
s32 item = D_808546F0[(void)0, gSaveContext.linkAge];
|
||||
s32 actionParam = sItemActionParams[item];
|
||||
s32 itemAction = sItemActions[item];
|
||||
|
||||
func_80835EFC(this);
|
||||
func_808323B4(play, this);
|
||||
|
||||
this->heldItemId = item;
|
||||
this->nextModelGroup = Player_ActionToModelGroup(this, actionParam);
|
||||
this->nextModelGroup = Player_ActionToModelGroup(this, itemAction);
|
||||
|
||||
func_8083399C(play, this, actionParam);
|
||||
func_8083399C(play, this, itemAction);
|
||||
func_80834644(play, this);
|
||||
|
||||
if (arg2 != 0) {
|
||||
|
@ -9358,7 +9355,7 @@ void Player_Init(Actor* thisx, PlayState* play2) {
|
|||
|
||||
thisx->room = -1;
|
||||
this->ageProperties = &sAgeProperties[gSaveContext.linkAge];
|
||||
this->itemActionParam = this->heldItemActionParam = -1;
|
||||
this->itemAction = this->heldItemAction = -1;
|
||||
this->heldItemId = ITEM_NONE;
|
||||
|
||||
func_80835F44(play, this, ITEM_NONE);
|
||||
|
@ -9525,7 +9522,7 @@ void func_808473D4(PlayState* play, Player* this) {
|
|||
if (!Player_InBlockingCsMode(play, this)) {
|
||||
if (this->stateFlags1 & PLAYER_STATE1_20) {
|
||||
doAction = DO_ACTION_RETURN;
|
||||
} else if ((this->heldItemActionParam == PLAYER_AP_FISHING_POLE) && (this->unk_860 != 0)) {
|
||||
} else if ((this->heldItemAction == PLAYER_IA_FISHING_POLE) && (this->unk_860 != 0)) {
|
||||
if (this->unk_860 == 2) {
|
||||
doAction = DO_ACTION_REEL;
|
||||
}
|
||||
|
@ -9601,7 +9598,7 @@ void func_808473D4(PlayState* play, Player* this) {
|
|||
} else if ((play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_2) && func_80833BCC(this) &&
|
||||
(sp20 > 0)) {
|
||||
doAction = DO_ACTION_JUMP;
|
||||
} else if ((this->heldItemActionParam >= PLAYER_AP_SWORD_MASTER) ||
|
||||
} else if ((this->heldItemAction >= PLAYER_IA_SWORD_MASTER) ||
|
||||
((this->stateFlags2 & PLAYER_STATE2_20) &&
|
||||
(play->actorCtx.targetCtx.arrowPointedActor == NULL))) {
|
||||
doAction = DO_ACTION_PUTAWAY;
|
||||
|
@ -10220,9 +10217,9 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) {
|
|||
func_808473D4(play, this);
|
||||
func_80836BEC(this, play);
|
||||
|
||||
if ((this->heldItemActionParam == PLAYER_AP_STICK) && (this->unk_860 != 0)) {
|
||||
if ((this->heldItemAction == PLAYER_IA_STICK) && (this->unk_860 != 0)) {
|
||||
func_80848A04(play, this);
|
||||
} else if ((this->heldItemActionParam == PLAYER_AP_FISHING_POLE) && (this->unk_860 < 0)) {
|
||||
} else if ((this->heldItemAction == PLAYER_IA_FISHING_POLE) && (this->unk_860 < 0)) {
|
||||
this->unk_860++;
|
||||
}
|
||||
|
||||
|
@ -11002,8 +10999,8 @@ s32 func_8084B3CC(PlayState* play, Player* this) {
|
|||
}
|
||||
|
||||
void func_8084B498(Player* this) {
|
||||
this->itemActionParam =
|
||||
(INV_CONTENT(ITEM_OCARINA_FAIRY) == ITEM_OCARINA_FAIRY) ? PLAYER_AP_OCARINA_FAIRY : PLAYER_AP_OCARINA_TIME;
|
||||
this->itemAction =
|
||||
(INV_CONTENT(ITEM_OCARINA_FAIRY) == ITEM_OCARINA_FAIRY) ? PLAYER_IA_OCARINA_FAIRY : PLAYER_IA_OCARINA_TIME;
|
||||
}
|
||||
|
||||
s32 func_8084B4D4(PlayState* play, Player* this) {
|
||||
|
@ -11056,8 +11053,7 @@ void func_8084B530(Player* this, PlayState* play) {
|
|||
} else if (!func_8008E9C4(this) && LinkAnimation_Update(play, &this->skelAnime)) {
|
||||
if (this->skelAnime.moveFlags != 0) {
|
||||
func_80832DBC(this);
|
||||
if ((this->targetActor->category == ACTORCAT_NPC) &&
|
||||
(this->heldItemActionParam != PLAYER_AP_FISHING_POLE)) {
|
||||
if ((this->targetActor->category == ACTORCAT_NPC) && (this->heldItemAction != PLAYER_IA_FISHING_POLE)) {
|
||||
func_808322D0(play, this, &gPlayerAnim_link_normal_talk_free);
|
||||
} else {
|
||||
func_80832284(play, this, func_80833338(this));
|
||||
|
@ -12395,7 +12391,7 @@ static u8 D_808549FC[] = {
|
|||
void func_8084EAC0(Player* this, PlayState* play) {
|
||||
if (LinkAnimation_Update(play, &this->skelAnime)) {
|
||||
if (this->unk_850 == 0) {
|
||||
if (this->itemActionParam == PLAYER_AP_BOTTLE_POE) {
|
||||
if (this->itemAction == PLAYER_IA_BOTTLE_POE) {
|
||||
s32 rand = Rand_S16Offset(-1, 3);
|
||||
|
||||
if (rand == 0) {
|
||||
|
@ -12412,7 +12408,7 @@ void func_8084EAC0(Player* this, PlayState* play) {
|
|||
gSaveContext.healthAccumulator = rand * 0x10;
|
||||
}
|
||||
} else {
|
||||
s32 sp28 = D_808549FC[this->itemActionParam - PLAYER_AP_BOTTLE_POTION_RED];
|
||||
s32 sp28 = D_808549FC[this->itemAction - PLAYER_IA_BOTTLE_POTION_RED];
|
||||
|
||||
if (sp28 & 1) {
|
||||
gSaveContext.healthAccumulator = 0x140;
|
||||
|
@ -12438,7 +12434,7 @@ void func_8084EAC0(Player* this, PlayState* play) {
|
|||
if ((gSaveContext.healthAccumulator == 0) && (gSaveContext.magicState != MAGIC_STATE_FILL)) {
|
||||
func_80832B78(play, this, &gPlayerAnim_link_bottle_drink_demo_end);
|
||||
this->unk_850 = 2;
|
||||
Player_UpdateBottleHeld(play, this, ITEM_BOTTLE, PLAYER_AP_BOTTLE);
|
||||
Player_UpdateBottleHeld(play, this, ITEM_BOTTLE, PLAYER_IA_BOTTLE);
|
||||
}
|
||||
func_80832698(this, NA_SE_VO_LI_DRINK - SFX_FLAG);
|
||||
} else if ((this->unk_850 == 2) && LinkAnimation_OnFrame(&this->skelAnime, 29.0f)) {
|
||||
|
@ -12447,10 +12443,10 @@ void func_8084EAC0(Player* this, PlayState* play) {
|
|||
}
|
||||
|
||||
static BottleCatchInfo sBottleCatchInfos[] = {
|
||||
{ ACTOR_EN_ELF, ITEM_FAIRY, PLAYER_AP_BOTTLE_FAIRY, 0x46 },
|
||||
{ ACTOR_EN_FISH, ITEM_FISH, PLAYER_AP_BOTTLE_FISH, 0x47 },
|
||||
{ ACTOR_EN_ICE_HONO, ITEM_BLUE_FIRE, PLAYER_AP_BOTTLE_FIRE, 0x5D },
|
||||
{ ACTOR_EN_INSECT, ITEM_BUG, PLAYER_AP_BOTTLE_BUG, 0x7A },
|
||||
{ ACTOR_EN_ELF, ITEM_FAIRY, PLAYER_IA_BOTTLE_FAIRY, 0x46 },
|
||||
{ ACTOR_EN_FISH, ITEM_FISH, PLAYER_IA_BOTTLE_FISH, 0x47 },
|
||||
{ ACTOR_EN_ICE_HONO, ITEM_BLUE_FIRE, PLAYER_IA_BOTTLE_FIRE, 0x5D },
|
||||
{ ACTOR_EN_INSECT, ITEM_BUG, PLAYER_IA_BOTTLE_BUG, 0x7A },
|
||||
};
|
||||
|
||||
void func_8084ECA4(Player* this, PlayState* play) {
|
||||
|
@ -12500,7 +12496,7 @@ void func_8084ECA4(Player* this, PlayState* play) {
|
|||
this->unk_850 = 0;
|
||||
this->stateFlags1 |= PLAYER_STATE1_28 | PLAYER_STATE1_29;
|
||||
this->interactRangeActor->parent = &this->actor;
|
||||
Player_UpdateBottleHeld(play, this, catchInfo->itemId, ABS(catchInfo->actionParam));
|
||||
Player_UpdateBottleHeld(play, this, catchInfo->itemId, ABS(catchInfo->itemAction));
|
||||
func_808322D0(play, this, sp24->unk_04);
|
||||
func_80835EA4(play, 4);
|
||||
}
|
||||
|
@ -12529,7 +12525,7 @@ void func_8084EED8(Player* this, PlayState* play) {
|
|||
|
||||
if (LinkAnimation_OnFrame(&this->skelAnime, 37.0f)) {
|
||||
Player_SpawnFairy(play, this, &this->leftHandPos, &D_80854A1C, FAIRY_REVIVE_BOTTLE);
|
||||
Player_UpdateBottleHeld(play, this, ITEM_BOTTLE, PLAYER_AP_BOTTLE);
|
||||
Player_UpdateBottleHeld(play, this, ITEM_BOTTLE, PLAYER_IA_BOTTLE);
|
||||
func_8002F7DC(&this->actor, NA_SE_EV_BOTTLE_CAP_OPEN);
|
||||
func_8002F7DC(&this->actor, NA_SE_EV_FIATY_HEAL - SFX_FLAG);
|
||||
} else if (LinkAnimation_OnFrame(&this->skelAnime, 47.0f)) {
|
||||
|
@ -12558,14 +12554,14 @@ void func_8084EFC0(Player* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (LinkAnimation_OnFrame(&this->skelAnime, 76.0f)) {
|
||||
BottleDropInfo* dropInfo = &D_80854A28[this->itemActionParam - PLAYER_AP_BOTTLE_FISH];
|
||||
BottleDropInfo* dropInfo = &D_80854A28[this->itemAction - PLAYER_IA_BOTTLE_FISH];
|
||||
|
||||
Actor_Spawn(&play->actorCtx, play, dropInfo->actorId,
|
||||
(Math_SinS(this->actor.shape.rot.y) * 5.0f) + this->leftHandPos.x, this->leftHandPos.y,
|
||||
(Math_CosS(this->actor.shape.rot.y) * 5.0f) + this->leftHandPos.z, 0x4000, this->actor.shape.rot.y,
|
||||
0, dropInfo->actorParams);
|
||||
|
||||
Player_UpdateBottleHeld(play, this, ITEM_BOTTLE, PLAYER_AP_BOTTLE);
|
||||
Player_UpdateBottleHeld(play, this, ITEM_BOTTLE, PLAYER_IA_BOTTLE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -12594,7 +12590,7 @@ void func_8084F104(Player* this, PlayState* play) {
|
|||
} else {
|
||||
GetItemEntry* giEntry = &sGetItemTable[D_80854528[this->exchangeItemId - 1] - 1];
|
||||
|
||||
if (this->itemActionParam >= PLAYER_AP_LETTER_ZELDA) {
|
||||
if (this->itemAction >= PLAYER_IA_LETTER_ZELDA) {
|
||||
if (giEntry->gi >= 0) {
|
||||
this->unk_862 = giEntry->gi;
|
||||
} else {
|
||||
|
@ -12605,7 +12601,7 @@ void func_8084F104(Player* this, PlayState* play) {
|
|||
if (this->unk_850 == 0) {
|
||||
Message_StartTextbox(play, this->actor.textId, &this->actor);
|
||||
|
||||
if ((this->itemActionParam == PLAYER_AP_CHICKEN) || (this->itemActionParam == PLAYER_AP_POCKET_CUCCO)) {
|
||||
if ((this->itemAction == PLAYER_IA_CHICKEN) || (this->itemAction == PLAYER_IA_POCKET_CUCCO)) {
|
||||
func_8002F7DC(&this->actor, NA_SE_EV_CHICKEN_CRY_M);
|
||||
}
|
||||
|
||||
|
@ -13013,7 +13009,7 @@ void func_808502D0(Player* this, PlayState* play) {
|
|||
if (!func_80842DF4(play, this)) {
|
||||
func_8084285C(this, 0.0f, sp44->unk_0C, sp44->unk_0D);
|
||||
|
||||
if ((this->stateFlags2 & PLAYER_STATE2_30) && (this->heldItemActionParam != PLAYER_AP_HAMMER) &&
|
||||
if ((this->stateFlags2 & PLAYER_STATE2_30) && (this->heldItemAction != PLAYER_IA_HAMMER) &&
|
||||
LinkAnimation_OnFrame(&this->skelAnime, 0.0f)) {
|
||||
this->linearVelocity = 15.0f;
|
||||
this->stateFlags2 &= ~PLAYER_STATE2_30;
|
||||
|
@ -13050,7 +13046,7 @@ void func_808502D0(Player* this, PlayState* play) {
|
|||
this->skelAnime.moveFlags = sp43;
|
||||
this->stateFlags3 |= PLAYER_STATE3_3;
|
||||
}
|
||||
} else if (this->heldItemActionParam == PLAYER_AP_HAMMER) {
|
||||
} else if (this->heldItemAction == PLAYER_IA_HAMMER) {
|
||||
if ((this->meleeWeaponAnimation == PLAYER_MWA_HAMMER_FORWARD) ||
|
||||
(this->meleeWeaponAnimation == PLAYER_MWA_JUMPSLASH_FINISH)) {
|
||||
static Vec3f zeroVec = { 0.0f, 0.0f, 0.0f };
|
||||
|
@ -13180,7 +13176,7 @@ static struct_80832924 D_80854A8C[][2] = {
|
|||
void func_808507F4(Player* this, PlayState* play) {
|
||||
if (LinkAnimation_Update(play, &this->skelAnime)) {
|
||||
if (this->unk_84F < 0) {
|
||||
if ((this->itemActionParam == PLAYER_AP_NAYRUS_LOVE) || (gSaveContext.magicState == MAGIC_STATE_IDLE)) {
|
||||
if ((this->itemAction == PLAYER_IA_NAYRUS_LOVE) || (gSaveContext.magicState == MAGIC_STATE_IDLE)) {
|
||||
func_80839FFC(this, play);
|
||||
func_8005B1A4(Play_GetCamera(play, CAM_ID_MAIN));
|
||||
}
|
||||
|
@ -13936,7 +13932,7 @@ void func_80851CA4(PlayState* play, Player* this, CsCmdActorAction* arg2) {
|
|||
void func_80851D2C(PlayState* play, Player* this, CsCmdActorAction* arg2) {
|
||||
func_80850F1C(play, this, &gPlayerAnim_link_normal_okarina_start);
|
||||
func_8084B498(this);
|
||||
Player_SetModels(this, Player_ActionToModelGroup(this, this->itemActionParam));
|
||||
Player_SetModels(this, Player_ActionToModelGroup(this, this->itemAction));
|
||||
}
|
||||
|
||||
static struct_80832924 D_808551B8[] = {
|
||||
|
@ -14190,9 +14186,9 @@ void func_80852648(PlayState* play, Player* this, CsCmdActorAction* arg2) {
|
|||
LinkAnimation_Update(play, &this->skelAnime);
|
||||
|
||||
if (LinkAnimation_OnFrame(&this->skelAnime, 10.0f)) {
|
||||
this->heldItemActionParam = this->itemActionParam = PLAYER_AP_NONE;
|
||||
this->heldItemAction = this->itemAction = PLAYER_IA_NONE;
|
||||
this->heldItemId = ITEM_NONE;
|
||||
this->modelGroup = this->nextModelGroup = Player_ActionToModelGroup(this, PLAYER_AP_NONE);
|
||||
this->modelGroup = this->nextModelGroup = Player_ActionToModelGroup(this, PLAYER_IA_NONE);
|
||||
this->leftHandDLists = gPlayerLeftHandOpenDLs;
|
||||
Inventory_ChangeEquipment(EQUIP_TYPE_SWORD, EQUIP_VALUE_SWORD_MASTER);
|
||||
gSaveContext.equips.buttonItems[0] = ITEM_SWORD_MASTER;
|
||||
|
@ -14253,7 +14249,7 @@ void func_808528C8(PlayState* play, Player* this, CsCmdActorAction* arg2) {
|
|||
func_8084285C(this, 0.0f, 99.0f, this->skelAnime.endFrame - 8.0f);
|
||||
}
|
||||
|
||||
if (this->heldItemActionParam != PLAYER_AP_SWORD_MASTER) {
|
||||
if (this->heldItemAction != PLAYER_IA_SWORD_MASTER) {
|
||||
func_80846720(play, this, 1);
|
||||
}
|
||||
}
|
||||
|
@ -14377,7 +14373,7 @@ void func_80852E14(Player* this, PlayState* play) {
|
|||
s32 Player_IsDroppingFish(PlayState* play) {
|
||||
Player* this = GET_PLAYER(play);
|
||||
|
||||
return (func_8084EFC0 == this->func_674) && (this->itemActionParam == PLAYER_AP_BOTTLE_FISH);
|
||||
return (func_8084EFC0 == this->func_674) && (this->itemAction == PLAYER_IA_BOTTLE_FISH);
|
||||
}
|
||||
|
||||
s32 Player_StartFishing(PlayState* play) {
|
||||
|
@ -14472,7 +14468,7 @@ void func_80853148(PlayState* play, Actor* actor) {
|
|||
if (func_808332B8(this)) {
|
||||
func_80836898(play, this, func_8083A2F8);
|
||||
func_80832C6C(play, this, &gPlayerAnim_link_swimer_swim_wait);
|
||||
} else if ((actor->category != ACTORCAT_NPC) || (this->heldItemActionParam == PLAYER_AP_FISHING_POLE)) {
|
||||
} else if ((actor->category != ACTORCAT_NPC) || (this->heldItemAction == PLAYER_IA_FISHING_POLE)) {
|
||||
func_8083A2F8(play, this);
|
||||
|
||||
if (!func_8008E9C4(this)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue