mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-17 22:02:19 -05:00
Rename two Actor functions from decomp (#4674)
This commit is contained in:
parent
1a5632e3b5
commit
5d8e7740ef
@ -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);
|
||||
|
@ -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:
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user