From 3d1ee33d7b7799cd84c3bbe1fc8d4f69ec3f58d9 Mon Sep 17 00:00:00 2001 From: engineer124 <47598039+engineer124@users.noreply.github.com> Date: Mon, 20 Nov 2023 03:11:59 +1100 Subject: [PATCH] Document Actor "OfferTalk" (#1567) * OfferTalk * rm comment * exch to offer in comment * reword again * Partial PR Review * Actor_AcknowledgeTalking * Actor_TalkOfferAccepted * PR Review * rm part of comment * rm comment --- include/functions.h | 10 +-- include/z64actor.h | 5 +- src/code/z_actor.c | 65 +++++++++++++------ src/code/z_en_a_keep.c | 4 +- .../actors/ovl_Arms_Hook/z_arms_hook.c | 2 +- src/overlays/actors/ovl_Demo_Im/z_demo_im.c | 4 +- src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c | 2 +- src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c | 2 +- src/overlays/actors/ovl_En_Ani/z_en_ani.c | 6 +- .../ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c | 12 ++-- src/overlays/actors/ovl_En_Cow/z_en_cow.c | 6 +- src/overlays/actors/ovl_En_Cs/z_en_cs.c | 4 +- src/overlays/actors/ovl_En_Daiku/z_en_daiku.c | 4 +- .../z_en_daiku_kakariko.c | 4 +- .../ovl_En_Diving_Game/z_en_diving_game.c | 4 +- src/overlays/actors/ovl_En_Dns/z_en_dns.c | 4 +- .../actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c | 4 +- src/overlays/actors/ovl_En_Door/z_en_door.c | 4 +- src/overlays/actors/ovl_En_Ds/z_en_ds.c | 10 +-- src/overlays/actors/ovl_En_Elf/z_en_elf.c | 4 +- src/overlays/actors/ovl_En_Fu/z_en_fu.c | 10 +-- src/overlays/actors/ovl_En_Gb/z_en_gb.c | 6 +- src/overlays/actors/ovl_En_Ge1/z_en_ge1.c | 12 ++-- src/overlays/actors/ovl_En_Ge2/z_en_ge2.c | 8 +-- src/overlays/actors/ovl_En_Ge3/z_en_ge3.c | 8 +-- src/overlays/actors/ovl_En_Gm/z_en_gm.c | 8 +-- src/overlays/actors/ovl_En_Go/z_en_go.c | 4 +- src/overlays/actors/ovl_En_Go2/z_en_go2.c | 6 +- src/overlays/actors/ovl_En_Gs/z_en_gs.c | 4 +- src/overlays/actors/ovl_En_Guest/z_en_guest.c | 4 +- .../actors/ovl_En_Heishi2/z_en_heishi2.c | 8 +-- .../actors/ovl_En_Heishi4/z_en_heishi4.c | 8 +-- .../actors/ovl_En_Hintnuts/z_en_hintnuts.c | 4 +- src/overlays/actors/ovl_En_Horse/z_en_horse.c | 5 +- src/overlays/actors/ovl_En_Hs/z_en_hs.c | 8 +-- src/overlays/actors/ovl_En_Hs2/z_en_hs2.c | 4 +- src/overlays/actors/ovl_En_In/z_en_in.c | 2 +- src/overlays/actors/ovl_En_Js/z_en_js.c | 8 +-- .../actors/ovl_En_Kakasi/z_en_kakasi.c | 4 +- .../actors/ovl_En_Kakasi3/z_en_kakasi3.c | 4 +- .../actors/ovl_En_Kanban/z_en_kanban.c | 4 +- src/overlays/actors/ovl_En_Kz/z_en_kz.c | 4 +- src/overlays/actors/ovl_En_Md/z_en_md.c | 2 +- src/overlays/actors/ovl_En_Mk/z_en_mk.c | 6 +- src/overlays/actors/ovl_En_Mm/z_en_mm.c | 4 +- src/overlays/actors/ovl_En_Mm2/z_en_mm2.c | 4 +- src/overlays/actors/ovl_En_Ms/z_en_ms.c | 4 +- src/overlays/actors/ovl_En_Nb/z_en_nb.c | 8 +-- .../actors/ovl_En_Niw_Girl/z_en_niw_girl.c | 4 +- .../actors/ovl_En_Niw_Lady/z_en_niw_lady.c | 12 ++-- .../ovl_En_Okarina_Tag/z_en_okarina_tag.c | 4 +- src/overlays/actors/ovl_En_Ossan/z_en_ossan.c | 10 +-- src/overlays/actors/ovl_En_Owl/z_en_owl.c | 8 +-- .../actors/ovl_En_Po_Field/z_en_po_field.c | 4 +- .../actors/ovl_En_Po_Relay/z_en_po_relay.c | 8 +-- src/overlays/actors/ovl_En_Poh/z_en_poh.c | 4 +- src/overlays/actors/ovl_En_Ru1/z_en_ru1.c | 12 ++-- src/overlays/actors/ovl_En_Skj/z_en_skj.c | 32 ++++----- src/overlays/actors/ovl_En_Ssh/z_en_ssh.c | 4 +- src/overlays/actors/ovl_En_Sth/z_en_sth.c | 12 ++-- .../ovl_En_Syateki_Man/z_en_syateki_man.c | 4 +- src/overlays/actors/ovl_En_Ta/z_en_ta.c | 26 ++++---- .../ovl_En_Takara_Man/z_en_takara_man.c | 4 +- src/overlays/actors/ovl_En_Tk/z_en_tk.c | 2 +- src/overlays/actors/ovl_En_Toryo/z_en_toryo.c | 6 +- .../ovl_En_Wonder_Talk/z_en_wonder_talk.c | 4 +- .../ovl_En_Wonder_Talk2/z_en_wonder_talk2.c | 4 +- src/overlays/actors/ovl_En_Xc/z_en_xc.c | 4 +- src/overlays/actors/ovl_En_Zl1/z_en_zl1.c | 14 ++-- src/overlays/actors/ovl_En_Zl3/z_en_zl3.c | 16 ++--- src/overlays/actors/ovl_En_Zl4/z_en_zl4.c | 4 +- src/overlays/actors/ovl_Fishing/z_fishing.c | 8 +-- src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c | 4 +- .../actors/ovl_player_actor/z_player.c | 28 ++++---- 74 files changed, 297 insertions(+), 266 deletions(-) diff --git a/include/functions.h b/include/functions.h index 011d0d0c2e..adb31bb377 100644 --- a/include/functions.h +++ b/include/functions.h @@ -395,11 +395,11 @@ PosRot* Actor_GetFocus(PosRot* dest, Actor* actor); PosRot* Actor_GetWorld(PosRot* dest, Actor* actor); PosRot* Actor_GetWorldPosShapeRot(PosRot* arg0, Actor* actor); s32 func_8002F0C8(Actor* actor, Player* player, s32 flag); -u32 Actor_ProcessTalkRequest(Actor* actor, PlayState* play); -s32 func_8002F1C4(Actor* actor, PlayState* play, f32 arg2, f32 arg3, u32 exchangeItemId); -s32 func_8002F298(Actor* actor, PlayState* play, f32 arg2, u32 exchangeItemId); -s32 func_8002F2CC(Actor* actor, PlayState* play, f32 arg2); -s32 func_8002F2F4(Actor* actor, PlayState* play); +s32 Actor_TalkOfferAccepted(Actor* actor, PlayState* play); +s32 Actor_OfferTalkExchange(Actor* actor, PlayState* play, f32 xzRange, f32 yRange, u32 exchangeItemId); +s32 Actor_OfferTalkExchangeEquiCylinder(Actor* actor, PlayState* play, f32 radius, u32 exchangeItemId); +s32 Actor_OfferTalk(Actor* actor, PlayState* play, f32 radius); +s32 Actor_OfferTalkNearColChkInfoCylinder(Actor* actor, PlayState* play); u32 Actor_TextboxIsClosing(Actor* actor, PlayState* play); s8 func_8002F368(PlayState* play); void Actor_GetScreenPos(PlayState* play, Actor* actor, s16* x, s16* y); diff --git a/include/z64actor.h b/include/z64actor.h index 8fdbbf1dbc..fd38b002b2 100644 --- a/include/z64actor.h +++ b/include/z64actor.h @@ -147,7 +147,10 @@ typedef struct { #define ACTOR_FLAG_5 (1 << 5) #define ACTOR_FLAG_6 (1 << 6) #define ACTOR_FLAG_7 (1 << 7) -#define ACTOR_FLAG_8 (1 << 8) +// Signals that player has accepted an offer to talk to an actor +// Player will retain this flag until the player is finished talking +// Actor will retain this flag until `Actor_TalkOfferAccepted` is called or manually turned off by the actor +#define ACTOR_FLAG_TALK (1 << 8) #define ACTOR_FLAG_9 (1 << 9) #define ACTOR_FLAG_10 (1 << 10) #define ACTOR_FLAG_ENKUSA_CUT (1 << 11) diff --git a/src/code/z_actor.c b/src/code/z_actor.c index bbbb22c360..e55fc95b0c 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -1549,22 +1549,39 @@ s32 func_8002F0C8(Actor* actor, Player* player, s32 flag) { return false; } -u32 Actor_ProcessTalkRequest(Actor* actor, PlayState* play) { - if (actor->flags & ACTOR_FLAG_8) { - actor->flags &= ~ACTOR_FLAG_8; +/** + * When a given talk offer is accepted, Player will set `ACTOR_FLAG_TALK` for that actor. + * This function serves to acknowledge that the offer was accepted by Player, and notifies the actor + * that it should proceed with its own internal processes for handling dialogue. + * + * @return true if the talk offer was accepted, false otherwise + */ +s32 Actor_TalkOfferAccepted(Actor* actor, PlayState* play) { + if (actor->flags & ACTOR_FLAG_TALK) { + actor->flags &= ~ACTOR_FLAG_TALK; return true; } return false; } -s32 func_8002F1C4(Actor* actor, PlayState* play, f32 arg2, f32 arg3, u32 exchangeItemId) { +/** + * This function covers offering the ability to talk with the player. + * Passing an exchangeItemId (see `ExchangeItemID`) allows the player to also use the item to initiate the + * conversation. + * + * This function carries a talk exchange offer to the player actor if context allows it (e.g. the player is in range + * and not busy with certain things). + * + * @return true If the player actor is capable of accepting the offer. + */ +s32 Actor_OfferTalkExchange(Actor* actor, PlayState* play, f32 xzRange, f32 yRange, u32 exchangeItemId) { Player* player = GET_PLAYER(play); - if ((player->actor.flags & ACTOR_FLAG_8) || ((exchangeItemId != EXCH_ITEM_NONE) && Player_InCsMode(play)) || + if ((player->actor.flags & ACTOR_FLAG_TALK) || ((exchangeItemId != EXCH_ITEM_NONE) && Player_InCsMode(play)) || (!actor->isTargeted && - ((arg3 < fabsf(actor->yDistToPlayer)) || (player->targetActorDistance < actor->xzDistToPlayer) || - (arg2 < actor->xzDistToPlayer)))) { + ((yRange < fabsf(actor->yDistToPlayer)) || (player->targetActorDistance < actor->xzDistToPlayer) || + (xzRange < actor->xzDistToPlayer)))) { return false; } @@ -1575,18 +1592,28 @@ s32 func_8002F1C4(Actor* actor, PlayState* play, f32 arg2, f32 arg3, u32 exchang return true; } -s32 func_8002F298(Actor* actor, PlayState* play, f32 arg2, u32 exchangeItemId) { - return func_8002F1C4(actor, play, arg2, arg2, exchangeItemId); +/** + * Offers a talk exchange request within an equilateral cylinder with the radius specified. + */ +s32 Actor_OfferTalkExchangeEquiCylinder(Actor* actor, PlayState* play, f32 radius, u32 exchangeItemId) { + return Actor_OfferTalkExchange(actor, play, radius, radius, exchangeItemId); } -s32 func_8002F2CC(Actor* actor, PlayState* play, f32 arg2) { - return func_8002F298(actor, play, arg2, EXCH_ITEM_NONE); +/** + * Offers a talk request within an equilateral cylinder with the radius specified. + */ +s32 Actor_OfferTalk(Actor* actor, PlayState* play, f32 radius) { + return Actor_OfferTalkExchangeEquiCylinder(actor, play, radius, EXCH_ITEM_NONE); } -s32 func_8002F2F4(Actor* actor, PlayState* play) { - f32 var1 = 50.0f + actor->colChkInfo.cylRadius; +/** + * Offers a talk request within an equilateral cylinder whose radius is determined by the actor's collision check + * cylinder's radius. + */ +s32 Actor_OfferTalkNearColChkInfoCylinder(Actor* actor, PlayState* play) { + f32 cylRadius = 50.0f + actor->colChkInfo.cylRadius; - return func_8002F2CC(actor, play, var1); + return Actor_OfferTalk(actor, play, cylRadius); } u32 Actor_TextboxIsClosing(Actor* actor, PlayState* play) { @@ -3776,7 +3803,7 @@ s32 Npc_UpdateTalking(PlayState* play, Actor* actor, s16* talkState, f32 interac s16 x; s16 y; - if (Actor_ProcessTalkRequest(actor, play)) { + if (Actor_TalkOfferAccepted(actor, play)) { *talkState = NPC_TALK_STATE_TALKING; return true; } @@ -3792,7 +3819,7 @@ s32 Npc_UpdateTalking(PlayState* play, Actor* actor, s16* talkState, f32 interac return false; } - if (!func_8002F2CC(actor, play, interactRange)) { + if (!Actor_OfferTalk(actor, play, interactRange)) { return false; } @@ -5674,7 +5701,7 @@ s32 func_80037D98(PlayState* play, Actor* actor, s16 arg2, s32* arg3) { s16 sp2A; s16 abs_var; - if (Actor_ProcessTalkRequest(actor, play)) { + if (Actor_TalkOfferAccepted(actor, play)) { *arg3 = 1; return true; } @@ -5704,11 +5731,11 @@ s32 func_80037D98(PlayState* play, Actor* actor, s16 arg2, s32* arg3) { } if (actor->xyzDistToPlayerSq <= SQ(80.0f)) { - if (func_8002F2CC(actor, play, 80.0f)) { + if (Actor_OfferTalk(actor, play, 80.0f)) { actor->textId = func_80037C30(play, arg2); } } else { - if (func_8002F2F4(actor, play)) { + if (Actor_OfferTalkNearColChkInfoCylinder(actor, play)) { actor->textId = func_80037C30(play, arg2); } } diff --git a/src/code/z_en_a_keep.c b/src/code/z_en_a_keep.c index d0b0508682..118f0f3d9a 100644 --- a/src/code/z_en_a_keep.c +++ b/src/code/z_en_a_keep.c @@ -204,10 +204,10 @@ void EnAObj_WaitTalk(EnAObj* this, PlayState* play) { relYawTowardsPlayer = this->dyna.actor.yawTowardsPlayer - this->dyna.actor.shape.rot.y; if (ABS(relYawTowardsPlayer) < 0x2800 || (this->dyna.actor.params == A_OBJ_SIGNPOST_ARROW && ABS(relYawTowardsPlayer) > 0x5800)) { - if (Actor_ProcessTalkRequest(&this->dyna.actor, play)) { + if (Actor_TalkOfferAccepted(&this->dyna.actor, play)) { EnAObj_SetupAction(this, EnAObj_WaitFinishedTalking); } else { - func_8002F2F4(&this->dyna.actor, play); + Actor_OfferTalkNearColChkInfoCylinder(&this->dyna.actor, play); } } } diff --git a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c index b7739f9211..d78418fa56 100644 --- a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c +++ b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c @@ -120,7 +120,7 @@ s32 ArmsHook_CheckForCancel(ArmsHook* this) { Player* player = (Player*)this->actor.parent; if (Player_HoldsHookshot(player)) { - if ((player->itemAction != player->heldItemAction) || (player->actor.flags & ACTOR_FLAG_8) || + if ((player->itemAction != player->heldItemAction) || (player->actor.flags & ACTOR_FLAG_TALK) || ((player->stateFlags1 & (PLAYER_STATE1_7 | PLAYER_STATE1_26)))) { this->timer = 0; ArmsHook_DetachHookFromActor(this); diff --git a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c index b765fc413c..e0d78d1f7c 100644 --- a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c +++ b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c @@ -853,9 +853,9 @@ s32 func_80986A5C(DemoIm* this, PlayState* play) { s32 func_80986AD0(DemoIm* this, PlayState* play) { this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; - if (!Actor_ProcessTalkRequest(&this->actor, play)) { + if (!Actor_TalkOfferAccepted(&this->actor, play)) { this->actor.textId = 0x708E; - func_8002F2F4(&this->actor, play); + Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play); } else { return true; } diff --git a/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c b/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c index 42b8a279bd..59f0ace25a 100644 --- a/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c +++ b/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c @@ -149,7 +149,7 @@ void ElfMsg_Update(Actor* thisx, PlayState* play) { ElfMsg* this = (ElfMsg*)thisx; if (!ElfMsg_KillCheck(this, play)) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { if (((this->actor.params >> 8) & 0x3F) != 0x3F) { Flags_SetSwitch(play, (this->actor.params >> 8) & 0x3F); } diff --git a/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c b/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c index e23ae04aca..0e8cb382d4 100644 --- a/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c +++ b/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c @@ -120,7 +120,7 @@ void ElfMsg2_WaitForTextClose(ElfMsg2* this, PlayState* play) { * Runs while Navi text is not up. */ void ElfMsg2_WaitForTextRead(ElfMsg2* this, PlayState* play) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { ElfMsg2_SetupAction(this, ElfMsg2_WaitForTextClose); } } diff --git a/src/overlays/actors/ovl_En_Ani/z_en_ani.c b/src/overlays/actors/ovl_En_Ani/z_en_ani.c index b99ad607c5..2353331605 100644 --- a/src/overlays/actors/ovl_En_Ani/z_en_ani.c +++ b/src/overlays/actors/ovl_En_Ani/z_en_ani.c @@ -99,7 +99,7 @@ void EnAni_Destroy(Actor* thisx, PlayState* play) { s32 EnAni_SetText(EnAni* this, PlayState* play, u16 textId) { this->actor.textId = textId; this->unk_2A8 |= 1; - func_8002F2CC(&this->actor, play, 100.0f); + Actor_OfferTalk(&this->actor, play, 100.0f); return 0; } @@ -151,7 +151,7 @@ void func_809B064C(EnAni* this, PlayState* play) { } yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y; - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { if (this->actor.textId == 0x5056) { EnAni_SetupAction(this, func_809B04F0); } else if (this->actor.textId == 0x5055) { @@ -177,7 +177,7 @@ void func_809B07F8(EnAni* this, PlayState* play) { u16 textId; yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y; - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { if (this->actor.textId == 0x5056) { EnAni_SetupAction(this, func_809B0524); } else if (this->actor.textId == 0x5055) { diff --git a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c index 6cbbd90c56..37cd13375a 100644 --- a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c +++ b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c @@ -98,13 +98,13 @@ void EnBomBowlMan_WaitAsleep(EnBomBowlMan* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->actionFunc = EnBomBowlMan_TalkAsleep; } else { yawDiff = ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)); if (!(this->actor.xzDistToPlayer > 120.0f) && (yawDiff < 0x4300)) { - func_8002F2CC(&this->actor, play, 120.0f); + Actor_OfferTalk(&this->actor, play, 120.0f); } } } @@ -177,10 +177,10 @@ void EnBomBowlMan_CheckBeatenDC(EnBomBowlMan* this, PlayState* play) { void EnBomBowlMan_WaitNotBeatenDC(EnBomBowlMan* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->actionFunc = EnBomBowlMan_TalkNotBeatenDC; } else { - func_8002F2CC(&this->actor, play, 120.0f); + Actor_OfferTalk(&this->actor, play, 120.0f); } } @@ -265,7 +265,7 @@ void EnBomBowlMan_RunGame(EnBomBowlMan* this, PlayState* play) { } this->actionFunc = EnBomBowlMan_HandlePlayChoice; } else { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { if (this->minigamePlayStatus == 0) { this->actionFunc = EnBomBowlMan_HandlePlayChoice; } else { @@ -275,7 +275,7 @@ void EnBomBowlMan_RunGame(EnBomBowlMan* this, PlayState* play) { yawDiff = ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)); if (!(this->actor.xzDistToPlayer > 120.0f) && (yawDiff < 0x4300)) { - func_8002F2CC(&this->actor, play, 120.0f); + Actor_OfferTalk(&this->actor, play, 120.0f); } } } diff --git a/src/overlays/actors/ovl_En_Cow/z_en_cow.c b/src/overlays/actors/ovl_En_Cow/z_en_cow.c index 753789fc06..2c9b8753e9 100644 --- a/src/overlays/actors/ovl_En_Cow/z_en_cow.c +++ b/src/overlays/actors/ovl_En_Cow/z_en_cow.c @@ -261,11 +261,11 @@ void EnCow_CheckForEmptyBottle(EnCow* this, PlayState* play) { } void EnCow_Talk(EnCow* this, PlayState* play) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->actionFunc = EnCow_CheckForEmptyBottle; } else { this->actor.flags |= ACTOR_FLAG_16; - func_8002F2CC(&this->actor, play, 170.0f); + Actor_OfferTalk(&this->actor, play, 170.0f); this->actor.textId = 0x2006; } @@ -291,7 +291,7 @@ void EnCow_Idle(EnCow* this, PlayState* play) { R_EPONAS_SONG_PLAYED = false; this->actionFunc = EnCow_Talk; this->actor.flags |= ACTOR_FLAG_16; - func_8002F2CC(&this->actor, play, 170.0f); + Actor_OfferTalk(&this->actor, play, 170.0f); this->actor.textId = 0x2006; } else { this->cowFlags |= COW_FLAG_FAILED_TO_GIVE_MILK; diff --git a/src/overlays/actors/ovl_En_Cs/z_en_cs.c b/src/overlays/actors/ovl_En_Cs/z_en_cs.c index 9cf4ff513f..8df53cd5fc 100644 --- a/src/overlays/actors/ovl_En_Cs/z_en_cs.c +++ b/src/overlays/actors/ovl_En_Cs/z_en_cs.c @@ -235,7 +235,7 @@ void EnCs_HandleTalking(EnCs* this, PlayState* play) { this->talkState = 1; } else if (this->talkState == 1) { this->talkState = EnCs_GetTalkState(this, play); - } else if (Actor_ProcessTalkRequest(&this->actor, play)) { + } else if (Actor_TalkOfferAccepted(&this->actor, play)) { if ((this->actor.textId == 0x2022) || ((this->actor.textId != 0x2022) && (this->actor.textId != 0x2028))) { EnCs_ChangeAnim(this, ENCS_ANIM_3, &this->currentAnimIndex); } @@ -253,7 +253,7 @@ void EnCs_HandleTalking(EnCs* this, PlayState* play) { Actor_GetScreenPos(play, &this->actor, &sp2A, &sp28); if ((sp2A >= 0) && (sp2A <= 320) && (sp28 >= 0) && (sp28 <= 240) && - (func_8002F2CC(&this->actor, play, 100.0f))) { + (Actor_OfferTalk(&this->actor, play, 100.0f))) { this->actor.textId = EnCs_GetTextID(this, play); } } diff --git a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c index 9db7e0f153..711ecafe2b 100644 --- a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c +++ b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c @@ -260,12 +260,12 @@ void EnDaiku_UpdateText(EnDaiku* this, PlayState* play) { if (this->talkState == ENDAIKU_STATE_TALKING) { this->talkState = EnDaiku_UpdateTalking(this, play); - } else if (Actor_ProcessTalkRequest(&this->actor, play)) { + } else if (Actor_TalkOfferAccepted(&this->actor, play)) { this->talkState = ENDAIKU_STATE_TALKING; } else { Actor_GetScreenPos(play, &this->actor, &sp2E, &sp2C); if (sp2E >= 0 && sp2E <= 320 && sp2C >= 0 && sp2C <= 240 && this->talkState == ENDAIKU_STATE_CAN_TALK && - func_8002F2CC(&this->actor, play, 100.0f) == 1) { + Actor_OfferTalk(&this->actor, play, 100.0f) == 1) { if (play->sceneId == SCENE_THIEVES_HIDEOUT) { if (this->stateFlags & ENDAIKU_STATEFLAG_GERUDODEFEATED) { freedCount = 0; diff --git a/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c b/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c index 34d408726b..0949f4a240 100644 --- a/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c +++ b/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c @@ -232,13 +232,13 @@ void EnDaikuKakariko_HandleTalking(EnDaikuKakariko* this, PlayState* play) { if (this->talkState == 2) { this->talkState = EnDaikuKakariko_GetTalkState(this, play); - } else if (Actor_ProcessTalkRequest(&this->actor, play)) { + } else if (Actor_TalkOfferAccepted(&this->actor, play)) { this->talkState = 2; } else { Actor_GetScreenPos(play, &this->actor, &sp26, &sp24); if ((sp26 >= 0) && (sp26 <= 320) && (sp24 >= 0) && (sp24 <= 240) && (this->talkState == 0) && - (func_8002F2CC(&this->actor, play, 100.0f) == 1)) { + (Actor_OfferTalk(&this->actor, play, 100.0f) == 1)) { this->actor.textId = Text_GetFaceReaction(play, maskReactionSets[this->actor.params & 3]); if (this->actor.textId == 0) { diff --git a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c index 7661c016aa..2b7925985e 100644 --- a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c +++ b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c @@ -183,7 +183,7 @@ void func_809EDCB0(EnDivingGame* this, PlayState* play) { void EnDivingGame_Talk(EnDivingGame* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); if (this->state != ENDIVINGGAME_STATE_PLAYING || !EnDivingGame_HasMinigameFinished(this, play)) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { if (this->unk_292 != TEXT_STATE_DONE) { switch (this->state) { case ENDIVINGGAME_STATE_NOTPLAYING: @@ -224,7 +224,7 @@ void EnDivingGame_Talk(EnDivingGame* this, PlayState* play) { break; } } - func_8002F2CC(&this->actor, play, 80.0f); + Actor_OfferTalk(&this->actor, play, 80.0f); } } } diff --git a/src/overlays/actors/ovl_En_Dns/z_en_dns.c b/src/overlays/actors/ovl_En_Dns/z_en_dns.c index 073b6fa37f..8835fa716b 100644 --- a/src/overlays/actors/ovl_En_Dns/z_en_dns.c +++ b/src/overlays/actors/ovl_En_Dns/z_en_dns.c @@ -341,7 +341,7 @@ void EnDns_Idle(EnDns* this, PlayState* play) { Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 3, 2000, 0); this->actor.world.rot.y = this->actor.shape.rot.y; - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->actionFunc = EnDns_Talk; } else { if ((this->collider.base.ocFlags1 & OC1_HIT) || this->actor.isTargeted) { @@ -350,7 +350,7 @@ void EnDns_Idle(EnDns* this, PlayState* play) { this->actor.flags &= ~ACTOR_FLAG_16; } if (this->actor.xzDistToPlayer < 130.0f) { - func_8002F2F4(&this->actor, play); + Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play); } } } diff --git a/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c b/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c index 54f9a8491f..bdeb85d31e 100644 --- a/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c +++ b/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c @@ -233,10 +233,10 @@ void EnDntJiji_Cower(EnDntJiji* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 3, 0x1388, 0); if (frame >= this->endFrame) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->actionFunc = EnDntJiji_SetupTalk; } else { - func_8002F2CC(&this->actor, play, 100.0f); + Actor_OfferTalk(&this->actor, play, 100.0f); } } } diff --git a/src/overlays/actors/ovl_En_Door/z_en_door.c b/src/overlays/actors/ovl_En_Door/z_en_door.c index 310858034f..5f04f6159f 100644 --- a/src/overlays/actors/ovl_En_Door/z_en_door.c +++ b/src/overlays/actors/ovl_En_Door/z_en_door.c @@ -259,10 +259,10 @@ void EnDoor_Idle(EnDoor* this, PlayState* play) { } void EnDoor_WaitForCheck(EnDoor* this, PlayState* play) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->actionFunc = EnDoor_Check; } else { - func_8002F2CC(&this->actor, play, DOOR_CHECK_RANGE); + Actor_OfferTalk(&this->actor, play, DOOR_CHECK_RANGE); } } diff --git a/src/overlays/actors/ovl_En_Ds/z_en_ds.c b/src/overlays/actors/ovl_En_Ds/z_en_ds.c index 2dbde60d04..05c4c1a783 100644 --- a/src/overlays/actors/ovl_En_Ds/z_en_ds.c +++ b/src/overlays/actors/ovl_En_Ds/z_en_ds.c @@ -67,11 +67,11 @@ void EnDs_TalkNoEmptyBottle(EnDs* this, PlayState* play) { } void EnDs_TalkAfterGiveOddPotion(EnDs* this, PlayState* play) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->actionFunc = EnDs_Talk; } else { this->actor.flags |= ACTOR_FLAG_16; - func_8002F2CC(&this->actor, play, 1000.0f); + Actor_OfferTalk(&this->actor, play, 1000.0f); } } @@ -79,7 +79,7 @@ void EnDs_DisplayOddPotionText(EnDs* this, PlayState* play) { if (Actor_TextboxIsClosing(&this->actor, play)) { this->actor.textId = 0x504F; this->actionFunc = EnDs_TalkAfterGiveOddPotion; - this->actor.flags &= ~ACTOR_FLAG_8; + this->actor.flags &= ~ACTOR_FLAG_TALK; SET_ITEMGETINF(ITEMGETINF_30); } } @@ -205,7 +205,7 @@ void EnDs_Wait(EnDs* this, PlayState* play) { Player* player = GET_PLAYER(play); s16 yawDiff; - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { if (func_8002F368(play) == EXCH_ITEM_ODD_MUSHROOM) { Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); @@ -227,7 +227,7 @@ void EnDs_Wait(EnDs* this, PlayState* play) { this->actor.textId = 0x5048; if ((ABS(yawDiff) < 0x2151) && (this->actor.xzDistToPlayer < 200.0f)) { - func_8002F298(&this->actor, play, 100.0f, EXCH_ITEM_ODD_MUSHROOM); + Actor_OfferTalkExchangeEquiCylinder(&this->actor, play, 100.0f, EXCH_ITEM_ODD_MUSHROOM); this->unk_1E8 |= 1; } } diff --git a/src/overlays/actors/ovl_En_Elf/z_en_elf.c b/src/overlays/actors/ovl_En_Elf/z_en_elf.c index 7c34bc073d..bc860f02bc 100644 --- a/src/overlays/actors/ovl_En_Elf/z_en_elf.c +++ b/src/overlays/actors/ovl_En_Elf/z_en_elf.c @@ -1394,7 +1394,7 @@ void func_80A053F0(Actor* thisx, PlayState* play) { thisx->flags |= ACTOR_FLAG_16; } - if (Actor_ProcessTalkRequest(thisx, play)) { + if (Actor_TalkOfferAccepted(thisx, play)) { func_800F4524(&gSfxDefaultPos, NA_SE_VO_SK_LAUGH, 0x20); thisx->focus.pos = thisx->world.pos; @@ -1409,7 +1409,7 @@ void func_80A053F0(Actor* thisx, PlayState* play) { func_80A01C38(this, 3); if (this->elfMsg != NULL) { - this->elfMsg->actor.flags |= ACTOR_FLAG_8; + this->elfMsg->actor.flags |= ACTOR_FLAG_TALK; } thisx->flags &= ~ACTOR_FLAG_16; diff --git a/src/overlays/actors/ovl_En_Fu/z_en_fu.c b/src/overlays/actors/ovl_En_Fu/z_en_fu.c index 6991d552f6..9579e1f417 100644 --- a/src/overlays/actors/ovl_En_Fu/z_en_fu.c +++ b/src/overlays/actors/ovl_En_Fu/z_en_fu.c @@ -103,7 +103,7 @@ void EnFu_Destroy(Actor* thisx, PlayState* play) { s32 func_80A1D94C(EnFu* this, PlayState* play, u16 textID, EnFuActionFunc actionFunc) { s16 yawDiff; - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->actionFunc = actionFunc; return true; } @@ -111,7 +111,7 @@ s32 func_80A1D94C(EnFu* this, PlayState* play, u16 textID, EnFuActionFunc action yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y; if ((ABS(yawDiff) < 0x2301) && (this->actor.xzDistToPlayer < 100.0f)) { - func_8002F2CC(&this->actor, play, 100.0f); + Actor_OfferTalk(&this->actor, play, 100.0f); } else { this->behaviorFlags |= FU_RESET_LOOK_ANGLE; } @@ -137,7 +137,7 @@ void EnFu_WaitChild(EnFu* this, PlayState* play) { textID = GET_EVENTCHKINF(EVENTCHKINF_67) ? 0x5033 : 0x5032; } - // if ACTOR_FLAG_8 is set and textID is 0x5033, change animation + // if ACTOR_FLAG_TALK is set and textID is 0x5033, change animation // if func_80A1D94C returns 1, actionFunc is set to func_80A1DA04 if (func_80A1D94C(this, play, textID, func_80A1DA04)) { if (textID == 0x5033) { @@ -222,12 +222,12 @@ void EnFu_WaitAdult(EnFu* this, PlayState* play) { Message_StartTextbox(play, this->actor.textId, NULL); this->actionFunc = EnFu_TeachSong; this->behaviorFlags |= FU_WAIT; - } else if (Actor_ProcessTalkRequest(&this->actor, play)) { + } else if (Actor_TalkOfferAccepted(&this->actor, play)) { this->actionFunc = func_80A1DBA0; } else if (ABS(yawDiff) < 0x2301) { if (this->actor.xzDistToPlayer < 100.0f) { this->actor.textId = 0x5034; - func_8002F2CC(&this->actor, play, 100.0f); + Actor_OfferTalk(&this->actor, play, 100.0f); player->stateFlags2 |= PLAYER_STATE2_23; } } diff --git a/src/overlays/actors/ovl_En_Gb/z_en_gb.c b/src/overlays/actors/ovl_En_Gb/z_en_gb.c index 209fa806b3..6ad3d48e52 100644 --- a/src/overlays/actors/ovl_En_Gb/z_en_gb.c +++ b/src/overlays/actors/ovl_En_Gb/z_en_gb.c @@ -279,7 +279,7 @@ void func_80A2F83C(EnGb* this, PlayState* play) { return; } } - if (Actor_ProcessTalkRequest(&this->dyna.actor, play)) { + if (Actor_TalkOfferAccepted(&this->dyna.actor, play)) { switch (func_8002F368(play)) { case EXCH_ITEM_NONE: func_80A2F180(this); @@ -297,7 +297,7 @@ void func_80A2F83C(EnGb* this, PlayState* play) { return; } if (this->dyna.actor.xzDistToPlayer < 100.0f) { - func_8002F298(&this->dyna.actor, play, 100.0f, EXCH_ITEM_BOTTLE_POE); + Actor_OfferTalkExchangeEquiCylinder(&this->dyna.actor, play, 100.0f, EXCH_ITEM_BOTTLE_POE); } } @@ -366,7 +366,7 @@ void func_80A2FBB0(EnGb* this, PlayState* play) { void func_80A2FC0C(EnGb* this, PlayState* play) { if (Message_GetState(&play->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(play)) { - Actor_ProcessTalkRequest(&this->dyna.actor, play); + Actor_TalkOfferAccepted(&this->dyna.actor, play); func_80A2F180(this); this->actionFunc = func_80A2F83C; } diff --git a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c index 157742eda6..8d35a171c8 100644 --- a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c +++ b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c @@ -181,7 +181,7 @@ void EnGe1_Destroy(Actor* thisx, PlayState* play) { } s32 EnGe1_SetTalkAction(EnGe1* this, PlayState* play, u16 textId, f32 arg3, EnGe1ActionFunc actionFunc) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->actionFunc = actionFunc; this->animFunc = EnGe1_StopFidget; this->stateFlags &= ~GE1_STATE_IDLE_ANIM; @@ -194,7 +194,7 @@ s32 EnGe1_SetTalkAction(EnGe1* this, PlayState* play, u16 textId, f32 arg3, EnGe this->actor.textId = textId; if (this->actor.xzDistToPlayer < arg3) { - func_8002F2CC(&this->actor, play, arg3); + Actor_OfferTalk(&this->actor, play, arg3); } return false; @@ -545,11 +545,11 @@ void EnGe1_BeginGiveItem_Archery(EnGe1* this, PlayState* play) { } void EnGe1_TalkWinPrize_Archery(EnGe1* this, PlayState* play) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->actionFunc = EnGe1_BeginGiveItem_Archery; this->actor.flags &= ~ACTOR_FLAG_16; } else { - func_8002F2CC(&this->actor, play, 200.0f); + Actor_OfferTalk(&this->actor, play, 200.0f); } } @@ -616,10 +616,10 @@ void EnGe1_TalkOfferPlay_Archery(EnGe1* this, PlayState* play) { } void EnGe1_TalkNoPrize_Archery(EnGe1* this, PlayState* play) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->actionFunc = EnGe1_TalkOfferPlay_Archery; } else { - func_8002F2CC(&this->actor, play, 300.0f); + Actor_OfferTalk(&this->actor, play, 300.0f); } } diff --git a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c index 9605b142ba..91410c1a21 100644 --- a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c +++ b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c @@ -466,12 +466,12 @@ void EnGe2_GiveCard(EnGe2* this, PlayState* play) { void EnGe2_ForceTalk(EnGe2* this, PlayState* play) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->actionFunc = EnGe2_GiveCard; } else { this->actor.textId = 0x6004; this->actor.flags |= ACTOR_FLAG_16; - func_8002F1C4(&this->actor, play, 300.0f, 300.0f, EXCH_ITEM_NONE); + Actor_OfferTalkExchange(&this->actor, play, 300.0f, 300.0f, EXCH_ITEM_NONE); } EnGe2_LookAtPlayer(this, play); } @@ -519,7 +519,7 @@ void EnGe2_UpdateFriendly(Actor* thisx, PlayState* play) { EnGe2_MaintainColliderAndSetAnimState(this, play); this->actionFunc(this, play); - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { if ((this->actor.params & 0xFF) == GE2_TYPE_PATROLLING) { this->actor.speed = 0.0f; EnGe2_ChangeAction(this, GE2_ACTION_WAITLOOKATPLAYER); @@ -530,7 +530,7 @@ void EnGe2_UpdateFriendly(Actor* thisx, PlayState* play) { this->actor.textId = 0x6005; if (this->actor.xzDistToPlayer < 100.0f) { - func_8002F2CC(&this->actor, play, 100.0f); + Actor_OfferTalk(&this->actor, play, 100.0f); } } EnGe2_MoveAndBlink(this, play); diff --git a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c index 84bee337ec..0f3e0d480e 100644 --- a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c +++ b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c @@ -155,7 +155,7 @@ void EnGe3_GiveCard(EnGe3* this, PlayState* play) { } void EnGe3_ForceTalk(EnGe3* this, PlayState* play) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->actionFunc = EnGe3_GiveCard; } else { if (!(this->unk_30C & 4)) { @@ -164,7 +164,7 @@ void EnGe3_ForceTalk(EnGe3* this, PlayState* play) { } this->actor.textId = 0x6004; this->actor.flags |= ACTOR_FLAG_16; - func_8002F1C4(&this->actor, play, 300.0f, 300.0f, EXCH_ITEM_NONE); + Actor_OfferTalkExchange(&this->actor, play, 300.0f, 300.0f, EXCH_ITEM_NONE); } EnGe3_LookAtPlayer(this, play); } @@ -203,13 +203,13 @@ void EnGe3_UpdateWhenNotTalking(Actor* thisx, PlayState* play) { EnGe3_UpdateCollision(this, play); this->actionFunc(this, play); - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->actionFunc = EnGe3_Wait; this->actor.update = EnGe3_Update; } else { this->actor.textId = 0x6005; if (this->actor.xzDistToPlayer < 100.0f) { - func_8002F2CC(&this->actor, play, 100.0f); + Actor_OfferTalk(&this->actor, play, 100.0f); } } diff --git a/src/overlays/actors/ovl_En_Gm/z_en_gm.c b/src/overlays/actors/ovl_En_Gm/z_en_gm.c index 0cd98ed0c3..ec0821cf7d 100644 --- a/src/overlays/actors/ovl_En_Gm/z_en_gm.c +++ b/src/overlays/actors/ovl_En_Gm/z_en_gm.c @@ -174,11 +174,11 @@ void func_80A3DB04(EnGm* this, PlayState* play) { if (Flags_GetSwitch(play, this->actor.params)) { EnGm_SetTextID(this); this->actionFunc = func_80A3DC44; - } else if (Actor_ProcessTalkRequest(&this->actor, play)) { + } else if (Actor_TalkOfferAccepted(&this->actor, play)) { this->actionFunc = func_80A3DBF4; } else if ((this->collider.base.ocFlags1 & OC1_HIT) || (SQ(dx) + SQ(dz)) < SQ(100.0f)) { this->collider.base.acFlags &= ~AC_HIT; - func_8002F2CC(&this->actor, play, 415.0f); + Actor_OfferTalk(&this->actor, play, 415.0f); } } @@ -199,7 +199,7 @@ void func_80A3DC44(EnGm* this, PlayState* play) { dx = this->talkPos.x - player->actor.world.pos.x; dz = this->talkPos.z - player->actor.world.pos.z; - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { switch (func_80A3D7C8()) { case 0: SET_INFTABLE(INFTABLE_B0); @@ -221,7 +221,7 @@ void func_80A3DC44(EnGm* this, PlayState* play) { } if ((this->collider.base.ocFlags1 & OC1_HIT) || (SQ(dx) + SQ(dz)) < SQ(100.0f)) { this->collider.base.acFlags &= ~AC_HIT; - func_8002F2CC(&this->actor, play, 415.0f); + Actor_OfferTalk(&this->actor, play, 415.0f); } } diff --git a/src/overlays/actors/ovl_En_Go/z_en_go.c b/src/overlays/actors/ovl_En_Go/z_en_go.c index 3f8cfc0d8e..529e7de4ae 100644 --- a/src/overlays/actors/ovl_En_Go/z_en_go.c +++ b/src/overlays/actors/ovl_En_Go/z_en_go.c @@ -338,10 +338,10 @@ s32 EnGo_UpdateTalking(PlayState* play, Actor* thisx, s16* talkState, f32 intera if (*talkState != NPC_TALK_STATE_IDLE) { *talkState = updateTalkState(play, thisx); return false; - } else if (Actor_ProcessTalkRequest(thisx, play)) { + } else if (Actor_TalkOfferAccepted(thisx, play)) { *talkState = NPC_TALK_STATE_TALKING; return true; - } else if (!func_8002F2CC(thisx, play, interactRange)) { + } else if (!Actor_OfferTalk(thisx, play, interactRange)) { return false; } else { thisx->textId = getTextId(play, thisx); diff --git a/src/overlays/actors/ovl_En_Go2/z_en_go2.c b/src/overlays/actors/ovl_En_Go2/z_en_go2.c index 3fd71314db..51e8dcbb14 100644 --- a/src/overlays/actors/ovl_En_Go2/z_en_go2.c +++ b/src/overlays/actors/ovl_En_Go2/z_en_go2.c @@ -812,7 +812,7 @@ s16 EnGo2_UpdateTalkState(PlayState* play, Actor* thisx) { return EnGo2_UpdateTalkStateGoronMarketBazaar(play, this); } #ifdef AVOID_UB - // The v0 register isn't set in this function, the last value in v0 is the return value of Actor_ProcessTalkRequest + // The v0 register isn't set in this function, the last value in v0 is the return value of Actor_TalkOfferAccepted // called in the function below, which must be false for this function to be called return false; #endif @@ -826,13 +826,13 @@ s32 func_80A44790(EnGo2* this, PlayState* play) { !(this->collider.base.ocFlags2 & OC2_HIT_PLAYER)) { return false; } else { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->interactInfo.talkState = NPC_TALK_STATE_TALKING; return true; } else if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) { this->interactInfo.talkState = EnGo2_UpdateTalkState(play, &this->actor); return false; - } else if (func_8002F2CC(&this->actor, play, this->interactRange)) { + } else if (Actor_OfferTalk(&this->actor, play, this->interactRange)) { this->actor.textId = EnGo2_GetTextId(play, &this->actor); } return false; diff --git a/src/overlays/actors/ovl_En_Gs/z_en_gs.c b/src/overlays/actors/ovl_En_Gs/z_en_gs.c index 3bc1c52911..5068760a8b 100644 --- a/src/overlays/actors/ovl_En_Gs/z_en_gs.c +++ b/src/overlays/actors/ovl_En_Gs/z_en_gs.c @@ -180,12 +180,12 @@ void func_80A4E648(EnGs* this, PlayState* play) { this->unk_19C = 2; } else if (this->unk_19C == 2) { this->unk_19C = func_80A4E3EC(this, play); - } else if (Actor_ProcessTalkRequest(&this->actor, play)) { + } else if (Actor_TalkOfferAccepted(&this->actor, play)) { this->unk_19C = 2; } else { Actor_GetScreenPos(play, &this->actor, &sp26, &sp24); if ((sp26 >= 0) && (sp26 <= SCREEN_WIDTH) && (sp24 >= 0) && (sp24 <= SCREEN_HEIGHT) && (this->unk_19C != 3)) { - if (func_8002F2CC(&this->actor, play, 40.0f) == 1) { + if (Actor_OfferTalk(&this->actor, play, 40.0f) == 1) { if (Player_GetMask(play) == PLAYER_MASK_TRUTH) { this->actor.textId = 0x2054; } else { diff --git a/src/overlays/actors/ovl_En_Guest/z_en_guest.c b/src/overlays/actors/ovl_En_Guest/z_en_guest.c index a03504939e..0e6d749692 100644 --- a/src/overlays/actors/ovl_En_Guest/z_en_guest.c +++ b/src/overlays/actors/ovl_En_Guest/z_en_guest.c @@ -126,10 +126,10 @@ void func_80A5046C(EnGuest* this) { } void func_80A50518(EnGuest* this, PlayState* play) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->actionFunc = func_80A5057C; } else if (this->actor.xzDistToPlayer < 100.0f) { - func_8002F2CC(&this->actor, play, 100.0f); + Actor_OfferTalk(&this->actor, play, 100.0f); } } diff --git a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c index 4dc069363b..c1df3c75e8 100644 --- a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c +++ b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c @@ -401,7 +401,7 @@ void func_80A53AD4(EnHeishi2* this, PlayState* play) { this->actor.textId = 0x200E; } this->unk_300 = TEXT_STATE_DONE; - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { exchangeItemId = func_8002F368(play); if (exchangeItemId == EXCH_ITEM_ZELDAS_LETTER) { Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME); @@ -415,7 +415,7 @@ void func_80A53AD4(EnHeishi2* this, PlayState* play) { yawDiffTemp = this->actor.yawTowardsPlayer - this->actor.shape.rot.y; yawDiff = ABS(yawDiffTemp); if (!(120.0f < this->actor.xzDistToPlayer) && (yawDiff < 0x4300)) { - func_8002F298(&this->actor, play, 100.0f, EXCH_ITEM_ZELDAS_LETTER); + Actor_OfferTalkExchangeEquiCylinder(&this->actor, play, 100.0f, EXCH_ITEM_ZELDAS_LETTER); } } } @@ -705,7 +705,7 @@ void func_80A5475C(EnHeishi2* this, PlayState* play) { } } - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { if (this->type == 2) { if (this->unk_30E == 1) { this->actionFunc = func_80A5344C; @@ -736,7 +736,7 @@ void func_80A5475C(EnHeishi2* this, PlayState* play) { ((yawDiff = ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)), !(this->actor.xzDistToPlayer > 120.0f)) && (yawDiff < 0x4300))) { - func_8002F2F4(&this->actor, play); + Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play); } } diff --git a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c index 583adeeed6..5f1713993a 100644 --- a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c +++ b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c @@ -241,7 +241,7 @@ void func_80A56874(EnHeishi4* this, PlayState* play) { if (this->unk_284 != 0) { SkelAnime_Update(&this->skelAnime); } - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { if (this->unk_284 == 0) { this->actionFunc = func_80A5673C; @@ -249,7 +249,7 @@ void func_80A56874(EnHeishi4* this, PlayState* play) { this->actionFunc = func_80A56900; } } else { - func_8002F2CC(&this->actor, play, 100.0f); + Actor_OfferTalk(&this->actor, play, 100.0f); } } @@ -323,7 +323,7 @@ void func_80A56B40(EnHeishi4* this, PlayState* play) { } } } - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { if ((this->type == HEISHI4_AT_KAKRIKO_ENTRANCE) || (this->type == HEISHI4_AT_IMPAS_HOUSE)) { this->unk_284 = 1; this->actionFunc = func_80A563BC; @@ -334,7 +334,7 @@ void func_80A56B40(EnHeishi4* this, PlayState* play) { return; } } - func_8002F2F4(&this->actor, play); + Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play); } void EnHeishi4_Update(Actor* thisx, PlayState* play) { diff --git a/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c b/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c index d079088c5b..a65a8e7312 100644 --- a/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c +++ b/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c @@ -330,7 +330,7 @@ void EnHintnuts_CheckProximity(EnHintnuts* this, PlayState* play) { } if (this->actor.xzDistToPlayer < 130.0f) { this->actor.textId = this->textIdCopy; - func_8002F2F4(&this->actor, play); + Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play); } } } @@ -371,7 +371,7 @@ void EnHintnuts_Run(EnHintnuts* this, PlayState* play) { } this->actor.shape.rot.y = this->actor.world.rot.y + 0x8000; - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { EnHintnuts_SetupTalk(this); } else if (this->animFlagAndTimer == 0 && Actor_WorldDistXZToPoint(&this->actor, &this->actor.home.pos) < 20.0f && fabsf(this->actor.world.pos.y - this->actor.home.pos.y) < 2.0f) { diff --git a/src/overlays/actors/ovl_En_Horse/z_en_horse.c b/src/overlays/actors/ovl_En_Horse/z_en_horse.c index cec62e8357..91d391fe10 100644 --- a/src/overlays/actors/ovl_En_Horse/z_en_horse.c +++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.c @@ -722,7 +722,8 @@ s32 EnHorse_PlayerCanMove(EnHorse* this, PlayState* play) { if ((player->stateFlags1 & PLAYER_STATE1_0) || func_8002DD78(GET_PLAYER(play)) == 1 || (player->stateFlags1 & PLAYER_STATE1_20) || ((this->stateFlags & ENHORSE_FLAG_19) && !this->inRace) || - this->action == ENHORSE_ACT_HBA || player->actor.flags & ACTOR_FLAG_8 || play->csCtx.state != CS_STATE_IDLE) { + this->action == ENHORSE_ACT_HBA || player->actor.flags & ACTOR_FLAG_TALK || + play->csCtx.state != CS_STATE_IDLE) { return false; } return true; @@ -1537,7 +1538,7 @@ void EnHorse_Reverse(EnHorse* this, PlayState* play) { } else if (stickMag < 10.0f) { stickAngle = -0x7FFF; } - } else if (player->actor.flags & ACTOR_FLAG_8) { + } else if (player->actor.flags & ACTOR_FLAG_TALK) { EnHorse_StartMountedIdleResetAnim(this); this->actor.speed = 0.0f; return; diff --git a/src/overlays/actors/ovl_En_Hs/z_en_hs.c b/src/overlays/actors/ovl_En_Hs/z_en_hs.c index ac1c6c8633..681ea2b558 100644 --- a/src/overlays/actors/ovl_En_Hs/z_en_hs.c +++ b/src/overlays/actors/ovl_En_Hs/z_en_hs.c @@ -101,7 +101,7 @@ void EnHs_Destroy(Actor* thisx, PlayState* play) { s32 func_80A6E53C(EnHs* this, PlayState* play, u16 textId, EnHsActionFunc actionFunc) { s16 yawDiff; - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { func_80A6E3A0(this, actionFunc); return 1; } @@ -110,7 +110,7 @@ s32 func_80A6E53C(EnHs* this, PlayState* play, u16 textId, EnHsActionFunc action yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y; if ((ABS(yawDiff) <= 0x2150) && (this->actor.xzDistToPlayer < 100.0f)) { this->unk_2A8 |= 1; - func_8002F2CC(&this->actor, play, 100.0f); + Actor_OfferTalk(&this->actor, play, 100.0f); } return 0; @@ -205,7 +205,7 @@ void func_80A6E9AC(EnHs* this, PlayState* play) { Player* player = GET_PLAYER(play); s16 yawDiff; - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { if (func_8002F368(play) == EXCH_ITEM_COJIRO) { player->actor.textId = 0x10B2; func_80A6E3A0(this, func_80A6E8CC); @@ -221,7 +221,7 @@ void func_80A6E9AC(EnHs* this, PlayState* play) { yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y; this->actor.textId = 0x10B1; if ((ABS(yawDiff) <= 0x2150) && (this->actor.xzDistToPlayer < 100.0f)) { - func_8002F298(&this->actor, play, 100.0f, EXCH_ITEM_COJIRO); + Actor_OfferTalkExchangeEquiCylinder(&this->actor, play, 100.0f, EXCH_ITEM_COJIRO); } } } diff --git a/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c b/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c index d7bc8d45c9..27e8ee2d33 100644 --- a/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c +++ b/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c @@ -73,7 +73,7 @@ void EnHs2_Destroy(Actor* thisx, PlayState* play) { } s32 func_80A6F0B4(EnHs2* this, PlayState* play, u16 textId, EnHs2ActionFunc actionFunc) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->actionFunc = actionFunc; return 1; } @@ -82,7 +82,7 @@ s32 func_80A6F0B4(EnHs2* this, PlayState* play, u16 textId, EnHs2ActionFunc acti if (ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)) < 0x2151 && this->actor.xzDistToPlayer < 100.0f) { this->unk_2A8 |= 0x1; - func_8002F2CC(&this->actor, play, 100.0f); + Actor_OfferTalk(&this->actor, play, 100.0f); } return 0; } diff --git a/src/overlays/actors/ovl_En_In/z_en_in.c b/src/overlays/actors/ovl_En_In/z_en_in.c index 1a14d90972..5052ea9894 100644 --- a/src/overlays/actors/ovl_En_In/z_en_in.c +++ b/src/overlays/actors/ovl_En_In/z_en_in.c @@ -937,7 +937,7 @@ void EnIn_Update(Actor* thisx, PlayState* play) { func_80A79AB4(this, play); if ((gSaveContext.subTimerSeconds < 6) && (gSaveContext.subTimerState != SUBTIMER_STATE_OFF) && this->interactInfo.talkState == NPC_TALK_STATE_IDLE) { - if (Actor_ProcessTalkRequest(&this->actor, play)) {} + if (Actor_TalkOfferAccepted(&this->actor, play)) {} } else { Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, ((this->actor.targetMode == 6) ? 80.0f : 320.0f) + this->collider.dim.radius, diff --git a/src/overlays/actors/ovl_En_Js/z_en_js.c b/src/overlays/actors/ovl_En_Js/z_en_js.c index ba9d10be7e..9f1766c904 100644 --- a/src/overlays/actors/ovl_En_Js/z_en_js.c +++ b/src/overlays/actors/ovl_En_Js/z_en_js.c @@ -80,7 +80,7 @@ void EnJs_Destroy(Actor* thisx, PlayState* play) { u8 func_80A88F64(EnJs* this, PlayState* play, u16 textId) { s16 yawDiff; - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { return 1; } else { this->actor.textId = textId; @@ -88,7 +88,7 @@ u8 func_80A88F64(EnJs* this, PlayState* play, u16 textId) { if (ABS(yawDiff) <= 0x1800 && this->actor.xzDistToPlayer < 100.0f) { this->unk_284 |= 1; - func_8002F2CC(&this->actor, play, 100.0f); + Actor_OfferTalk(&this->actor, play, 100.0f); } return 0; } @@ -108,10 +108,10 @@ void func_80A89078(EnJs* this, PlayState* play) { } void func_80A890C0(EnJs* this, PlayState* play) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { En_Js_SetupAction(this, func_80A89078); } else { - func_8002F2CC(&this->actor, play, 1000.0f); + Actor_OfferTalk(&this->actor, play, 1000.0f); } } diff --git a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c index 9a4c646b8f..a4b691936f 100644 --- a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c +++ b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c @@ -198,7 +198,7 @@ void func_80A8F75C(EnKakasi* this, PlayState* play) { func_80A8F28C(this); SkelAnime_Update(&this->skelanime); this->subCamId = CAM_ID_NONE; - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { if (this->unk_196 == TEXT_STATE_EVENT) { this->actionFunc = func_80A8F9C8; } else { @@ -226,7 +226,7 @@ void func_80A8F75C(EnKakasi* this, PlayState* play) { player->stateFlags2 |= PLAYER_STATE2_23; } } - func_8002F2CC(&this->actor, play, 100.0f); + Actor_OfferTalk(&this->actor, play, 100.0f); } } } diff --git a/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c b/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c index 182a6d6298..0c2e50df62 100644 --- a/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c +++ b/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c @@ -212,7 +212,7 @@ void func_80A91348(EnKakasi3* this, PlayState* play) { func_80A90E28(this); SkelAnime_Update(&this->skelAnime); this->subCamId = CAM_ID_NONE; - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { if (!this->unk_194) { if (this->unk_1A8 == 0) { this->actionFunc = func_80A91284; @@ -260,7 +260,7 @@ void func_80A91348(EnKakasi3* this, PlayState* play) { player->stateFlags2 |= PLAYER_STATE2_23; } } - func_8002F2CC(&this->actor, play, 100.0f); + Actor_OfferTalk(&this->actor, play, 100.0f); } } } diff --git a/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c b/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c index 8b780eb645..273c0f52d6 100644 --- a/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c +++ b/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c @@ -246,10 +246,10 @@ void EnKanban_Message(EnKanban* this, PlayState* play) { if (!this->msgFlag) { if (this->msgTimer == 0) { if (ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)) < 0x2800) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->msgFlag = true; } else { - func_8002F2CC(&this->actor, play, 68.0f); + Actor_OfferTalk(&this->actor, play, 68.0f); } } } else { diff --git a/src/overlays/actors/ovl_En_Kz/z_en_kz.c b/src/overlays/actors/ovl_En_Kz/z_en_kz.c index 05430e8494..1ebc9d0f37 100644 --- a/src/overlays/actors/ovl_En_Kz/z_en_kz.c +++ b/src/overlays/actors/ovl_En_Kz/z_en_kz.c @@ -201,7 +201,7 @@ s32 EnKz_UpdateTalking(PlayState* play, Actor* thisx, s16* talkState, f32 intera f32 xzDistToPlayer; f32 yaw; - if (Actor_ProcessTalkRequest(thisx, play)) { + if (Actor_TalkOfferAccepted(thisx, play)) { *talkState = NPC_TALK_STATE_TALKING; return true; } @@ -227,7 +227,7 @@ s32 EnKz_UpdateTalking(PlayState* play, Actor* thisx, s16* talkState, f32 intera xzDistToPlayer = thisx->xzDistToPlayer; thisx->xzDistToPlayer = Math_Vec3f_DistXZ(&thisx->home.pos, &player->actor.world.pos); - if (func_8002F2CC(thisx, play, interactRange) == 0) { + if (Actor_OfferTalk(thisx, play, interactRange) == 0) { thisx->xzDistToPlayer = xzDistToPlayer; return false; } diff --git a/src/overlays/actors/ovl_En_Md/z_en_md.c b/src/overlays/actors/ovl_En_Md/z_en_md.c index e57d577a28..1f65d106d3 100644 --- a/src/overlays/actors/ovl_En_Md/z_en_md.c +++ b/src/overlays/actors/ovl_En_Md/z_en_md.c @@ -785,7 +785,7 @@ void func_80AABC10(EnMd* this, PlayState* play) { Audio_PlaySfxGeneral(NA_SE_SY_CORRECT_CHIME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb); this->actor.textId = 0x1067; - func_8002F2CC(&this->actor, play, this->collider.dim.radius + 30.0f); + Actor_OfferTalk(&this->actor, play, this->collider.dim.radius + 30.0f); this->actionFunc = func_80AAB948; play->msgCtx.ocarinaMode = OCARINA_MODE_04; diff --git a/src/overlays/actors/ovl_En_Mk/z_en_mk.c b/src/overlays/actors/ovl_En_Mk/z_en_mk.c index 210f36751a..b81a9a88a3 100644 --- a/src/overlays/actors/ovl_En_Mk/z_en_mk.c +++ b/src/overlays/actors/ovl_En_Mk/z_en_mk.c @@ -107,7 +107,7 @@ void func_80AACB14(EnMk* this, PlayState* play) { } void func_80AACB6C(EnMk* this, PlayState* play) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->actionFunc = func_80AACB14; } @@ -215,7 +215,7 @@ void EnMk_Wait(EnMk* this, PlayState* play) { Player* player = GET_PLAYER(play); s32 playerExchangeItem; - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { playerExchangeItem = func_8002F368(play); if (this->actor.textId != 0x4018) { @@ -273,7 +273,7 @@ void EnMk_Wait(EnMk* this, PlayState* play) { angle = this->actor.yawTowardsPlayer - this->actor.shape.rot.y; if ((ABS(angle) < 0x2151) && (this->actor.xzDistToPlayer < 100.0f)) { - func_8002F298(&this->actor, play, 100.0f, EXCH_ITEM_EYEBALL_FROG); + Actor_OfferTalkExchangeEquiCylinder(&this->actor, play, 100.0f, EXCH_ITEM_EYEBALL_FROG); this->flags |= 1; } } diff --git a/src/overlays/actors/ovl_En_Mm/z_en_mm.c b/src/overlays/actors/ovl_En_Mm/z_en_mm.c index 53a5c4a4d9..034cfed9f5 100644 --- a/src/overlays/actors/ovl_En_Mm/z_en_mm.c +++ b/src/overlays/actors/ovl_En_Mm/z_en_mm.c @@ -288,7 +288,7 @@ void func_80AADCD0(EnMm* this, PlayState* play) { } else if (this->unk_1E0 == 1) { this->unk_1E0 = func_80AADAA0(this, play); } else { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->unk_1E0 = 1; if (this->curAnimIndex != 5) { @@ -302,7 +302,7 @@ void func_80AADCD0(EnMm* this, PlayState* play) { yawDiff = ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)); if ((sp26 >= 0) && (sp26 <= 0x140) && (sp24 >= 0) && (sp24 <= 0xF0) && (yawDiff <= 17152.0f) && - (this->unk_1E0 != 3) && func_8002F2CC(&this->actor, play, 100.0f)) { + (this->unk_1E0 != 3) && Actor_OfferTalk(&this->actor, play, 100.0f)) { this->actor.textId = EnMm_GetTextId(this, play); } } diff --git a/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c b/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c index 07a5a5eae5..d36c0ed3d0 100644 --- a/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c +++ b/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c @@ -165,13 +165,13 @@ void EnMm2_Destroy(Actor* thisx, PlayState* play) { s32 func_80AAF224(EnMm2* this, PlayState* play, EnMm2ActionFunc actionFunc) { s16 yawDiff; - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->actionFunc = actionFunc; return 1; } yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y; if ((ABS(yawDiff) <= 0x4300) && (this->actor.xzDistToPlayer < 100.0f)) { - func_8002F2CC(&this->actor, play, 100.0f); + Actor_OfferTalk(&this->actor, play, 100.0f); } return 0; } diff --git a/src/overlays/actors/ovl_En_Ms/z_en_ms.c b/src/overlays/actors/ovl_En_Ms/z_en_ms.c index e834756ff0..725e497f4e 100644 --- a/src/overlays/actors/ovl_En_Ms/z_en_ms.c +++ b/src/overlays/actors/ovl_En_Ms/z_en_ms.c @@ -106,10 +106,10 @@ void EnMs_Wait(EnMs* this, PlayState* play) { yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y; EnMs_SetOfferText(this, play); - if (Actor_ProcessTalkRequest(&this->actor, play)) { // if talk is initiated + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->actionFunc = EnMs_Talk; } else if ((this->actor.xzDistToPlayer < 90.0f) && (ABS(yawDiff) < 0x2000)) { // talk range - func_8002F2CC(&this->actor, play, 90.0f); + Actor_OfferTalk(&this->actor, play, 90.0f); } } diff --git a/src/overlays/actors/ovl_En_Nb/z_en_nb.c b/src/overlays/actors/ovl_En_Nb/z_en_nb.c index f79c656387..dc4991b460 100644 --- a/src/overlays/actors/ovl_En_Nb/z_en_nb.c +++ b/src/overlays/actors/ovl_En_Nb/z_en_nb.c @@ -1207,7 +1207,7 @@ void EnNb_SetupIdleCrawlspace(EnNb* this, s32 animFinished) { } void func_80AB3838(EnNb* this, PlayState* play) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->action = NB_IN_DIALOG; } else { this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; @@ -1218,7 +1218,7 @@ void func_80AB3838(EnNb* this, PlayState* play) { this->actor.textId = 0x6024; } - func_8002F2F4(&this->actor, play); + Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play); } } @@ -1299,7 +1299,7 @@ void func_80AB3A7C(EnNb* this, PlayState* play, s32 animFinished) { } void func_80AB3B04(EnNb* this, PlayState* play) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->action = NB_ACTION_30; } else { this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; @@ -1309,7 +1309,7 @@ void func_80AB3B04(EnNb* this, PlayState* play) { this->actor.textId = 0x6026; } - func_8002F2F4(&this->actor, play); + Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play); } } diff --git a/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c b/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c index e3e51fbde4..174b0b5747 100644 --- a/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c +++ b/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c @@ -170,7 +170,7 @@ void func_80AB94D0(EnNiwGirl* this, PlayState* play) { this->chasedEnNiw->path = 0; } Math_ApproachZeroF(&this->actor.speed, 0.8f, 0.2f); - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { if (this->actor.textId == 0x70EA) { this->unk_27A = 1; } @@ -179,7 +179,7 @@ void func_80AB94D0(EnNiwGirl* this, PlayState* play) { this->jumpTimer = Rand_ZeroFloat(100.0f) + 250.0f; this->actionFunc = EnNiwGirl_Jump; } else { - func_8002F2CC(&this->actor, play, 100.0f); + Actor_OfferTalk(&this->actor, play, 100.0f); } } } diff --git a/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c b/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c index dc4d97ef79..c97c7f33e3 100644 --- a/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c +++ b/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c @@ -249,7 +249,7 @@ void func_80ABA244(EnNiwLady* this, PlayState* play) { phi_s1 = 10; this->unk_26E = 11; } - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { osSyncPrintf("\n\n"); osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ ねぇちゃん選択\t ☆☆☆☆ %d\n" VT_RST, phi_s1); osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ ねぇちゃんハート ☆☆☆☆ %d\n" VT_RST, this->unk_26C); @@ -296,7 +296,7 @@ void func_80ABA244(EnNiwLady* this, PlayState* play) { } } } else { - func_8002F2CC(&this->actor, play, 100.0f); + Actor_OfferTalk(&this->actor, play, 100.0f); } } @@ -364,7 +364,7 @@ void func_80ABA878(EnNiwLady* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) || (Message_GetState(&play->msgCtx) == TEXT_STATE_DONE)) { this->unk_26E = 11; } - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { playerExchangeItemId = func_8002F368(play); if ((playerExchangeItemId == EXCH_ITEM_POCKET_CUCCO) && GET_EVENTCHKINF(EVENTCHKINF_TALON_WOKEN_IN_KAKARIKO)) { Sfx_PlaySfxCentered(NA_SE_SY_TRE_BOX_APPEAR); @@ -381,7 +381,7 @@ void func_80ABA878(EnNiwLady* this, PlayState* play) { this->actionFunc = !this->unk_273 ? func_80ABA778 : func_80ABA9B8; } } else { - func_8002F298(&this->actor, play, 50.0f, EXCH_ITEM_POCKET_CUCCO); + Actor_OfferTalkExchangeEquiCylinder(&this->actor, play, 50.0f, EXCH_ITEM_POCKET_CUCCO); } } @@ -482,12 +482,12 @@ void func_80ABAD7C(EnNiwLady* this, PlayState* play) { if ((Message_GetState(&play->msgCtx) == TEXT_STATE_NONE) || (Message_GetState(&play->msgCtx) == TEXT_STATE_DONE)) { this->unk_26E = 8; } - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->unk_274 = 1; this->unk_26E = this->unk_27A + 9; this->actionFunc = func_80ABAD38; } else { - func_8002F2CC(&this->actor, play, 100.0f); + Actor_OfferTalk(&this->actor, play, 100.0f); } } diff --git a/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c b/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c index 1e01c6a668..f6a21f0195 100644 --- a/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c +++ b/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c @@ -282,7 +282,7 @@ void func_80ABF708(EnOkarinaTag* this, PlayState* play) { s16 yawDiff; s16 yawDiffNew; - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->actionFunc = func_80ABF7CC; } else { yawDiff = this->actor.yawTowardsPlayer - this->actor.world.rot.y; @@ -294,7 +294,7 @@ void func_80ABF708(EnOkarinaTag* this, PlayState* play) { yawDiffNew = ABS(yawDiff); if (yawDiffNew < 0x4300) { this->unk_15A = 0; - func_8002F2CC(&this->actor, play, 70.0f); + Actor_OfferTalk(&this->actor, play, 70.0f); } } } diff --git a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c index ca1ba8f4c7..47f452d44f 100644 --- a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c +++ b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c @@ -649,7 +649,7 @@ void EnOssan_EndInteraction(PlayState* play, EnOssan* this) { // "End of conversation!" osSyncPrintf(VT_FGCOL(YELLOW) "%s[%d]:★★★ 会話終了!! ★★★" VT_RST "\n", "../z_en_oB1.c", 1337); YREG(31) = 0; - Actor_ProcessTalkRequest(&this->actor, play); + Actor_TalkOfferAccepted(&this->actor, play); play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING; play->msgCtx.stateTimer = 4; player->stateFlags2 &= ~PLAYER_STATE2_29; @@ -733,14 +733,14 @@ void EnOssan_SetLookToShopkeeperFromShelf(PlayState* play, EnOssan* this) { void EnOssan_State_Idle(EnOssan* this, PlayState* play, Player* player) { this->headTargetRot = this->actor.yawTowardsPlayer - this->actor.shape.rot.y; - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { // "Start conversation!!" osSyncPrintf(VT_FGCOL(YELLOW) "★★★ 会話開始!! ★★★" VT_RST "\n"); player->stateFlags2 |= PLAYER_STATE2_29; Play_SetShopBrowsingViewpoint(play); EnOssan_SetStateStartShopping(play, this, false); } else if (this->actor.xzDistToPlayer < 100.0f) { - func_8002F2CC(&this->actor, play, 100); + Actor_OfferTalk(&this->actor, play, 100); } } @@ -1699,7 +1699,7 @@ void EnOssan_State_ContinueShoppingPrompt(EnOssan* this, PlayState* play, Player Play_SetViewpoint(play, VIEWPOINT_PIVOT); Message_StartTextbox(play, this->actor.textId, &this->actor); EnOssan_SetStateStartShopping(play, this, true); - func_8002F298(&this->actor, play, 100.0f, -1); + Actor_OfferTalkExchangeEquiCylinder(&this->actor, play, 100.0f, -1); break; case 1: default: @@ -1718,7 +1718,7 @@ void EnOssan_State_ContinueShoppingPrompt(EnOssan* this, PlayState* play, Player Play_SetViewpoint(play, VIEWPOINT_PIVOT); Message_StartTextbox(play, this->actor.textId, &this->actor); EnOssan_SetStateStartShopping(play, this, true); - func_8002F298(&this->actor, play, 100.0f, -1); + Actor_OfferTalkExchangeEquiCylinder(&this->actor, play, 100.0f, -1); } } diff --git a/src/overlays/actors/ovl_En_Owl/z_en_owl.c b/src/overlays/actors/ovl_En_Owl/z_en_owl.c index 6ad26d1a1d..bfc68d51b4 100644 --- a/src/overlays/actors/ovl_En_Owl/z_en_owl.c +++ b/src/overlays/actors/ovl_En_Owl/z_en_owl.c @@ -257,7 +257,7 @@ s32 EnOwl_CheckInitTalk(EnOwl* this, PlayState* play, u16 textId, f32 targetDist s32 timer; f32 distCheck; - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { if (this->actor.params == 0xFFF) { this->actionFlags |= 0x40; timer = -100; @@ -277,19 +277,19 @@ s32 EnOwl_CheckInitTalk(EnOwl* this, PlayState* play, u16 textId, f32 targetDist distCheck = (flags & 2) ? 200.0f : 1000.0f; if (this->actor.xzDistToPlayer < targetDist) { this->actor.flags |= ACTOR_FLAG_16; - func_8002F1C4(&this->actor, play, targetDist, distCheck, EXCH_ITEM_NONE); + Actor_OfferTalkExchange(&this->actor, play, targetDist, distCheck, EXCH_ITEM_NONE); } return false; } } s32 func_80ACA558(EnOwl* this, PlayState* play, u16 textId) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { return true; } else { this->actor.textId = textId; if (this->actor.xzDistToPlayer < 120.0f) { - func_8002F1C4(&this->actor, play, 350.0f, 1000.0f, EXCH_ITEM_NONE); + Actor_OfferTalkExchange(&this->actor, play, 350.0f, 1000.0f, EXCH_ITEM_NONE); } return false; } diff --git a/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c b/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c index 6ac3ccc9ba..d77d5be7da 100644 --- a/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c +++ b/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c @@ -646,7 +646,7 @@ void func_80AD58D4(EnPoField* this, PlayState* play) { if (this->actionTimer != 0) { this->actionTimer--; } - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { EnPoField_SetupInteractWithSoul(this); return; } @@ -658,7 +658,7 @@ void func_80AD58D4(EnPoField* this, PlayState* play) { } if (this->collider.base.ocFlags1 & OC1_HIT) { this->actor.flags |= ACTOR_FLAG_16; - func_8002F2F4(&this->actor, play); + Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play); } else { this->actor.flags &= ~ACTOR_FLAG_16; CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); diff --git a/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c b/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c index 0b1343767b..8cc9f02032 100644 --- a/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c +++ b/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c @@ -159,13 +159,13 @@ void EnPoRelay_CorrectY(EnPoRelay* this) { void EnPoRelay_Idle(EnPoRelay* this, PlayState* play) { Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0x100); - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->actor.flags &= ~ACTOR_FLAG_16; this->actionFunc = EnPoRelay_Talk; } else if (this->actor.xzDistToPlayer < 250.0f) { this->actor.flags |= ACTOR_FLAG_16; this->actor.textId = this->textId; - func_8002F2CC(&this->actor, play, 250.0f); + Actor_OfferTalk(&this->actor, play, 250.0f); } func_8002F974(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); } @@ -254,14 +254,14 @@ void EnPoRelay_Race(EnPoRelay* this, PlayState* play) { void EnPoRelay_EndRace(EnPoRelay* this, PlayState* play) { Math_ScaledStepToS(&this->actor.shape.rot.y, -0x4000, 0x800); - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->actionFunc = EnPoRelay_Talk2; } else if (play->roomCtx.curRoom.num == 5) { Actor_Kill(&this->actor); gSaveContext.timerState = TIMER_STATE_OFF; } else if (Actor_IsFacingAndNearPlayer(&this->actor, 150.0f, 0x3000)) { this->actor.textId = this->textId; - func_8002F2CC(&this->actor, play, 250.0f); + Actor_OfferTalk(&this->actor, play, 250.0f); } func_8002F974(&this->actor, NA_SE_EN_PO_FLY - SFX_FLAG); } diff --git a/src/overlays/actors/ovl_En_Poh/z_en_poh.c b/src/overlays/actors/ovl_En_Poh/z_en_poh.c index 3eb04385e4..e560308572 100644 --- a/src/overlays/actors/ovl_En_Poh/z_en_poh.c +++ b/src/overlays/actors/ovl_En_Poh/z_en_poh.c @@ -763,7 +763,7 @@ void func_80ADFE80(EnPoh* this, PlayState* play) { if (this->unk_198 != 0) { this->unk_198--; } - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { if (this->actor.params >= EN_POH_SHARP) { func_80ADE9BC(this); } else { @@ -778,7 +778,7 @@ void func_80ADFE80(EnPoh* this, PlayState* play) { } if (this->colliderCyl.base.ocFlags1 & OC1_HIT) { this->actor.flags |= ACTOR_FLAG_16; - func_8002F2F4(&this->actor, play); + Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play); } else { this->actor.flags &= ~ACTOR_FLAG_16; CollisionCheck_SetOC(play, &play->colChkCtx, &this->colliderCyl.base); diff --git a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c index c2d4dff325..d8d0666a90 100644 --- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c +++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c @@ -1493,17 +1493,17 @@ void func_80AEE050(EnRu1* this) { } s32 func_80AEE264(EnRu1* this, PlayState* play) { - if (!Actor_ProcessTalkRequest(&this->actor, play)) { + if (!Actor_TalkOfferAccepted(&this->actor, play)) { this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; if (GET_INFTABLE(INFTABLE_143)) { this->actor.textId = 0x404E; - func_8002F2F4(&this->actor, play); + Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play); } else if (GET_INFTABLE(INFTABLE_142)) { this->actor.textId = 0x404D; - func_8002F2F4(&this->actor, play); + Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play); } else { this->actor.textId = 0x404C; - func_8002F2F4(&this->actor, play); + Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play); } return false; } @@ -2126,13 +2126,13 @@ void func_80AEFD38(EnRu1* this, PlayState* play) { } s32 func_80AEFDC0(EnRu1* this, PlayState* play) { - if (!Actor_ProcessTalkRequest(&this->actor, play)) { + if (!Actor_TalkOfferAccepted(&this->actor, play)) { this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; this->actor.textId = Text_GetFaceReaction(play, 0x1F); if (this->actor.textId == 0) { this->actor.textId = 0x402C; } - func_8002F2F4(&this->actor, play); + Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play); return false; } return true; diff --git a/src/overlays/actors/ovl_En_Skj/z_en_skj.c b/src/overlays/actors/ovl_En_Skj/z_en_skj.c index 8fec8ef808..83db11d987 100644 --- a/src/overlays/actors/ovl_En_Skj/z_en_skj.c +++ b/src/overlays/actors/ovl_En_Skj/z_en_skj.c @@ -282,7 +282,7 @@ static InitChainEntry sInitChain[] = { ICHAIN_F32(targetArrowOffset, 30, ICHAIN_STOP), }; -static s32 D_80B01EA0; // gets set if ACTOR_FLAG_8 is set +static s32 D_80B01EA0; // gets set if ACTOR_FLAG_TALK is set void EnSkj_ChangeAnim(EnSkj* this, u8 index) { f32 endFrame = Animation_GetLastFrame(sAnimationInfo[index].animation); @@ -939,7 +939,7 @@ void EnSkj_WaitInRange(EnSkj* this, PlayState* play) { } else { this->textId = Text_GetFaceReaction(play, 0x15); } - func_8002F2CC(&this->actor, play, EnSkj_GetItemXzRange(this)); + Actor_OfferTalk(&this->actor, play, EnSkj_GetItemXzRange(this)); } } } @@ -958,7 +958,7 @@ void EnSkj_WaitForSong(EnSkj* this, PlayState* play) { play->msgCtx.ocarinaMode = OCARINA_MODE_04; Message_CloseTextbox(play); player->unk_6A8 = &this->actor; - func_8002F2CC(&this->actor, play, EnSkj_GetItemXzRange(this)); + Actor_OfferTalk(&this->actor, play, EnSkj_GetItemXzRange(this)); EnSkj_SetupWrongSong(this); } else { if ((play->msgCtx.msgMode == MSGMODE_OCARINA_CORRECT_PLAYBACK) && (this->unk_2D6 == 0)) { @@ -979,7 +979,7 @@ void EnSkj_WaitForSong(EnSkj* this, PlayState* play) { play->msgCtx.ocarinaMode = OCARINA_MODE_04; Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME); player->unk_6A8 = &this->actor; - func_8002F2CC(&this->actor, play, EnSkj_GetItemXzRange(this)); + Actor_OfferTalk(&this->actor, play, EnSkj_GetItemXzRange(this)); this->textId = 0x10BB; EnSkj_SetupAfterSong(this); } else { @@ -996,13 +996,13 @@ void EnSkj_WaitForSong(EnSkj* this, PlayState* play) { if (GET_ITEMGETINF(ITEMGETINF_16)) { play->msgCtx.ocarinaMode = OCARINA_MODE_04; player->unk_6A8 = &this->actor; - func_8002F2CC(&this->actor, play, EnSkj_GetItemXzRange(this)); + Actor_OfferTalk(&this->actor, play, EnSkj_GetItemXzRange(this)); this->textId = 0x10BD; EnSkj_SetupAfterSong(this); } else { play->msgCtx.ocarinaMode = OCARINA_MODE_04; player->unk_6A8 = &this->actor; - func_8002F2CC(&this->actor, play, EnSkj_GetItemXzRange(this)); + Actor_OfferTalk(&this->actor, play, EnSkj_GetItemXzRange(this)); EnSkj_SetupWrongSong(this); } } @@ -1020,7 +1020,7 @@ void EnSkj_AfterSong(EnSkj* this, PlayState* play) { if (D_80B01EA0 != 0) { EnSkj_SetupTalk(this); } else { - func_8002F2CC(&this->actor, play, EnSkj_GetItemXzRange(this)); + Actor_OfferTalk(&this->actor, play, EnSkj_GetItemXzRange(this)); } } @@ -1188,7 +1188,7 @@ void EnSkj_WrongSong(EnSkj* this, PlayState* play) { if (D_80B01EA0 != 0) { EnSkj_SetupWaitForTextClear(this); } else { - func_8002F2CC(&this->actor, play, EnSkj_GetItemXzRange(this)); + Actor_OfferTalk(&this->actor, play, EnSkj_GetItemXzRange(this)); } } @@ -1287,7 +1287,7 @@ void EnSkj_Update(Actor* thisx, PlayState* play) { s32 pad; EnSkj* this = (EnSkj*)thisx; - D_80B01EA0 = Actor_ProcessTalkRequest(&this->actor, play); + D_80B01EA0 = Actor_TalkOfferAccepted(&this->actor, play); this->timer++; @@ -1344,7 +1344,7 @@ void EnSkj_Update(Actor* thisx, PlayState* play) { void EnSkj_SariasSongShortStumpUpdate(Actor* thisx, PlayState* play) { EnSkj* this = (EnSkj*)thisx; - D_80B01EA0 = Actor_ProcessTalkRequest(&this->actor, play); + D_80B01EA0 = Actor_TalkOfferAccepted(&this->actor, play); if (BREG(0) != 0) { DebugDisplay_AddObject(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, @@ -1419,7 +1419,7 @@ void EnSkj_WaitForPlayback(EnSkj* this, PlayState* play) { Message_CloseTextbox(play); play->msgCtx.ocarinaMode = OCARINA_MODE_04; player->unk_6A8 = &this->actor; - func_8002F2CC(&this->actor, play, 26.0f); + Actor_OfferTalk(&this->actor, play, 26.0f); this->textId = 0x102D; this->actionFunc = EnSkj_FailedMiniGame; } else if (play->msgCtx.ocarinaMode == OCARINA_MODE_0F) { // completed the game @@ -1427,7 +1427,7 @@ void EnSkj_WaitForPlayback(EnSkj* this, PlayState* play) { Message_CloseTextbox(play); play->msgCtx.ocarinaMode = OCARINA_MODE_04; player->unk_6A8 = &this->actor; - func_8002F2CC(&this->actor, play, 26.0f); + Actor_OfferTalk(&this->actor, play, 26.0f); this->textId = 0x10BF; this->actionFunc = EnSkj_WonOcarinaMiniGame; } else { // playing the game @@ -1461,7 +1461,7 @@ void EnSkj_WaitForPlayback(EnSkj* this, PlayState* play) { Message_CloseTextbox(play); play->msgCtx.ocarinaMode = OCARINA_MODE_04; player->unk_6A8 = &this->actor; - func_8002F2CC(&this->actor, play, 26.0f); + Actor_OfferTalk(&this->actor, play, 26.0f); this->textId = 0x102D; this->actionFunc = EnSkj_FailedMiniGame; } @@ -1487,7 +1487,7 @@ void EnSkj_FailedMiniGame(EnSkj* this, PlayState* play) { if (D_80B01EA0) { this->actionFunc = EnSkj_WaitForNextRound; } else { - func_8002F2CC(&this->actor, play, 26.0f); + Actor_OfferTalk(&this->actor, play, 26.0f); } } @@ -1523,7 +1523,7 @@ void EnSkj_WonOcarinaMiniGame(EnSkj* this, PlayState* play) { if (D_80B01EA0) { this->actionFunc = EnSkj_WaitToGiveReward; } else { - func_8002F2CC(&this->actor, play, 26.0f); + Actor_OfferTalk(&this->actor, play, 26.0f); } } @@ -1581,7 +1581,7 @@ void EnSkj_CleanupOcarinaGame(EnSkj* this, PlayState* play) { void EnSkj_OcarinaMinigameShortStumpUpdate(Actor* thisx, PlayState* play) { EnSkj* this = (EnSkj*)thisx; - D_80B01EA0 = Actor_ProcessTalkRequest(&this->actor, play); + D_80B01EA0 = Actor_TalkOfferAccepted(&this->actor, play); this->timer++; this->actor.focus.pos.x = 1230.0f; diff --git a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c index 1231c0046b..f3714039d9 100644 --- a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c +++ b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c @@ -666,7 +666,7 @@ void EnSsh_Talk(EnSsh* this, PlayState* play) { void EnSsh_Idle(EnSsh* this, PlayState* play) { if (1) {} - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->actionFunc = EnSsh_Talk; if (this->actor.params == ENSSH_FATHER) { SET_EVENTCHKINF(EVENTCHKINF_96); @@ -716,7 +716,7 @@ void EnSsh_Idle(EnSsh* this, PlayState* play) { this->actor.textId = 0x22; } } - func_8002F2CC(&this->actor, play, 100.0f); + Actor_OfferTalk(&this->actor, play, 100.0f); } } } diff --git a/src/overlays/actors/ovl_En_Sth/z_en_sth.c b/src/overlays/actors/ovl_En_Sth/z_en_sth.c index 6ed6c57a6f..447d01d783 100644 --- a/src/overlays/actors/ovl_En_Sth/z_en_sth.c +++ b/src/overlays/actors/ovl_En_Sth/z_en_sth.c @@ -221,12 +221,12 @@ void EnSth_RewardObtainedTalk(EnSth* this, PlayState* play) { } void EnSth_ParentRewardObtainedWait(EnSth* this, PlayState* play) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { EnSth_SetupAction(this, EnSth_RewardObtainedTalk); } else { this->actor.textId = 0x23; if (this->actor.xzDistToPlayer < 100.0f) { - func_8002F2CC(&this->actor, play, 100.0f); + Actor_OfferTalk(&this->actor, play, 100.0f); } } EnSth_LookAtPlayer(this, play); @@ -274,7 +274,7 @@ void EnSth_RewardUnobtainedTalk(EnSth* this, PlayState* play) { } void EnSth_RewardUnobtainedWait(EnSth* this, PlayState* play) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { EnSth_SetupAction(this, EnSth_RewardUnobtainedTalk); } else { if (this->actor.params == 0) { @@ -283,14 +283,14 @@ void EnSth_RewardUnobtainedWait(EnSth* this, PlayState* play) { this->actor.textId = 0x21; } if (this->actor.xzDistToPlayer < 100.0f) { - func_8002F2CC(&this->actor, play, 100.0f); + Actor_OfferTalk(&this->actor, play, 100.0f); } } EnSth_LookAtPlayer(this, play); } void EnSth_ChildRewardObtainedWait(EnSth* this, PlayState* play) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { EnSth_SetupAction(this, EnSth_RewardObtainedTalk); } else { if (gSaveContext.save.info.inventory.gsTokens < 50) { @@ -299,7 +299,7 @@ void EnSth_ChildRewardObtainedWait(EnSth* this, PlayState* play) { this->actor.textId = 0x1F; } if (this->actor.xzDistToPlayer < 100.0f) { - func_8002F2CC(&this->actor, play, 100.0f); + Actor_OfferTalk(&this->actor, play, 100.0f); } } EnSth_LookAtPlayer(this, play); diff --git a/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c b/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c index a25e375455..3f267dcf8e 100644 --- a/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c +++ b/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c @@ -192,10 +192,10 @@ void EnSyatekiMan_SetupIdle(EnSyatekiMan* this, PlayState* play) { void EnSyatekiMan_Idle(EnSyatekiMan* this, PlayState* play) { SkelAnime_Update(&this->skelAnime); - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->actionFunc = EnSyatekiMan_Talk; } else { - func_8002F2CC(&this->actor, play, 100.0f); + Actor_OfferTalk(&this->actor, play, 100.0f); } } diff --git a/src/overlays/actors/ovl_En_Ta/z_en_ta.c b/src/overlays/actors/ovl_En_Ta/z_en_ta.c index ca31e8bf0d..4501b2613b 100644 --- a/src/overlays/actors/ovl_En_Ta/z_en_ta.c +++ b/src/overlays/actors/ovl_En_Ta/z_en_ta.c @@ -287,7 +287,7 @@ void EnTa_Destroy(Actor* thisx, PlayState* play) { } s32 EnTa_RequestTalk(EnTa* this, PlayState* play, u16 textId) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { return true; } @@ -296,7 +296,7 @@ s32 EnTa_RequestTalk(EnTa* this, PlayState* play, u16 textId) { if ((ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)) <= 0x4300) && (this->actor.xzDistToPlayer < 100.0f)) { this->stateFlags |= TALON_STATE_FLAG_TRACKING_PLAYER; - func_8002F2CC(&this->actor, play, 100.0f); + Actor_OfferTalk(&this->actor, play, 100.0f); } return false; } @@ -369,7 +369,7 @@ void EnTa_SleepTalkInCastle(EnTa* this, PlayState* play) { void EnTa_IdleAsleepInCastle(EnTa* this, PlayState* play) { Player* player = GET_PLAYER(play); - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { s32 exchangeItemId = func_8002F368(play); switch (exchangeItemId) { @@ -388,23 +388,23 @@ void EnTa_IdleAsleepInCastle(EnTa* this, PlayState* play) { } } else { this->actor.textId = 0x702A; - func_8002F298(&this->actor, play, 100.0f, EXCH_ITEM_CHICKEN); + Actor_OfferTalkExchangeEquiCylinder(&this->actor, play, 100.0f, EXCH_ITEM_CHICKEN); } } void EnTa_IdleAsleepInLonLonHouse(EnTa* this, PlayState* play) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { EnTa_SetupAction(this, EnTa_SleepTalkInLonLonHouse, EnTa_AnimSleeping); } this->actor.textId = 0x204B; - func_8002F2CC(&this->actor, play, 100.0f); + Actor_OfferTalk(&this->actor, play, 100.0f); } void EnTa_IdleAsleepInKakariko(EnTa* this, PlayState* play) { Player* player = GET_PLAYER(play); - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { s32 exchangeItemId = func_8002F368(play); switch (exchangeItemId) { @@ -423,7 +423,7 @@ void EnTa_IdleAsleepInKakariko(EnTa* this, PlayState* play) { } } else { this->actor.textId = 0x5015; - func_8002F298(&this->actor, play, 100.0f, EXCH_ITEM_POCKET_CUCCO); + Actor_OfferTalkExchangeEquiCylinder(&this->actor, play, 100.0f, EXCH_ITEM_POCKET_CUCCO); } } @@ -667,12 +667,12 @@ void EnTa_TalkFoundSuperCucco(EnTa* this, PlayState* play) { } void EnTa_IdleFoundSuperCucco(EnTa* this, PlayState* play) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->actionFunc = EnTa_TalkFoundSuperCucco; // Unset auto-talking this->actor.flags &= ~ACTOR_FLAG_16; } else { - func_8002F2CC(&this->actor, play, 1000.0f); + Actor_OfferTalk(&this->actor, play, 1000.0f); } this->stateFlags |= TALON_STATE_FLAG_TRACKING_PLAYER; } @@ -787,7 +787,7 @@ void EnTa_RunCuccoGame(EnTa* this, PlayState* play) { // Automatically talk to player this->actor.flags |= ACTOR_FLAG_16; - func_8002F2CC(&this->actor, play, 1000.0f); + Actor_OfferTalk(&this->actor, play, 1000.0f); return; } } else { @@ -1118,7 +1118,7 @@ void EnTa_IdleSittingInLonLonHouse(EnTa* this, PlayState* play) { } void EnTa_IdleAfterCuccoGameFinished(EnTa* this, PlayState* play) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { switch (this->actor.textId) { case 0x2085: // Retry? this->actionFunc = EnTa_WaitForPlayCuccoGameResponse; @@ -1135,7 +1135,7 @@ void EnTa_IdleAfterCuccoGameFinished(EnTa* this, PlayState* play) { this->actor.flags &= ~ACTOR_FLAG_16; } else { this->actor.flags |= ACTOR_FLAG_16; - func_8002F2CC(&this->actor, play, 1000.0f); + Actor_OfferTalk(&this->actor, play, 1000.0f); } this->stateFlags |= TALON_STATE_FLAG_TRACKING_PLAYER; } diff --git a/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c b/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c index 83a0adf535..5831adc961 100644 --- a/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c +++ b/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c @@ -86,7 +86,7 @@ void func_80B1778C(EnTakaraMan* this, PlayState* play) { s16 yawDiff; SkelAnime_Update(&this->skelAnime); - if (Actor_ProcessTalkRequest(&this->actor, play) && this->dialogState != TEXT_STATE_DONE) { + if (Actor_TalkOfferAccepted(&this->actor, play) && this->dialogState != TEXT_STATE_DONE) { if (!this->unk_214) { this->actionFunc = func_80B17934; } else { @@ -120,7 +120,7 @@ void func_80B1778C(EnTakaraMan* this, PlayState* play) { this->actor.flags |= ACTOR_FLAG_0; this->unk_218 = 1; } - func_8002F2CC(&this->actor, play, 100.0f); + Actor_OfferTalk(&this->actor, play, 100.0f); } } } diff --git a/src/overlays/actors/ovl_En_Tk/z_en_tk.c b/src/overlays/actors/ovl_En_Tk/z_en_tk.c index d54dfc000c..7ed29d145c 100644 --- a/src/overlays/actors/ovl_En_Tk/z_en_tk.c +++ b/src/overlays/actors/ovl_En_Tk/z_en_tk.c @@ -537,7 +537,7 @@ void EnTk_Rest(EnTk* this, PlayState* play) { this->actionCountdown = 0; Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, this->collider.dim.radius + 30.0f, EnTk_GetTextId, EnTk_UpdateTalkState); - } else if (Actor_ProcessTalkRequest(&this->actor, play)) { + } else if (Actor_TalkOfferAccepted(&this->actor, play)) { v1 = this->actor.shape.rot.y; v1 -= this->h_21E; v1 = this->actor.yawTowardsPlayer - v1; diff --git a/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c b/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c index 81bd31a68f..ad3d446e90 100644 --- a/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c +++ b/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c @@ -287,7 +287,7 @@ void EnToryo_HandleTalking(EnToryo* this, PlayState* play) { s16 posY; if (this->messageState == 3) { - Actor_ProcessTalkRequest(&this->actor, play); + Actor_TalkOfferAccepted(&this->actor, play); Message_ContinueTextbox(play, this->actor.textId); this->messageState = 1; } @@ -317,7 +317,7 @@ void EnToryo_HandleTalking(EnToryo* this, PlayState* play) { } if (this->messageState == 0) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->exchangeItemId = func_8002F368(play); if (this->exchangeItemId != EXCH_ITEM_NONE) { player->actor.textId = EnToryo_ReactToExchangeItem(this, play); @@ -330,7 +330,7 @@ void EnToryo_HandleTalking(EnToryo* this, PlayState* play) { Actor_GetScreenPos(play, &this->actor, &posX, &posY); if ((posX >= 0) && (posX <= SCREEN_WIDTH) && (posY >= 0) && (posY <= SCREEN_HEIGHT)) { this->actor.textId = EnToryo_GetTextId(this, play); - func_8002F298(&this->actor, play, 100.0f, EXCH_ITEM_POACHERS_SAW); + Actor_OfferTalkExchangeEquiCylinder(&this->actor, play, 100.0f, EXCH_ITEM_POACHERS_SAW); } } } diff --git a/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c b/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c index 0106ad1913..1256a781ce 100644 --- a/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c +++ b/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c @@ -138,7 +138,7 @@ void func_80B3943C(EnWonderTalk* this, PlayState* play) { return; } if (this->switchFlag < 0 || !Flags_GetSwitch(play, this->switchFlag)) { - if ((Actor_ProcessTalkRequest(&this->actor, play))) { + if ((Actor_TalkOfferAccepted(&this->actor, play))) { if (this->unk_156 != TEXT_STATE_DONE) { this->actionFunc = func_80B395F0; } else { @@ -166,7 +166,7 @@ void func_80B3943C(EnWonderTalk* this, PlayState* play) { osSyncPrintf("\n\n"); } this->unk_15A = 0; - func_8002F2CC(&this->actor, play, this->unk_15C); + Actor_OfferTalk(&this->actor, play, this->unk_15C); } } } diff --git a/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c b/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c index 1675cc6308..a831460a80 100644 --- a/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c +++ b/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c @@ -117,7 +117,7 @@ void func_80B3A15C(EnWonderTalk2* this, PlayState* play) { this->actor.flags &= ~ACTOR_FLAG_0; this->unk_15A = true; } - } else if (Actor_ProcessTalkRequest(&this->actor, play)) { + } else if (Actor_TalkOfferAccepted(&this->actor, play)) { if ((this->switchFlag >= 0) && (this->talkMode != 2)) { Flags_SetSwitch(play, this->switchFlag); // "I saved it! All of it!" @@ -161,7 +161,7 @@ void func_80B3A15C(EnWonderTalk2* this, PlayState* play) { } this->unk_158 = 0; - func_8002F1C4(&this->actor, play, this->triggerRange + 50.0f, 100.0f, EXCH_ITEM_NONE); + Actor_OfferTalkExchange(&this->actor, play, this->triggerRange + 50.0f, 100.0f, EXCH_ITEM_NONE); } } } diff --git a/src/overlays/actors/ovl_En_Xc/z_en_xc.c b/src/overlays/actors/ovl_En_Xc/z_en_xc.c index 6ed5c8c43e..7db2d1337a 100644 --- a/src/overlays/actors/ovl_En_Xc/z_en_xc.c +++ b/src/overlays/actors/ovl_En_Xc/z_en_xc.c @@ -2170,7 +2170,7 @@ void EnXc_InitTempleOfTime(EnXc* this, PlayState* play) { } void EnXc_SetupDialogueAction(EnXc* this, PlayState* play) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->action = SHEIK_ACTION_IN_DIALOGUE; } else { this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; @@ -2179,7 +2179,7 @@ void EnXc_SetupDialogueAction(EnXc* this, PlayState* play) { } else { this->actor.textId = 0x700F; } - func_8002F2F4(&this->actor, play); + Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play); } } diff --git a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c index fdf0e48495..8815b37ba3 100644 --- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c +++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c @@ -146,10 +146,10 @@ void func_80B4AF18(EnZl1* this, PlayState* play) { if (Actor_TextboxIsClosing(&this->actor, play)) { this->unk_1E6 = 0; } - } else if (Actor_ProcessTalkRequest(&this->actor, play)) { + } else if (Actor_TalkOfferAccepted(&this->actor, play)) { this->unk_1E6 = 1; } else if (this->actor.world.pos.y <= player->actor.world.pos.y) { - func_8002F2F4(&this->actor, play); + Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play); } Collider_UpdateCylinder(&this->actor, &this->collider); @@ -166,7 +166,7 @@ void func_80B4B010(EnZl1* this, PlayState* play) { Vec3f playerPos = { -398.0f, 84.0f, 0.0f }; s16 rotDiff; - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { Animation_Change(&this->skelAnime, &gChildZelda1Anim_10B38, 1.0f, 0.0f, Animation_GetLastFrame(&gChildZelda1Anim_10B38), ANIMMODE_ONCE_INTERP, -10.0f); this->subCamId = Play_CreateSubCamera(play); @@ -191,7 +191,7 @@ void func_80B4B010(EnZl1* this, PlayState* play) { if (1) {} // necessary to match rotDiff = ABS(this->actor.yawTowardsPlayer - this->actor.shape.rot.y); if ((rotDiff < 0x238E) && !(player->actor.world.pos.y < this->actor.world.pos.y)) { - func_8002F2F4(&this->actor, play); + Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play); } } } @@ -556,10 +556,10 @@ void func_80B4BF2C(EnZl1* this, PlayState* play) { if (player->actor.world.pos.y < this->actor.world.pos.y) { break; } else { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->unk_1E2++; } else { - func_8002F2F4(&this->actor, play); + Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play); } } break; @@ -572,7 +572,7 @@ void func_80B4BF2C(EnZl1* this, PlayState* play) { if (Actor_TextboxIsClosing(&this->actor, play)) { Player_SetCsActionWithHaltedActors(play, &this->actor, PLAYER_CSACTION_7); Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL); - this->actor.flags &= ~ACTOR_FLAG_8; + this->actor.flags &= ~ACTOR_FLAG_TALK; this->unk_1E2 = 4; } break; diff --git a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c index 35ff4b9c4d..9bee96b69e 100644 --- a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c +++ b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c @@ -1103,13 +1103,13 @@ void func_80B55CCC(EnZl3* this, s32 arg1) { } void func_80B55D00(EnZl3* this, PlayState* play) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->action = 13; } else if (ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)) <= 0x4300) { this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; this->actor.flags |= ACTOR_FLAG_0; this->actor.textId = 0x70D5; - func_8002F2F4(&this->actor, play); + Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play); } else { this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); this->actor.flags &= ~ACTOR_FLAG_0; @@ -1159,7 +1159,7 @@ void func_80B55F38(EnZl3* this, s32 arg1) { } void func_80B55F6C(EnZl3* this, PlayState* play) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->action = 0x12; } else if (ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)) <= 0x4300) { BossGanon2* bossGanon2 = func_80B53488(this, play); @@ -1168,7 +1168,7 @@ void func_80B55F6C(EnZl3* this, PlayState* play) { this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; this->actor.flags |= ACTOR_FLAG_0; this->actor.textId = 0x7059; - func_8002F2F4(&this->actor, play); + Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play); } } else { this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); @@ -1220,7 +1220,7 @@ void func_80B561E0(EnZl3* this, s32 arg1) { } void func_80B56214(EnZl3* this, PlayState* play) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { this->action = 21; } else if (ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)) <= 0x4300) { BossGanon2* bossGanon2 = func_80B53488(this, play); @@ -1230,7 +1230,7 @@ void func_80B56214(EnZl3* this, PlayState* play) { this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; this->actor.flags |= ACTOR_FLAG_0; this->actor.textId = 0x7059; - func_8002F2F4(&this->actor, play); + Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play); } } } else { @@ -1671,7 +1671,7 @@ u16 func_80B572F0(PlayState* play) { } s32 func_80B57324(EnZl3* this, PlayState* play) { - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { return 1; } return 0; @@ -1683,7 +1683,7 @@ void func_80B57350(EnZl3* this, PlayState* play) { if (ABS(temp_v0) <= 0x4300) { this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; this->actor.textId = func_80B572F0(play); - func_8002F2F4(&this->actor, play); + Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play); } } diff --git a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c index 66a4a41431..8a66a202a0 100644 --- a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c +++ b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c @@ -423,13 +423,13 @@ s32 EnZl4_CsWaitForPlayer(EnZl4* this, PlayState* play) { s16 yawDiff; s16 absYawDiff; - if (!Actor_ProcessTalkRequest(&this->actor, play)) { + if (!Actor_TalkOfferAccepted(&this->actor, play)) { yawDiff = (f32)this->actor.yawTowardsPlayer - this->actor.shape.rot.y; absYawDiff = ABS(yawDiff); if ((playerx->world.pos.y != this->actor.world.pos.y) || (absYawDiff >= 0x3FFC)) { return false; } else { - func_8002F2CC(&this->actor, play, this->collider.dim.radius + 60.0f); + Actor_OfferTalk(&this->actor, play, this->collider.dim.radius + 60.0f); return false; } } diff --git a/src/overlays/actors/ovl_Fishing/z_fishing.c b/src/overlays/actors/ovl_Fishing/z_fishing.c index d603282a36..7ccc2da400 100644 --- a/src/overlays/actors/ovl_Fishing/z_fishing.c +++ b/src/overlays/actors/ovl_Fishing/z_fishing.c @@ -2866,11 +2866,11 @@ void Fishing_HandleAquariumDialog(Fishing* this, PlayState* play) { if (this->aquariumWaitTimer == 0) { this->actor.flags |= ACTOR_FLAG_0; - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { sFishLengthToWeigh = sFishingRecordLength; this->isAquariumMessage = true; } else { - func_8002F2F4(&this->actor, play); + Actor_OfferTalkNearColChkInfoCylinder(&this->actor, play); } } else { this->aquariumWaitTimer--; @@ -4759,7 +4759,7 @@ void Fishing_HandleOwnerDialog(Fishing* this, PlayState* play) { this->actor.textId = 0x4097; } - if (Actor_ProcessTalkRequest(&this->actor, play)) { + if (Actor_TalkOfferAccepted(&this->actor, play)) { if (sFishingPlayingState == 0) { this->stateAndTimer = 1; if (sLinkAge != LINK_AGE_CHILD) { @@ -4771,7 +4771,7 @@ void Fishing_HandleOwnerDialog(Fishing* this, PlayState* play) { this->stateAndTimer = 10; } } else { - func_8002F2CC(&this->actor, play, 100.0f); + Actor_OfferTalk(&this->actor, play, 100.0f); } break; diff --git a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c index 4eea2768ef..7299654c9d 100644 --- a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c +++ b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c @@ -537,13 +537,13 @@ void ObjBean_SetupWaitForBean(ObjBean* this) { } void ObjBean_WaitForBean(ObjBean* this, PlayState* play) { - if (Actor_ProcessTalkRequest(&this->dyna.actor, play)) { + if (Actor_TalkOfferAccepted(&this->dyna.actor, play)) { if (func_8002F368(play) == EXCH_ITEM_MAGIC_BEAN) { func_80B8FE00(this); Flags_SetSwitch(play, this->dyna.actor.params & 0x3F); } } else { - func_8002F298(&this->dyna.actor, play, 40.0f, EXCH_ITEM_MAGIC_BEAN); + Actor_OfferTalkExchangeEquiCylinder(&this->dyna.actor, play, 40.0f, EXCH_ITEM_MAGIC_BEAN); } } diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 838e8c3d0b..e03537ef05 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -1620,7 +1620,7 @@ BAD_RETURN(s32) func_80832224(Player* this) { s32 func_8083224C(PlayState* play) { Player* this = GET_PLAYER(play); - return CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_8); + return CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_TALK); } void Player_AnimPlayOnce(PlayState* play, Player* this, LinkAnimationHeader* anim) { @@ -5570,7 +5570,7 @@ s32 Player_ActionChange_13(Player* this, PlayState* play) { this->av2.actionVar2 = 0x50; this->av1.actionVar1 = -1; } - targetActor->flags |= ACTOR_FLAG_8; + targetActor->flags |= ACTOR_FLAG_TALK; this->unk_664 = this->targetActor; } else if (sp2C == EXCH_ITEM_BOTTLE_RUTOS_LETTER) { this->av1.actionVar1 = 1; @@ -5582,7 +5582,7 @@ s32 Player_ActionChange_13(Player* this, PlayState* play) { func_80835EA4(play, 4); } - this->actor.flags |= ACTOR_FLAG_8; + this->actor.flags |= ACTOR_FLAG_TALK; this->exchangeItemId = sp2C; if (this->av1.actionVar1 < 0) { @@ -8262,7 +8262,7 @@ void Player_Action_8084279C(Player* this, PlayState* play) { func_8083A098(this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_check_end, this->modelAnimType), play); } - this->actor.flags &= ~ACTOR_FLAG_8; + this->actor.flags &= ~ACTOR_FLAG_TALK; Camera_SetFinishedFlag(Play_GetCamera(play, CAM_ID_MAIN)); } } @@ -10610,7 +10610,7 @@ void Player_UpdateCamAndSeqModes(PlayState* play, Player* this) { } else if (this->stateFlags2 & PLAYER_STATE2_8) { camMode = CAM_MODE_PUSH_PULL; } else if ((unk_664 = this->unk_664) != NULL) { - if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_8)) { + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_TALK)) { camMode = CAM_MODE_TALK; } else if (this->stateFlags1 & PLAYER_STATE1_16) { if (this->stateFlags1 & PLAYER_STATE1_25) { @@ -11227,7 +11227,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { func_808368EC(this, play); - if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_8)) { + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_TALK)) { this->targetActorDistance = 0.0f; } else { this->targetActor = NULL; @@ -11769,7 +11769,7 @@ void Player_Action_8084B530(Player* this, PlayState* play) { Player_UpdateUpperBody(this, play); if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) { - this->actor.flags &= ~ACTOR_FLAG_8; + this->actor.flags &= ~ACTOR_FLAG_TALK; if (!CHECK_FLAG_ALL(this->targetActor->flags, ACTOR_FLAG_0 | ACTOR_FLAG_2)) { this->stateFlags2 &= ~PLAYER_STATE2_13; @@ -13365,7 +13365,7 @@ void Player_Action_8084F104(Player* this, PlayState* play) { this->unk_862 = 0; if (targetActor->textId != 0xFFFF) { - this->actor.flags |= ACTOR_FLAG_8; + this->actor.flags |= ACTOR_FLAG_TALK; } func_80853148(play, targetActor); @@ -13385,7 +13385,7 @@ void Player_Action_8084F104(Player* this, PlayState* play) { this->av2.actionVar2 = 1; } else if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) { - this->actor.flags &= ~ACTOR_FLAG_8; + this->actor.flags &= ~ACTOR_FLAG_TALK; this->unk_862 = 0; if (this->av1.actionVar1 == 1) { @@ -15252,7 +15252,7 @@ void func_80853148(PlayState* play, Actor* actor) { if ((this->targetActor != NULL) || (actor == this->naviActor) || CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_0 | ACTOR_FLAG_18)) { - actor->flags |= ACTOR_FLAG_8; + actor->flags |= ACTOR_FLAG_TALK; } this->targetActor = actor; @@ -15260,13 +15260,13 @@ void func_80853148(PlayState* play, Actor* actor) { if (actor->textId == 0xFFFF) { Player_SetCsActionWithHaltedActors(play, actor, PLAYER_CSACTION_1); - actor->flags |= ACTOR_FLAG_8; + actor->flags |= ACTOR_FLAG_TALK; func_80832528(play, this); } else { - if (this->actor.flags & ACTOR_FLAG_8) { + if (this->actor.flags & ACTOR_FLAG_TALK) { this->actor.textId = 0; } else { - this->actor.flags |= ACTOR_FLAG_8; + this->actor.flags |= ACTOR_FLAG_TALK; this->actor.textId = actor->textId; } @@ -15309,7 +15309,7 @@ void func_80853148(PlayState* play, Actor* actor) { } if ((this->naviActor == this->targetActor) && ((this->targetActor->textId & 0xFF00) != 0x200)) { - this->naviActor->flags |= ACTOR_FLAG_8; + this->naviActor->flags |= ACTOR_FLAG_TALK; func_80835EA4(play, 0xB); } }