summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Longstaff <JordanLongstaff@users.noreply.github.com>2024-12-13 17:56:42 -0500
committerGitHub <noreply@github.com>2024-12-13 15:56:42 -0700
commit5d8e7740efb6516ec5001b039feb71ffaf518c5a (patch)
treef8314959823c7040a2b48e3457aece4fabfc7f9b
parent1a5632e3b5d877bf5869b642585c8973458b333f (diff)
Rename two Actor functions from decomp (#4674)
-rw-r--r--soh/include/functions.h6
-rw-r--r--soh/src/code/z_actor.c9
-rw-r--r--soh/src/code/z_en_item00.c4
-rw-r--r--soh/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c2
-rw-r--r--soh/src/overlays/actors/ovl_En_Bom/z_en_bom.c2
-rw-r--r--soh/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c4
-rw-r--r--soh/src/overlays/actors/ovl_En_Box/z_en_box.c2
-rw-r--r--soh/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c2
-rw-r--r--soh/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c2
-rw-r--r--soh/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c2
-rw-r--r--soh/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c2
-rw-r--r--soh/src/overlays/actors/ovl_En_Niw/z_en_niw.c4
-rw-r--r--soh/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c8
-rw-r--r--soh/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c2
14 files changed, 25 insertions, 26 deletions
diff --git a/soh/include/functions.h b/soh/include/functions.h
index f6480e499..c6375e514 100644
--- a/soh/include/functions.h
+++ b/soh/include/functions.h
@@ -455,13 +455,13 @@ u32 Actor_TextboxIsClosing(Actor* actor, PlayState* play);
s8 func_8002F368(PlayState* play);
void Actor_GetScreenPos(PlayState* play, Actor* actor, s16* x, s16* y);
u32 Actor_HasParent(Actor* actor, PlayState* play);
-// TODO: Rename the follwing 3 functions using whatever scheme we use when we rename Actor_OfferGetItem and func_8002F554.
+// TODO: Rename the follwing 3 functions using whatever scheme we use when we rename Actor_OfferGetItem and Actor_OfferGetItemNearby.
s32 GiveItemEntryWithoutActor(PlayState* play, GetItemEntry getItemEntry);
s32 GiveItemEntryFromActor(Actor* actor, PlayState* play, GetItemEntry getItemEntry, f32 xzRange, f32 yRange);
s32 GiveItemEntryFromActorWithFixedRange(Actor* actor, PlayState* play, GetItemEntry getItemEntry);
s32 Actor_OfferGetItem(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange, f32 yRange);
-void func_8002F554(Actor* actor, PlayState* play, s32 getItemId);
-void func_8002F580(Actor* actor, PlayState* play);
+void Actor_OfferGetItemNearby(Actor* actor, PlayState* play, s32 getItemId);
+void Actor_OfferCarry(Actor* actor, PlayState* play);
u32 Actor_HasNoParent(Actor* actor, PlayState* play);
void func_8002F5C4(Actor* actorA, Actor* actorB, PlayState* play);
void func_8002F5F0(Actor* actor, PlayState* play);
diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c
index be846b173..399b2bda7 100644
--- a/soh/src/code/z_actor.c
+++ b/soh/src/code/z_actor.c
@@ -2102,14 +2102,13 @@ s32 Actor_OfferGetItem(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange
return false;
}
-// TODO: Rename to GiveItemIdFromActorWithFixedRange or similar
// If you're doing something for randomizer, you're probably looking for GiveItemEntryFromActorWithFixedRange
-void func_8002F554(Actor* actor, PlayState* play, s32 getItemId) {
+void Actor_OfferGetItemNearby(Actor* actor, PlayState* play, s32 getItemId) {
Actor_OfferGetItem(actor, play, getItemId, 50.0f, 10.0f);
}
-void func_8002F580(Actor* actor, PlayState* play) {
- func_8002F554(actor, play, GI_NONE);
+void Actor_OfferCarry(Actor* actor, PlayState* play) {
+ Actor_OfferGetItemNearby(actor, play, GI_NONE);
}
u32 Actor_HasNoParent(Actor* actor, PlayState* play) {
@@ -4610,7 +4609,7 @@ s32 func_80035124(Actor* actor, PlayState* play) {
ret = 1;
} else {
actor->shape.rot.x = actor->shape.rot.z = 0;
- func_8002F580(actor, play);
+ Actor_OfferCarry(actor, play);
}
break;
case 1:
diff --git a/soh/src/code/z_en_item00.c b/soh/src/code/z_en_item00.c
index 93e5fad42..5bc90c6ca 100644
--- a/soh/src/code/z_en_item00.c
+++ b/soh/src/code/z_en_item00.c
@@ -588,7 +588,7 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
}
if ((getItemId != GI_NONE) && !Actor_HasParent(&this->actor, play)) {
- func_8002F554(&this->actor, play, getItemId);
+ Actor_OfferGetItemNearby(&this->actor, play, getItemId);
}
EnItem00_SetupAction(this, func_8001E5C8);
@@ -956,7 +956,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
params = &this->actor.params;
if ((getItemId != GI_NONE) && !Actor_HasParent(&this->actor, play)) {
- func_8002F554(&this->actor, play, getItemId);
+ Actor_OfferGetItemNearby(&this->actor, play, getItemId);
}
switch (*params) {
diff --git a/soh/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c b/soh/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c
index 671831539..a1362a2bb 100644
--- a/soh/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c
+++ b/soh/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c
@@ -142,7 +142,7 @@ void func_808BAF40(BgTokiSwd* this, PlayState* play) {
} else {
Player* player = GET_PLAYER(play);
if (Actor_IsFacingPlayer(&this->actor, 0x2000)) {
- func_8002F580(&this->actor, play);
+ Actor_OfferCarry(&this->actor, play);
}
}
}
diff --git a/soh/src/overlays/actors/ovl_En_Bom/z_en_bom.c b/soh/src/overlays/actors/ovl_En_Bom/z_en_bom.c
index e379f0095..d2bb1f845 100644
--- a/soh/src/overlays/actors/ovl_En_Bom/z_en_bom.c
+++ b/soh/src/overlays/actors/ovl_En_Bom/z_en_bom.c
@@ -176,7 +176,7 @@ void EnBom_Move(EnBom* this, PlayState* play) {
this->actor.velocity.y *= -0.3f;
this->actor.bgCheckFlags &= ~2;
} else if (this->timer >= 4) {
- func_8002F580(&this->actor, play);
+ Actor_OfferCarry(&this->actor, play);
}
}
diff --git a/soh/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c b/soh/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c
index 44c8e745b..c6e74d93b 100644
--- a/soh/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c
+++ b/soh/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c
@@ -194,7 +194,7 @@ void EnBombf_GrowBomb(EnBombf* this, PlayState* play) {
}
} else {
if (!Actor_HasParent(&this->actor, play)) {
- func_8002F580(&this->actor, play);
+ Actor_OfferCarry(&this->actor, play);
} else {
player->actor.child = NULL;
player->heldActor = NULL;
@@ -244,7 +244,7 @@ void EnBombf_Move(EnBombf* this, PlayState* play) {
func_8002F850(play, &this->actor);
this->actor.velocity.y *= -0.5f;
} else if (this->timer >= 4) {
- func_8002F580(&this->actor, play);
+ Actor_OfferCarry(&this->actor, play);
}
}
}
diff --git a/soh/src/overlays/actors/ovl_En_Box/z_en_box.c b/soh/src/overlays/actors/ovl_En_Box/z_en_box.c
index 9a52fa615..1110e9d0e 100644
--- a/soh/src/overlays/actors/ovl_En_Box/z_en_box.c
+++ b/soh/src/overlays/actors/ovl_En_Box/z_en_box.c
@@ -452,7 +452,7 @@ void EnBox_WaitOpen(EnBox* this, PlayState* play) {
func_8002DBD0(&this->dyna.actor, &sp4C, &player->actor.world.pos);
if (sp4C.z > -50.0f && sp4C.z < 0.0f && fabsf(sp4C.y) < 10.0f && fabsf(sp4C.x) < 20.0f &&
Player_IsFacingActor(&this->dyna.actor, 0x3000, play)) {
- func_8002F554(&this->dyna.actor, play, -(this->dyna.actor.params >> 5 & 0x7F));
+ Actor_OfferGetItemNearby(&this->dyna.actor, play, -(this->dyna.actor.params >> 5 & 0x7F));
}
if (Flags_GetTreasure(play, this->dyna.actor.params & 0x1F)) {
EnBox_SetupAction(this, EnBox_Open);
diff --git a/soh/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c b/soh/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c
index ec74e88b4..ef6d36ebc 100644
--- a/soh/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c
+++ b/soh/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c
@@ -1029,7 +1029,7 @@ void EnDekubaba_DeadStickDrop(EnDekubaba* this, PlayState* play) {
return;
}
- func_8002F554(&this->actor, play, GI_STICKS_1);
+ Actor_OfferGetItemNearby(&this->actor, play, GI_STICKS_1);
}
// Update and associated functions
diff --git a/soh/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c b/soh/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c
index 0e36e476a..c5b8072ff 100644
--- a/soh/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c
+++ b/soh/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c
@@ -368,7 +368,7 @@ void EnKarebaba_DeadItemDrop(EnKarebaba* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play) || this->actor.params == 0) {
EnKarebaba_SetupDead(this);
} else {
- func_8002F554(&this->actor, play, GI_STICKS_1);
+ Actor_OfferGetItemNearby(&this->actor, play, GI_STICKS_1);
}
}
diff --git a/soh/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c b/soh/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c
index a0e529991..12dd39455 100644
--- a/soh/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c
+++ b/soh/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c
@@ -335,7 +335,7 @@ void EnKusa_Main(EnKusa* this, PlayState* play) {
if (this->actor.xzDistToPlayer < 400.0f) {
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
if (this->actor.xzDistToPlayer < 100.0f) {
- func_8002F580(&this->actor, play);
+ Actor_OfferCarry(&this->actor, play);
}
}
}
diff --git a/soh/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c b/soh/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c
index 315d1ee10..67fcc4a00 100644
--- a/soh/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c
+++ b/soh/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c
@@ -97,7 +97,7 @@ void EnLightbox_Update(Actor* thisx, PlayState* play) {
thisx->velocity.y *= IREG(60) / 100.0f;
thisx->bgCheckFlags &= ~0x1;
} else {
- func_8002F580(thisx, play);
+ Actor_OfferCarry(thisx, play);
}
}
}
diff --git a/soh/src/overlays/actors/ovl_En_Niw/z_en_niw.c b/soh/src/overlays/actors/ovl_En_Niw/z_en_niw.c
index 3d8fb45c3..6e1fc7238 100644
--- a/soh/src/overlays/actors/ovl_En_Niw/z_en_niw.c
+++ b/soh/src/overlays/actors/ovl_En_Niw/z_en_niw.c
@@ -490,7 +490,7 @@ void func_80AB6570(EnNiw* this, PlayState* play) {
this->actionFunc = func_80AB6BF8;
return;
}
- func_8002F580(&this->actor, play);
+ Actor_OfferCarry(&this->actor, play);
} else {
if (this->path != 0) {
this->unk_2A6 = 1;
@@ -695,7 +695,7 @@ void func_80AB6D08(EnNiw* this, PlayState* play) {
this->actionFunc = func_80AB6BF8;
} else {
if (this->timer5 >= 6) {
- func_8002F580(&this->actor, play);
+ Actor_OfferCarry(&this->actor, play);
}
func_80AB5BF8(this, play, 2);
}
diff --git a/soh/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c b/soh/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c
index df5b7e106..f2035bdaf 100644
--- a/soh/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c
+++ b/soh/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c
@@ -1583,7 +1583,7 @@ void func_80AEE568(EnRu1* this, PlayState* play) {
if (!func_80AEE394(this, play)) {
if ((this->actor.bgCheckFlags & 1) && (this->actor.speedXZ == 0.0f) && (this->actor.minVelocityY == 0.0f)) {
func_80AEE02C(this);
- func_8002F580(&this->actor, play);
+ Actor_OfferCarry(&this->actor, play);
this->action = 27;
func_80AEADD8(this);
} else if (this->actor.yDistToWater > 0.0f) {
@@ -1684,7 +1684,7 @@ void func_80AEE7C4(EnRu1* this, PlayState* play) {
s32 func_80AEEAC8(EnRu1* this, PlayState* play) {
if (this->actor.bgCheckFlags & 1) {
func_80AEE02C(this);
- func_8002F580(&this->actor, play);
+ Actor_OfferCarry(&this->actor, play);
this->action = 27;
func_80AEADD8(this);
return true;
@@ -1702,7 +1702,7 @@ void func_80AEEB24(EnRu1* this, PlayState* play) {
}
void func_80AEEBB4(EnRu1* this, PlayState* play) {
- func_8002F580(&this->actor, play);
+ Actor_OfferCarry(&this->actor, play);
}
void func_80AEEBD4(EnRu1* this, PlayState* play) {
@@ -1854,7 +1854,7 @@ void func_80AEF1F0(EnRu1* this, PlayState* play, UNK_TYPE arg2) {
Message_CloseTextbox(play);
Flags_SetInfTable(INFTABLE_143);
func_80AED6DC(this, play);
- func_8002F580(&this->actor, play);
+ Actor_OfferCarry(&this->actor, play);
this->action = 27;
func_80AEADD8(this);
}
diff --git a/soh/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c b/soh/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c
index 70ae15fd8..53e130144 100644
--- a/soh/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c
+++ b/soh/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c
@@ -215,7 +215,7 @@ void ObjKibako_Idle(ObjKibako* this, PlayState* play) {
}
}
if (this->actor.xzDistToPlayer < 100.0f) {
- func_8002F580(&this->actor, play);
+ Actor_OfferCarry(&this->actor, play);
}
}
}