Player Docs: Init Action Cleanup (#1743)

* init action cleanup

* boomerang

* revert name
This commit is contained in:
engineer124 2024-11-20 10:15:28 +11:00 committed by GitHub
parent 00bafced8e
commit 70e97dc285
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 110 additions and 110 deletions

View File

@ -230,12 +230,12 @@ s32 Player_UpperAction_14(Player* this, PlayState* play);
s32 Player_UpperAction_15(Player* this, PlayState* play);
s32 Player_UpperAction_16(Player* this, PlayState* play);
void Player_InitItemAction_DoNothing(PlayState* play, Player* this);
void Player_InitItemAction_DekuStick(PlayState* play, Player* this);
void Player_InitItemAction_2(PlayState* play, Player* this);
void Player_InitItemAction_SpawnExplosive(PlayState* play, Player* this);
void Player_InitItemAction_SpawnHookshot(PlayState* play, Player* this);
void Player_InitItemAction_5(PlayState* play, Player* this);
void Player_InitDefaultIA(PlayState* play, Player* this);
void Player_InitDekuStickIA(PlayState* play, Player* this);
void Player_InitBowOrDekuNutIA(PlayState* play, Player* this);
void Player_InitExplosiveIA(PlayState* play, Player* this);
void Player_InitHookshotIA(PlayState* play, Player* this);
void Player_InitZoraBoomerangIA(PlayState* play, Player* this);
s32 Player_ActionHandler_0(Player* this, PlayState* play);
s32 Player_ActionHandler_1(Player* this, PlayState* play);
@ -3122,7 +3122,7 @@ PlayerItemAction Player_ItemToItemAction(Player* this, ItemId item) {
}
}
PlayerUpperActionFunc sPlayerUpperActionUpdateFuncs[PLAYER_IA_MAX] = {
PlayerUpperActionFunc sItemActionUpdateFuncs[PLAYER_IA_MAX] = {
Player_UpperAction_0, // PLAYER_IA_NONE
Player_UpperAction_0, // PLAYER_IA_LAST_USED
Player_UpperAction_0, // PLAYER_IA_FISHING_ROD
@ -3208,103 +3208,103 @@ PlayerUpperActionFunc sPlayerUpperActionUpdateFuncs[PLAYER_IA_MAX] = {
Player_UpperAction_0, // PLAYER_IA_LENS_OF_TRUTH
};
typedef void (*PlayerInitItemActionFunc)(PlayState*, Player*);
typedef void (*PlayerItemActionInitFunc)(PlayState*, Player*);
PlayerInitItemActionFunc sPlayerItemActionInitFuncs[PLAYER_IA_MAX] = {
Player_InitItemAction_DoNothing, // PLAYER_IA_NONE
Player_InitItemAction_DoNothing, // PLAYER_IA_LAST_USED
Player_InitItemAction_DoNothing, // PLAYER_IA_FISHING_ROD
Player_InitItemAction_DoNothing, // PLAYER_IA_SWORD_KOKIRI
Player_InitItemAction_DoNothing, // PLAYER_IA_SWORD_RAZOR
Player_InitItemAction_DoNothing, // PLAYER_IA_SWORD_GILDED
Player_InitItemAction_DoNothing, // PLAYER_IA_SWORD_TWO_HANDED
Player_InitItemAction_DekuStick, // PLAYER_IA_DEKU_STICK
Player_InitItemAction_5, // PLAYER_IA_ZORA_BOOMERANG
Player_InitItemAction_2, // PLAYER_IA_BOW
Player_InitItemAction_2, // PLAYER_IA_BOW_FIRE
Player_InitItemAction_2, // PLAYER_IA_BOW_ICE
Player_InitItemAction_2, // PLAYER_IA_BOW_LIGHT
Player_InitItemAction_SpawnHookshot, // PLAYER_IA_HOOKSHOT
Player_InitItemAction_SpawnExplosive, // PLAYER_IA_BOMB
Player_InitItemAction_SpawnExplosive, // PLAYER_IA_POWDER_KEG
Player_InitItemAction_SpawnExplosive, // PLAYER_IA_BOMBCHU
Player_InitItemAction_5, // PLAYER_IA_11
Player_InitItemAction_2, // PLAYER_IA_DEKU_NUT
Player_InitItemAction_DoNothing, // PLAYER_IA_PICTOGRAPH_BOX
Player_InitItemAction_DoNothing, // PLAYER_IA_OCARINA
Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_EMPTY
Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_FISH
Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_SPRING_WATER
Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_HOT_SPRING_WATER
Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_ZORA_EGG
Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_DEKU_PRINCESS
Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_GOLD_DUST
Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_1C
Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_SEA_HORSE
Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_MUSHROOM
Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_HYLIAN_LOACH
Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_BUG
Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_POE
Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_BIG_POE
Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_POTION_RED
Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_POTION_BLUE
Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_POTION_GREEN
Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_MILK
Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_MILK_HALF
Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_CHATEAU
Player_InitItemAction_DoNothing, // PLAYER_IA_BOTTLE_FAIRY
Player_InitItemAction_DoNothing, // PLAYER_IA_MOONS_TEAR
Player_InitItemAction_DoNothing, // PLAYER_IA_DEED_LAND
Player_InitItemAction_DoNothing, // PLAYER_IA_ROOM_KEY
Player_InitItemAction_DoNothing, // PLAYER_IA_LETTER_TO_KAFEI
Player_InitItemAction_DoNothing, // PLAYER_IA_MAGIC_BEANS
Player_InitItemAction_DoNothing, // PLAYER_IA_DEED_SWAMP
Player_InitItemAction_DoNothing, // PLAYER_IA_DEED_MOUNTAIN
Player_InitItemAction_DoNothing, // PLAYER_IA_DEED_OCEAN
Player_InitItemAction_DoNothing, // PLAYER_IA_32
Player_InitItemAction_DoNothing, // PLAYER_IA_LETTER_MAMA
Player_InitItemAction_DoNothing, // PLAYER_IA_34
Player_InitItemAction_DoNothing, // PLAYER_IA_35
Player_InitItemAction_DoNothing, // PLAYER_IA_PENDANT_MEMORIES
Player_InitItemAction_DoNothing, // PLAYER_IA_37
Player_InitItemAction_DoNothing, // PLAYER_IA_38
Player_InitItemAction_DoNothing, // PLAYER_IA_39
Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_TRUTH
Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_KAFEIS_MASK
Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_ALL_NIGHT
Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_BUNNY
Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_KEATON
Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_GARO
Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_ROMANI
Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_CIRCUS_LEADER
Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_POSTMAN
Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_COUPLE
Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_GREAT_FAIRY
Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_GIBDO
Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_DON_GERO
Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_KAMARO
Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_CAPTAIN
Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_STONE
Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_BREMEN
Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_BLAST
Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_SCENTS
Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_GIANT
Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_FIERCE_DEITY
Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_GORON
Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_ZORA
Player_InitItemAction_DoNothing, // PLAYER_IA_MASK_DEKU
Player_InitItemAction_DoNothing, // PLAYER_IA_LENS_OF_TRUTH
PlayerItemActionInitFunc sItemActionInitFuncs[PLAYER_IA_MAX] = {
Player_InitDefaultIA, // PLAYER_IA_NONE
Player_InitDefaultIA, // PLAYER_IA_LAST_USED
Player_InitDefaultIA, // PLAYER_IA_FISHING_ROD
Player_InitDefaultIA, // PLAYER_IA_SWORD_KOKIRI
Player_InitDefaultIA, // PLAYER_IA_SWORD_RAZOR
Player_InitDefaultIA, // PLAYER_IA_SWORD_GILDED
Player_InitDefaultIA, // PLAYER_IA_SWORD_TWO_HANDED
Player_InitDekuStickIA, // PLAYER_IA_DEKU_STICK
Player_InitZoraBoomerangIA, // PLAYER_IA_ZORA_BOOMERANG
Player_InitBowOrDekuNutIA, // PLAYER_IA_BOW
Player_InitBowOrDekuNutIA, // PLAYER_IA_BOW_FIRE
Player_InitBowOrDekuNutIA, // PLAYER_IA_BOW_ICE
Player_InitBowOrDekuNutIA, // PLAYER_IA_BOW_LIGHT
Player_InitHookshotIA, // PLAYER_IA_HOOKSHOT
Player_InitExplosiveIA, // PLAYER_IA_BOMB
Player_InitExplosiveIA, // PLAYER_IA_POWDER_KEG
Player_InitExplosiveIA, // PLAYER_IA_BOMBCHU
Player_InitZoraBoomerangIA, // PLAYER_IA_11
Player_InitBowOrDekuNutIA, // PLAYER_IA_DEKU_NUT
Player_InitDefaultIA, // PLAYER_IA_PICTOGRAPH_BOX
Player_InitDefaultIA, // PLAYER_IA_OCARINA
Player_InitDefaultIA, // PLAYER_IA_BOTTLE_EMPTY
Player_InitDefaultIA, // PLAYER_IA_BOTTLE_FISH
Player_InitDefaultIA, // PLAYER_IA_BOTTLE_SPRING_WATER
Player_InitDefaultIA, // PLAYER_IA_BOTTLE_HOT_SPRING_WATER
Player_InitDefaultIA, // PLAYER_IA_BOTTLE_ZORA_EGG
Player_InitDefaultIA, // PLAYER_IA_BOTTLE_DEKU_PRINCESS
Player_InitDefaultIA, // PLAYER_IA_BOTTLE_GOLD_DUST
Player_InitDefaultIA, // PLAYER_IA_BOTTLE_1C
Player_InitDefaultIA, // PLAYER_IA_BOTTLE_SEA_HORSE
Player_InitDefaultIA, // PLAYER_IA_BOTTLE_MUSHROOM
Player_InitDefaultIA, // PLAYER_IA_BOTTLE_HYLIAN_LOACH
Player_InitDefaultIA, // PLAYER_IA_BOTTLE_BUG
Player_InitDefaultIA, // PLAYER_IA_BOTTLE_POE
Player_InitDefaultIA, // PLAYER_IA_BOTTLE_BIG_POE
Player_InitDefaultIA, // PLAYER_IA_BOTTLE_POTION_RED
Player_InitDefaultIA, // PLAYER_IA_BOTTLE_POTION_BLUE
Player_InitDefaultIA, // PLAYER_IA_BOTTLE_POTION_GREEN
Player_InitDefaultIA, // PLAYER_IA_BOTTLE_MILK
Player_InitDefaultIA, // PLAYER_IA_BOTTLE_MILK_HALF
Player_InitDefaultIA, // PLAYER_IA_BOTTLE_CHATEAU
Player_InitDefaultIA, // PLAYER_IA_BOTTLE_FAIRY
Player_InitDefaultIA, // PLAYER_IA_MOONS_TEAR
Player_InitDefaultIA, // PLAYER_IA_DEED_LAND
Player_InitDefaultIA, // PLAYER_IA_ROOM_KEY
Player_InitDefaultIA, // PLAYER_IA_LETTER_TO_KAFEI
Player_InitDefaultIA, // PLAYER_IA_MAGIC_BEANS
Player_InitDefaultIA, // PLAYER_IA_DEED_SWAMP
Player_InitDefaultIA, // PLAYER_IA_DEED_MOUNTAIN
Player_InitDefaultIA, // PLAYER_IA_DEED_OCEAN
Player_InitDefaultIA, // PLAYER_IA_32
Player_InitDefaultIA, // PLAYER_IA_LETTER_MAMA
Player_InitDefaultIA, // PLAYER_IA_34
Player_InitDefaultIA, // PLAYER_IA_35
Player_InitDefaultIA, // PLAYER_IA_PENDANT_MEMORIES
Player_InitDefaultIA, // PLAYER_IA_37
Player_InitDefaultIA, // PLAYER_IA_38
Player_InitDefaultIA, // PLAYER_IA_39
Player_InitDefaultIA, // PLAYER_IA_MASK_TRUTH
Player_InitDefaultIA, // PLAYER_IA_MASK_KAFEIS_MASK
Player_InitDefaultIA, // PLAYER_IA_MASK_ALL_NIGHT
Player_InitDefaultIA, // PLAYER_IA_MASK_BUNNY
Player_InitDefaultIA, // PLAYER_IA_MASK_KEATON
Player_InitDefaultIA, // PLAYER_IA_MASK_GARO
Player_InitDefaultIA, // PLAYER_IA_MASK_ROMANI
Player_InitDefaultIA, // PLAYER_IA_MASK_CIRCUS_LEADER
Player_InitDefaultIA, // PLAYER_IA_MASK_POSTMAN
Player_InitDefaultIA, // PLAYER_IA_MASK_COUPLE
Player_InitDefaultIA, // PLAYER_IA_MASK_GREAT_FAIRY
Player_InitDefaultIA, // PLAYER_IA_MASK_GIBDO
Player_InitDefaultIA, // PLAYER_IA_MASK_DON_GERO
Player_InitDefaultIA, // PLAYER_IA_MASK_KAMARO
Player_InitDefaultIA, // PLAYER_IA_MASK_CAPTAIN
Player_InitDefaultIA, // PLAYER_IA_MASK_STONE
Player_InitDefaultIA, // PLAYER_IA_MASK_BREMEN
Player_InitDefaultIA, // PLAYER_IA_MASK_BLAST
Player_InitDefaultIA, // PLAYER_IA_MASK_SCENTS
Player_InitDefaultIA, // PLAYER_IA_MASK_GIANT
Player_InitDefaultIA, // PLAYER_IA_MASK_FIERCE_DEITY
Player_InitDefaultIA, // PLAYER_IA_MASK_GORON
Player_InitDefaultIA, // PLAYER_IA_MASK_ZORA
Player_InitDefaultIA, // PLAYER_IA_MASK_DEKU
Player_InitDefaultIA, // PLAYER_IA_LENS_OF_TRUTH
};
void Player_InitItemAction_DoNothing(PlayState* play, Player* this) {
void Player_InitDefaultIA(PlayState* play, Player* this) {
}
void Player_InitItemAction_DekuStick(PlayState* play, Player* this) {
void Player_InitDekuStickIA(PlayState* play, Player* this) {
this->unk_B28 = 0;
this->unk_B0C = 1.0f;
}
void Player_InitItemAction_2(PlayState* play, Player* this) {
void Player_InitBowOrDekuNutIA(PlayState* play, Player* this) {
this->stateFlags1 |= PLAYER_STATE1_8;
if (this->heldItemAction == PLAYER_IA_DEKU_NUT) {
@ -3419,7 +3419,7 @@ ExplosiveInfo sPlayerExplosiveInfo[PLAYER_EXPLOSIVE_MAX] = {
{ ITEM_BOMBCHU, ACTOR_EN_BOM_CHU }, // PLAYER_EXPLOSIVE_BOMBCHU
};
void Player_InitItemAction_SpawnExplosive(PlayState* play, Player* this) {
void Player_InitExplosiveIA(PlayState* play, Player* this) {
PlayerExplosive explosiveType;
ExplosiveInfo* explosiveInfo;
Actor* explosiveActor;
@ -3460,7 +3460,7 @@ void Player_InitItemAction_SpawnExplosive(PlayState* play, Player* this) {
}
}
void Player_InitItemAction_SpawnHookshot(PlayState* play, Player* this) {
void Player_InitHookshotIA(PlayState* play, Player* this) {
ArmsHook* armsHook;
this->stateFlags1 |= PLAYER_STATE1_8;
@ -3480,7 +3480,7 @@ void Player_InitItemAction_SpawnHookshot(PlayState* play, Player* this) {
armsHook->unk_208 = this->transformation;
}
void Player_InitItemAction_5(PlayState* play, Player* this) {
void Player_InitZoraBoomerangIA(PlayState* play, Player* this) {
this->stateFlags1 |= PLAYER_STATE1_USING_ZORA_BOOMERANG;
}
@ -3494,7 +3494,7 @@ void Player_InitItemAction(PlayState* play, Player* this, PlayerItemAction itemA
this->unk_B0C = 0.0f;
this->unk_B28 = 0;
sPlayerItemActionInitFuncs[itemAction](play, this);
sItemActionInitFuncs[itemAction](play, this);
Player_SetModelGroup(this, this->modelGroup);
}
@ -4098,7 +4098,7 @@ void func_808309CC(PlayState* play, Player* this) {
Player_FinishItemChange(play, this);
}
Player_SetUpperAction(play, this, sPlayerUpperActionUpdateFuncs[this->heldItemAction]);
Player_SetUpperAction(play, this, sItemActionUpdateFuncs[this->heldItemAction]);
this->unk_ACC = 0;
this->idleType = PLAYER_IDLE_DEFAULT;
Player_DetachHeldActor(play, this);
@ -13731,7 +13731,7 @@ s32 Player_UpperAction_ChangeHeldItem(Player* this, PlayState* play) {
(sPlayerUseHeldItem = (sPlayerUseHeldItem || ((this->modelAnimType != PLAYER_ANIMTYPE_3) &&
(this->heldItemAction != PLAYER_IA_DEKU_STICK) &&
(play->bButtonAmmoPlusOne == 0)))))) {
Player_SetUpperAction(play, this, sPlayerUpperActionUpdateFuncs[this->heldItemAction]);
Player_SetUpperAction(play, this, sItemActionUpdateFuncs[this->heldItemAction]);
this->unk_ACC = 0;
this->idleType = PLAYER_IDLE_DEFAULT;
sPlayerHeldItemButtonIsHeldDown = sPlayerUseHeldItem;
@ -13782,7 +13782,7 @@ s32 Player_UpperAction_4(Player* this, PlayState* play) {
s32 Player_UpperAction_5(Player* this, PlayState* play) {
sPlayerUseHeldItem = sPlayerHeldItemButtonIsHeldDown;
if (sPlayerUseHeldItem || PlayerAnimation_Update(play, &this->skelAnimeUpper)) {
Player_SetUpperAction(play, this, sPlayerUpperActionUpdateFuncs[this->heldItemAction]);
Player_SetUpperAction(play, this, sItemActionUpdateFuncs[this->heldItemAction]);
PlayerAnimation_PlayLoop(play, &this->skelAnimeUpper, D_8085BE84[PLAYER_ANIMGROUP_wait][this->modelAnimType]);
this->idleType = PLAYER_IDLE_DEFAULT;
this->upperActionFunc(this, play);

View File

@ -4316,13 +4316,13 @@
0x8082F43C:("Player_SetUpperAction",),
0x8082F470:("Player_InitItemActionWithAnim",),
0x8082F524:("Player_ItemToItemAction",),
0x8082F594:("Player_InitItemAction_DoNothing",),
0x8082F5A4:("Player_InitItemAction_DekuStick",),
0x8082F5C0:("Player_InitItemAction_2",),
0x8082F594:("Player_InitDefaultIA",),
0x8082F5A4:("Player_InitDekuStickIA",),
0x8082F5C0:("Player_InitBowOrDekuNutIA",),
0x8082F5FC:("func_8082F5FC",),
0x8082F62C:("Player_InitItemAction_SpawnExplosive",),
0x8082F7F4:("Player_InitItemAction_SpawnHookshot",),
0x8082F8A0:("Player_InitItemAction_5",),
0x8082F62C:("Player_InitExplosiveIA",),
0x8082F7F4:("Player_InitHookshotIA",),
0x8082F8A0:("Player_InitZoraBoomerangIA",),
0x8082F8BC:("Player_InitItemAction",),
0x8082F938:("Player_OverrideBlureColors",),
0x8082FA5C:("func_8082FA5C",),

View File

@ -4826,8 +4826,8 @@
0x8085C96C:("sFidgetAnimSfxTypes","UNK_TYPE1","",0x1),
0x8085C98C:("sZoraBarrierEnvLighting","UNK_TYPE1","",0x1),
0x8085C99C:("sItemActionParams","UNK_TYPE1","",0x1),
0x8085C9F0:("sPlayerUpperActionUpdateFuncs","UNK_PTR","",0x4),
0x8085CB3C:("sPlayerItemActionInitFuncs","UNK_PTR","",0x4),
0x8085C9F0:("sItemActionUpdateFuncs","UNK_PTR","",0x4),
0x8085CB3C:("sItemActionInitFuncs","UNK_PTR","",0x4),
0x8085CC88:("sPlayerItemChangeInfo","UNK_TYPE1","",0x1),
0x8085CD00:("sPlayerItemChangeTypes","s8","[36]",0x24),
0x8085CD24:("sPlayerExplosiveInfo","UNK_TYPE1","",0x1),