From 5d8e7740efb6516ec5001b039feb71ffaf518c5a Mon Sep 17 00:00:00 2001 From: Jordan Longstaff Date: Fri, 13 Dec 2024 17:56:42 -0500 Subject: Rename two Actor functions from decomp (#4674) --- soh/src/code/z_actor.c | 9 ++++----- soh/src/code/z_en_item00.c | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'soh/src/code') 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) { -- cgit v1.2.3