1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-05-11 03:23:46 +00:00
This commit is contained in:
Pablo 2024-12-13 22:58:51 +01:00
parent f47487a96c
commit 0f390cfd7e

View file

@ -302,7 +302,7 @@ void Player_Action_TimeTravelEnd(Player* this, PlayState* play);
void Player_Action_DrinkFromBottle(Player* this, PlayState* play);
void Player_Action_SwingBottle(Player* this, PlayState* play);
void Player_Action_UseFairyFromBottle(Player* this, PlayState* play);
void Player_Action_DropFromBottle(Player* this, PlayState* play);
void Player_Action_DropActorFromBottle(Player* this, PlayState* play);
void Player_Action_ExchangeItem(Player* this, PlayState* play);
void Player_Action_SlideOnSlope(Player* this, PlayState* play);
void Player_Action_WaitForCutscene(Player* this, PlayState* play);
@ -6082,13 +6082,14 @@ s32 Player_ActionHandler_13(Player* this, PlayState* play) {
}
sp2C = Player_ActionToBottle(this, this->itemAction);
if (sp2C >= 0) {
if (sp2C == 0xC) {
#define ACTION_TO_BOTTLE_ACTION(action) (action - PLAYER_IA_BOTTLE)
if (sp2C >= ACTION_TO_BOTTLE_ACTION(PLAYER_IA_BOTTLE)) {
if (sp2C == ACTION_TO_BOTTLE_ACTION(PLAYER_IA_BOTTLE_FAIRY)) {
Player_SetupActionPreserveItemAction(play, this, Player_Action_UseFairyFromBottle, 0);
Player_AnimPlayOnceAdjusted(play, this, &gPlayerAnim_link_bottle_bug_out);
func_80835EA4(play, 3);
} else if ((sp2C > 0) && (sp2C < 4)) {
Player_SetupActionPreserveItemAction(play, this, Player_Action_DropFromBottle, 0);
} else if ((sp2C >= ACTION_TO_BOTTLE_ACTION(PLAYER_IA_BOTTLE_FISH)) && (sp2C <= ACTION_TO_BOTTLE_ACTION(PLAYER_IA_BOTTLE_BUG))) {
Player_SetupActionPreserveItemAction(play, this, Player_Action_DropActorFromBottle, 0);
Player_AnimPlayOnceAdjusted(play, this, &gPlayerAnim_link_bottle_fish_out);
func_80835EA4(play, (sp2C == 1) ? 1 : 5);
} else {
@ -14140,10 +14141,7 @@ typedef struct BottleDropInfo {
/* 0x02 */ s16 actorParams;
} BottleDropInfo; // size = 0x04
/**
* Drops an actor (fish, insects or blue fire) from a bottle.
*/
void Player_Action_DropFromBottle(Player* this, PlayState* play) {
void Player_Action_DropActorFromBottle(Player* this, PlayState* play) {
Player_DecelerateToZero(this);
if (LinkAnimation_Update(play, &this->skelAnime)) {
@ -16070,7 +16068,7 @@ void Player_Action_CsAction(Player* this, PlayState* play) {
int Player_IsDroppingFish(PlayState* play) {
Player* this = GET_PLAYER(play);
return (Player_Action_DropFromBottle == this->actionFunc) && (this->itemAction == PLAYER_IA_BOTTLE_FISH);
return (Player_Action_DropActorFromBottle == this->actionFunc) && (this->itemAction == PLAYER_IA_BOTTLE_FISH);
}
s32 Player_StartFishing(PlayState* play) {