mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-29 03:34:07 +00:00
Document func_8002F368
as Player_GetExchangeItemId
This commit is contained in:
parent
0d04f51e8e
commit
d3eedf6293
16 changed files with 25 additions and 25 deletions
|
@ -837,7 +837,7 @@ s32 Actor_OfferTalkExchangeEquiCylinder(Actor* actor, struct PlayState* play, f3
|
|||
s32 Actor_OfferTalk(Actor* actor, struct PlayState* play, f32 radius);
|
||||
s32 Actor_OfferTalkNearColChkInfoCylinder(Actor* actor, struct PlayState* play);
|
||||
u32 Actor_TextboxIsClosing(Actor* actor, struct PlayState* play);
|
||||
s8 func_8002F368(struct PlayState* play);
|
||||
s8 Player_GetExchangeItemId(struct PlayState* play);
|
||||
void Actor_GetScreenPos(struct PlayState* play, Actor* actor, s16* x, s16* y);
|
||||
u32 Actor_HasParent(Actor* actor, struct PlayState* play);
|
||||
s32 Actor_OfferGetItem(Actor* actor, struct PlayState* play, s32 getItemId, f32 xzRange, f32 yRange);
|
||||
|
|
|
@ -1759,7 +1759,7 @@ u32 Actor_TextboxIsClosing(Actor* actor, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
s8 func_8002F368(PlayState* play) {
|
||||
s8 Player_GetExchangeItemId(PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
return player->exchangeItemId;
|
||||
|
|
|
@ -206,7 +206,7 @@ void EnDs_Wait(EnDs* this, PlayState* play) {
|
|||
s16 yawDiff;
|
||||
|
||||
if (Actor_TalkOfferAccepted(&this->actor, play)) {
|
||||
if (func_8002F368(play) == EXCH_ITEM_ODD_MUSHROOM) {
|
||||
if (Player_GetExchangeItemId(play) == EXCH_ITEM_ODD_MUSHROOM) {
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
player->actor.textId = 0x504A;
|
||||
|
|
|
@ -284,7 +284,7 @@ void func_80A2F83C(EnGb* this, PlayState* play) {
|
|||
if (Actor_TalkOfferAccepted(&this->dyna.actor, play)) {
|
||||
s32 pad;
|
||||
|
||||
switch (func_8002F368(play)) {
|
||||
switch (Player_GetExchangeItemId(play)) {
|
||||
case EXCH_ITEM_NONE:
|
||||
func_80A2F180(this);
|
||||
this->actionFunc = func_80A2F94C;
|
||||
|
|
|
@ -597,7 +597,7 @@ void func_80A3F908(EnGo* this, PlayState* play) {
|
|||
|
||||
if ((PARAMS_GET_NOSHIFT(this->actor.params, 4, 4) == 0x90) && (dialogStarted == true)) {
|
||||
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_BROKEN_GORONS_SWORD) {
|
||||
if (func_8002F368(play) == EXCH_ITEM_BROKEN_GORONS_SWORD) {
|
||||
if (Player_GetExchangeItemId(play) == EXCH_ITEM_BROKEN_GORONS_SWORD) {
|
||||
if (GET_INFTABLE(INFTABLE_B4)) {
|
||||
this->actor.textId = 0x3055;
|
||||
} else {
|
||||
|
@ -610,7 +610,7 @@ void func_80A3F908(EnGo* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_EYE_DROPS) {
|
||||
if (func_8002F368(play) == EXCH_ITEM_EYE_DROPS) {
|
||||
if (Player_GetExchangeItemId(play) == EXCH_ITEM_EYE_DROPS) {
|
||||
this->actor.textId = 0x3059;
|
||||
} else {
|
||||
this->actor.textId = 0x3058;
|
||||
|
|
|
@ -591,7 +591,7 @@ s16 EnGo2_UpdateTalkStateGoronDmtBiggoron(PlayState* play, EnGo2* this) {
|
|||
case TEXT_STATE_DONE_FADING:
|
||||
switch (this->actor.textId) {
|
||||
case 0x305E:
|
||||
if (func_8002F368(play) != EXCH_ITEM_CLAIM_CHECK) {
|
||||
if (Player_GetExchangeItemId(play) != EXCH_ITEM_CLAIM_CHECK) {
|
||||
break;
|
||||
}
|
||||
FALLTHROUGH;
|
||||
|
@ -1025,7 +1025,7 @@ void EnGo2_BiggoronSetTextId(EnGo2* this, PlayState* play, Player* player) {
|
|||
|
||||
if (PARAMS_GET_S(this->actor.params, 0, 5) == GORON_DMT_BIGGORON) {
|
||||
if (gSaveContext.save.info.playerData.bgsFlag) {
|
||||
if (func_8002F368(play) == EXCH_ITEM_CLAIM_CHECK) {
|
||||
if (Player_GetExchangeItemId(play) == EXCH_ITEM_CLAIM_CHECK) {
|
||||
this->actor.textId = 0x3003;
|
||||
} else {
|
||||
this->actor.textId = 0x305E;
|
||||
|
@ -1033,7 +1033,7 @@ void EnGo2_BiggoronSetTextId(EnGo2* this, PlayState* play, Player* player) {
|
|||
player->actor.textId = this->actor.textId;
|
||||
|
||||
} else if (!gSaveContext.save.info.playerData.bgsFlag && (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_CLAIM_CHECK)) {
|
||||
if (func_8002F368(play) == EXCH_ITEM_CLAIM_CHECK) {
|
||||
if (Player_GetExchangeItemId(play) == EXCH_ITEM_CLAIM_CHECK) {
|
||||
if (Environment_GetBgsDayCount() >= 3) {
|
||||
textId = 0x305E;
|
||||
} else {
|
||||
|
@ -1052,7 +1052,7 @@ void EnGo2_BiggoronSetTextId(EnGo2* this, PlayState* play, Player* player) {
|
|||
|
||||
} else if ((INV_CONTENT(ITEM_TRADE_ADULT) >= ITEM_PRESCRIPTION) &&
|
||||
(INV_CONTENT(ITEM_TRADE_ADULT) <= ITEM_CLAIM_CHECK)) {
|
||||
if (func_8002F368(play) == EXCH_ITEM_EYE_DROPS) {
|
||||
if (Player_GetExchangeItemId(play) == EXCH_ITEM_EYE_DROPS) {
|
||||
this->actor.textId = 0x3059;
|
||||
} else {
|
||||
this->actor.textId = 0x3058;
|
||||
|
@ -1063,7 +1063,7 @@ void EnGo2_BiggoronSetTextId(EnGo2* this, PlayState* play, Player* player) {
|
|||
player->actor.textId = this->actor.textId;
|
||||
|
||||
} else if (INV_CONTENT(ITEM_TRADE_ADULT) <= ITEM_BROKEN_GORONS_SWORD) {
|
||||
if (func_8002F368(play) == EXCH_ITEM_BROKEN_GORONS_SWORD) {
|
||||
if (Player_GetExchangeItemId(play) == EXCH_ITEM_BROKEN_GORONS_SWORD) {
|
||||
if (GET_INFTABLE(INFTABLE_B4)) {
|
||||
textId = 0x3055;
|
||||
} else {
|
||||
|
|
|
@ -402,7 +402,7 @@ void func_80A53AD4(EnHeishi2* this, PlayState* play) {
|
|||
this->unk_300 = TEXT_STATE_DONE;
|
||||
|
||||
if (Actor_TalkOfferAccepted(&this->actor, play)) {
|
||||
s32 exchangeItemId = func_8002F368(play);
|
||||
s32 exchangeItemId = Player_GetExchangeItemId(play);
|
||||
|
||||
if (exchangeItemId == EXCH_ITEM_ZELDAS_LETTER) {
|
||||
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
|
||||
|
|
|
@ -206,7 +206,7 @@ void func_80A6E9AC(EnHs* this, PlayState* play) {
|
|||
s16 yawDiff;
|
||||
|
||||
if (Actor_TalkOfferAccepted(&this->actor, play)) {
|
||||
if (func_8002F368(play) == EXCH_ITEM_COJIRO) {
|
||||
if (Player_GetExchangeItemId(play) == EXCH_ITEM_COJIRO) {
|
||||
player->actor.textId = 0x10B2;
|
||||
func_80A6E3A0(this, func_80A6E8CC);
|
||||
Animation_Change(&this->skelAnime, &object_hs_Anim_000304, 1.0f, 0.0f,
|
||||
|
|
|
@ -957,7 +957,7 @@ void EnHy_OfferBuyBottledItem(EnHy* this, PlayState* play) {
|
|||
if (ENHY_GET_TYPE(&this->actor) == ENHY_TYPE_BEGGAR) {
|
||||
if (!Inventory_HasSpecificBottle(ITEM_BOTTLE_BLUE_FIRE) && !Inventory_HasSpecificBottle(ITEM_BOTTLE_BUG) &&
|
||||
!Inventory_HasSpecificBottle(ITEM_BOTTLE_FISH)) {
|
||||
switch (func_8002F368(play)) {
|
||||
switch (Player_GetExchangeItemId(play)) {
|
||||
case EXCH_ITEM_BOTTLE_POE:
|
||||
case EXCH_ITEM_BOTTLE_BIG_POE:
|
||||
case EXCH_ITEM_BOTTLE_RUTOS_LETTER:
|
||||
|
@ -971,7 +971,7 @@ void EnHy_OfferBuyBottledItem(EnHy* this, PlayState* play) {
|
|||
break;
|
||||
}
|
||||
} else {
|
||||
switch (func_8002F368(play)) {
|
||||
switch (Player_GetExchangeItemId(play)) {
|
||||
case EXCH_ITEM_BOTTLE_BLUE_FIRE:
|
||||
this->actor.textId = 0x70F0;
|
||||
break;
|
||||
|
|
|
@ -980,7 +980,7 @@ void func_80A9877C(EnKo* this, PlayState* play) {
|
|||
ENKO_TYPE == ENKO_TYPE_CHILD_FADO && play->sceneId == SCENE_LOST_WOODS) {
|
||||
this->actor.textId = INV_CONTENT(ITEM_TRADE_ADULT) > ITEM_ODD_POTION ? 0x10B9 : 0x10DF;
|
||||
|
||||
if (func_8002F368(play) == EXCH_ITEM_ODD_POTION) {
|
||||
if (Player_GetExchangeItemId(play) == EXCH_ITEM_ODD_POTION) {
|
||||
#if OOT_VERSION < NTSC_1_1
|
||||
this->actor.textId = GET_INFTABLE(INFTABLE_B6) ? 0x10B8 : 0x10B7;
|
||||
#else
|
||||
|
|
|
@ -292,7 +292,7 @@ void func_80A9CB18(EnKz* this, PlayState* play) {
|
|||
if (EnKz_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, 340.0f, EnKz_GetTextId,
|
||||
EnKz_UpdateTalkState)) {
|
||||
if ((this->actor.textId == 0x401A) && !GET_EVENTCHKINF(EVENTCHKINF_33)) {
|
||||
if (func_8002F368(play) == EXCH_ITEM_BOTTLE_RUTOS_LETTER) {
|
||||
if (Player_GetExchangeItemId(play) == EXCH_ITEM_BOTTLE_RUTOS_LETTER) {
|
||||
this->actor.textId = 0x401B;
|
||||
this->sfxPlayed = false;
|
||||
} else {
|
||||
|
@ -304,7 +304,7 @@ void func_80A9CB18(EnKz* this, PlayState* play) {
|
|||
|
||||
if (LINK_IS_ADULT) {
|
||||
if ((INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_PRESCRIPTION) &&
|
||||
(func_8002F368(play) == EXCH_ITEM_PRESCRIPTION)) {
|
||||
(Player_GetExchangeItemId(play) == EXCH_ITEM_PRESCRIPTION)) {
|
||||
this->actor.textId = 0x4014;
|
||||
this->sfxPlayed = false;
|
||||
player->actor.textId = this->actor.textId;
|
||||
|
@ -494,7 +494,7 @@ void EnKz_SetupGetItem(EnKz* this, PlayState* play) {
|
|||
this->actionFunc = EnKz_StartTimer;
|
||||
} else {
|
||||
#if OOT_VERSION < PAL_1_0
|
||||
getItemId = func_8002F368(play) == EXCH_ITEM_PRESCRIPTION ? GI_EYEBALL_FROG : GI_TUNIC_ZORA;
|
||||
getItemId = Player_GetExchangeItemId(play) == EXCH_ITEM_PRESCRIPTION ? GI_EYEBALL_FROG : GI_TUNIC_ZORA;
|
||||
#else
|
||||
getItemId = this->isTrading == true ? GI_EYEBALL_FROG : GI_TUNIC_ZORA;
|
||||
#endif
|
||||
|
|
|
@ -216,7 +216,7 @@ void EnMk_Wait(EnMk* this, PlayState* play) {
|
|||
s32 playerExchangeItem;
|
||||
|
||||
if (Actor_TalkOfferAccepted(&this->actor, play)) {
|
||||
playerExchangeItem = func_8002F368(play);
|
||||
playerExchangeItem = Player_GetExchangeItemId(play);
|
||||
|
||||
if (this->actor.textId != 0x4018) {
|
||||
player->actor.textId = this->actor.textId;
|
||||
|
|
|
@ -374,7 +374,7 @@ void func_80ABA878(EnNiwLady* this, PlayState* play) {
|
|||
this->unk_26E = 11;
|
||||
}
|
||||
if (Actor_TalkOfferAccepted(&this->actor, play)) {
|
||||
s8 playerExchangeItemId = func_8002F368(play);
|
||||
s8 playerExchangeItemId = Player_GetExchangeItemId(play);
|
||||
|
||||
if ((playerExchangeItemId == EXCH_ITEM_POCKET_CUCCO) && GET_EVENTCHKINF(EVENTCHKINF_TALON_WOKEN_IN_KAKARIKO)) {
|
||||
Sfx_PlaySfxCentered(NA_SE_SY_TRE_BOX_APPEAR);
|
||||
|
|
|
@ -368,7 +368,7 @@ void EnTa_IdleAsleepInCastle(EnTa* this, PlayState* play) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (Actor_TalkOfferAccepted(&this->actor, play)) {
|
||||
s32 exchangeItemId = func_8002F368(play);
|
||||
s32 exchangeItemId = Player_GetExchangeItemId(play);
|
||||
|
||||
switch (exchangeItemId) {
|
||||
case EXCH_ITEM_CHICKEN:
|
||||
|
@ -403,7 +403,7 @@ void EnTa_IdleAsleepInKakariko(EnTa* this, PlayState* play) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (Actor_TalkOfferAccepted(&this->actor, play)) {
|
||||
s32 exchangeItemId = func_8002F368(play);
|
||||
s32 exchangeItemId = Player_GetExchangeItemId(play);
|
||||
|
||||
switch (exchangeItemId) {
|
||||
case EXCH_ITEM_POCKET_CUCCO:
|
||||
|
|
|
@ -318,7 +318,7 @@ void EnToryo_HandleTalking(EnToryo* this, PlayState* play) {
|
|||
|
||||
if (this->messageState == 0) {
|
||||
if (Actor_TalkOfferAccepted(&this->actor, play)) {
|
||||
this->exchangeItemId = func_8002F368(play);
|
||||
this->exchangeItemId = Player_GetExchangeItemId(play);
|
||||
if (this->exchangeItemId != EXCH_ITEM_NONE) {
|
||||
player->actor.textId = EnToryo_ReactToExchangeItem(this, play);
|
||||
this->actor.textId = player->actor.textId;
|
||||
|
|
|
@ -537,7 +537,7 @@ void ObjBean_SetupWaitForBean(ObjBean* this) {
|
|||
|
||||
void ObjBean_WaitForBean(ObjBean* this, PlayState* play) {
|
||||
if (Actor_TalkOfferAccepted(&this->dyna.actor, play)) {
|
||||
if (func_8002F368(play) == EXCH_ITEM_MAGIC_BEAN) {
|
||||
if (Player_GetExchangeItemId(play) == EXCH_ITEM_MAGIC_BEAN) {
|
||||
func_80B8FE00(this);
|
||||
Flags_SetSwitch(play, PARAMS_GET_U(this->dyna.actor.params, 0, 6));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue