From 7611d833d9db0883ecfd94630c0e2a86cf089aa7 Mon Sep 17 00:00:00 2001 From: Derek Hensley Date: Mon, 3 Jan 2022 23:28:25 -0800 Subject: [PATCH] SubS Actor Getters OK (#475) * Bring over matching actor getters * Add arg names * Rename functions * Adjust rename_sym script to update sizes csvs * Fix wrong function prototype * whitespace * Rename functions * Fix actorfixer * Format * Add function comments and file header * Fix merge * format * Fix merge * format * Move D_0407D590 down * Fix merge * Steal idea from z_actor PR to return directly * Swap function name order * Fix merge --- include/functions.h | 8 +- include/z64.h | 2 +- include/z64actor.h | 2 + src/code/z_en_hy.c | 2 +- src/code/z_sub_s.c | 112 +++++++++++++++++- src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c | 2 +- .../actors/ovl_En_Bigslime/z_en_bigslime.c | 3 +- .../actors/ovl_En_Bji_01/z_en_bji_01.c | 6 +- src/overlays/actors/ovl_En_Dno/z_en_dno.c | 11 +- src/overlays/actors/ovl_En_Door/z_en_door.h | 5 +- src/overlays/actors/ovl_En_Gb2/z_en_gb2.c | 2 +- src/overlays/actors/ovl_En_Geg/z_en_geg.c | 2 +- src/overlays/actors/ovl_En_Gm/z_en_gm.c | 4 +- src/overlays/actors/ovl_En_Go/z_en_go.c | 2 +- src/overlays/actors/ovl_En_Gs/z_en_gs.c | 9 +- src/overlays/actors/ovl_En_In/z_en_in.c | 2 +- src/overlays/actors/ovl_En_Pm/z_en_pm.c | 16 +-- .../actors/ovl_En_Suttari/z_en_suttari.c | 2 +- .../actors/ovl_En_Thiefbird/z_en_thiefbird.c | 2 +- src/overlays/actors/ovl_En_Tk/z_en_tk.c | 10 +- src/overlays/actors/ovl_TG_Sw/z_tg_sw.c | 4 +- tools/actorfixer.py | 41 ++----- tools/disasm/functions.txt | 8 +- tools/rename_sym.sh | 2 +- tools/sizes/code_functions.csv | 8 +- 25 files changed, 177 insertions(+), 90 deletions(-) diff --git a/include/functions.h b/include/functions.h index a3641cf60b..1522d6c1b4 100644 --- a/include/functions.h +++ b/include/functions.h @@ -2618,7 +2618,7 @@ void func_8013A46C(s32 flag); u32 func_8013A4C4(s32 flag); s16 func_8013A504(s16 val); s32 func_8013A530(GlobalContext* globalCtx, Actor* actor, s32 flag, Vec3f* pos, Vec3s* rot, f32 distanceMin, f32 distanceMax, s16 angleError); -Actor* func_8013A7C0(GlobalContext* globalCtx, s32 arg1); +struct EnDoor* SubS_FindDoor(GlobalContext* globalCtx, s32 unk_1A5); Gfx* func_8013A860(GlobalContext* globalCtx, s32 idx, void** skeleton, Vec3s* jointTable, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, UnkActorDraw unkActorDraw, Actor* actor, Mtx** mtx, Gfx* gfx); Gfx* func_8013AB00(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw, UnkActorDraw unkActorDraw, Actor* actor, Gfx* gfx); s32 func_8013AD6C(GlobalContext* globalCtx); @@ -2631,7 +2631,7 @@ void func_8013B350(Vec3f* arg0, f32* arg1, f32 arg2, s32 arg3, s32 arg4, Vec3s* s32 func_8013B6B0(Path* path, f32* arg1, s32* arg2, s32 arg3, s32 arg4, s32* arg5, f32* arg6, Vec3f* arg7, s32 arg8); void func_8013B878(GlobalContext* globalCtx, Path* path, s32 arg2, Vec3f* arg3); Path* func_8013BB34(GlobalContext* globalCtx, u8 arg1, s32 arg2); -Actor* func_8013BB7C(Actor* actor, GlobalContext* globalCtx, u8 actorCategory, s16 actorId); +Actor* SubS_FindNearestActor(Actor* actor, GlobalContext* globalCtx, u8 actorCategory, s16 actorId); s32 func_8013BC6C(SkelAnime* skelAnime, ActorAnimationEntryS* arg1, s32 arg2); s32 func_8013BD40(Actor* actor, Path* path, s32 arg2); Path* func_8013BEDC(GlobalContext* globalCtx, u8 arg1, u8 arg2, s32* arg3); @@ -2652,7 +2652,7 @@ s32 func_8013D768(Actor* actor, Vec3f* arg1, s16 arg2); s16 func_8013D83C(Path* path, s32 pointIdx, Vec3f* pos, f32* distSq); s8 func_8013D8DC(s8 arg0, GlobalContext* globalCtx); s8 func_8013D924(s16 arg0, GlobalContext* globalCtx); -Actor* func_ActorCategoryIterateById(GlobalContext* globalCtx, Actor* actorListStart, u8 actorCategory, s16 actorId); +Actor* SubS_FindActor(GlobalContext* globalCtx, Actor* actorListStart, u8 actorCategory, s16 actorId); s32 func_8013D9C8(GlobalContext* globalCtx, s16* arg1, s16* arg2, s32 arg3); s32 func_8013DB90(GlobalContext* globalCtx, Vec3f* arg1, f32 arg2); s32 func_8013DC40(Path* arg0, s32 arg1, s32 arg2, Vec3f* arg3); @@ -2667,7 +2667,7 @@ s32 func_8013E2D4(Actor* actor, s16 arg1, s16 arg2, s32 arg3); s32 func_8013E3B8(Actor* actor, s16 cutscenes[], s16 len); void func_8013E4B0(Vec3f* arg0, Vec3f* arg1, Vec3s* arg2, Plane* plane); s32 func_8013E5CC(Vec3f* arg0, Vec3s* arg1, Vec3f* arg2, Vec3f* arg3, Vec3f* arg4, Vec3f* arg5); -Actor* func_8013E640(GlobalContext* globalCtx, Actor* arg1, Actor* actorListStart, u8 actorCategory, s16 actorId, void* arg5, func_8013E640_arg6 arg6); +Actor* SubS_FindActorCustom(GlobalContext* globalCtx, Actor* actor, Actor* actorListStart, u8 actorCategory, s16 actorId, void* verifyData, VerifyActor verifyActor); s32 func_8013E748(Actor* actor, GlobalContext* globalCtx, f32 arg2, f32 arg3, s32 arg4, Vec3s* arg5, func_8013E748_arg6 arg6); s32 func_8013E7C0(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2); void func_8013E8F8(Actor* actor, GlobalContext* globalCtx, f32 arg2, f32 arg3, s32 arg4, s16 arg5, s16 arg6); diff --git a/include/z64.h b/include/z64.h index e34af950e1..636449c33e 100644 --- a/include/z64.h +++ b/include/z64.h @@ -1504,7 +1504,7 @@ typedef struct { typedef s32 (*func_8013E748_arg6)(struct GlobalContext*, Actor*, Vec3s*); -typedef s32 (*func_8013E640_arg6)(struct GlobalContext*, Actor*, Actor*, void*); +typedef s32 (*VerifyActor)(struct GlobalContext*, Actor*, Actor*, void*); struct struct_8013DF3C_arg1; typedef void (*struct_8013DF3C_arg1_unk_func1)(struct GlobalContext*, struct struct_8013DF3C_arg1*); diff --git a/include/z64actor.h b/include/z64actor.h index 2b35bec243..9cbf9885e2 100644 --- a/include/z64actor.h +++ b/include/z64actor.h @@ -15,6 +15,8 @@ struct GlobalContext; struct Lights; struct CollisionPoly; +struct EnDoor; + typedef void(*ActorFunc)(struct Actor* this, struct GlobalContext* globalCtx); typedef struct { diff --git a/src/code/z_en_hy.c b/src/code/z_en_hy.c index 73adc5fa58..323dc14f87 100644 --- a/src/code/z_en_hy.c +++ b/src/code/z_en_hy.c @@ -66,7 +66,7 @@ Actor* EnHy_FindNearestDoor(Actor* actor, GlobalContext* globalCtx) { f32 minDist = 0.0f; do { - doorIter = func_ActorCategoryIterateById(globalCtx, doorIter, ACTORCAT_DOOR, ACTOR_EN_DOOR); + doorIter = SubS_FindActor(globalCtx, doorIter, ACTORCAT_DOOR, ACTOR_EN_DOOR); door = doorIter; dist = Actor_DistanceBetweenActors(actor, door); if (!isSetup || (dist < minDist)) { diff --git a/src/code/z_sub_s.c b/src/code/z_sub_s.c index 1ab44acc10..3255b86d89 100644 --- a/src/code/z_sub_s.c +++ b/src/code/z_sub_s.c @@ -1,6 +1,40 @@ -#include "global.h" +/* + * File: z_sub_s.c + * Description: Various miscellaneous helpers + */ -#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013A7C0.s") +#include "global.h" +#include "overlays/actors/ovl_En_Door/z_en_door.h" + +/** + * Finds the first EnDoor instance with unk_1A4 == 5 and the specified unk_1A5. + */ +EnDoor* SubS_FindDoor(GlobalContext* globalCtx, s32 unk_1A5) { + Actor* actor = NULL; + EnDoor* door; + + while (true) { + actor = SubS_FindActor(globalCtx, actor, ACTORCAT_DOOR, ACTOR_EN_DOOR); + door = (EnDoor*)actor; + + if (actor == NULL) { + break; + } + + if ((door->unk_1A4 == 5) && (door->unk_1A5 == (u8)unk_1A5)) { + break; + } + + if (actor->next == NULL) { + door = NULL; + break; + } + + actor = actor->next; + } + + return door; +} #pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013A860.s") @@ -26,7 +60,40 @@ #pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013BB34.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013BB7C.s") +/** + * Finds the nearest actor instance of a specified Id and category to an actor. + */ +Actor* SubS_FindNearestActor(Actor* actor, GlobalContext* globalCtx, u8 actorCategory, s16 actorId) { + Actor* actorIter = NULL; + Actor* actorTmp; + f32 dist; + Actor* closestActor = NULL; + f32 minDist = 99999.0f; + s32 isSetup = false; + + do { + actorIter = SubS_FindActor(globalCtx, actorIter, actorCategory, actorId); + + actorTmp = actorIter; + if (actorTmp == NULL) { + break; + } + actorIter = actorTmp; + + if (actorIter != actor) { + dist = Actor_DistanceBetweenActors(actor, actorIter); + if (!isSetup || dist < minDist) { + closestActor = actorIter; + minDist = dist; + isSetup = true; + } + } + + actorIter = actorIter->next; + } while (actorIter != NULL); + + return closestActor; +} #pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013BC6C.s") @@ -68,7 +135,22 @@ #pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013D924.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_ActorCategoryIterateById.s") +/** + * Finds the first actor instance of a specified Id and category. + */ +Actor* SubS_FindActor(GlobalContext* globalCtx, Actor* actorListStart, u8 actorCategory, s16 actorId) { + Actor* actor = actorListStart; + + if (actor == NULL) { + actor = globalCtx->actorCtx.actorList[actorCategory].first; + } + + while (actor != NULL && actorId != actor->id) { + actor = actor->next; + } + + return actor; +} #pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013D9C8.s") @@ -100,7 +182,27 @@ #pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013E5CC.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013E640.s") +/** + * Finds the first actor instance of a specified Id and category verified with a custom callback. + * The callback should return `true` when the actor is succesfully verified. + */ +Actor* SubS_FindActorCustom(GlobalContext* globalCtx, Actor* actor, Actor* actorListStart, u8 actorCategory, + s16 actorId, void* verifyData, VerifyActor verifyActor) { + Actor* actorIter = actorListStart; + + if (actorListStart == NULL) { + actorIter = globalCtx->actorCtx.actorList[actorCategory].first; + } + + while (actorIter != NULL && (actorId != actorIter->id || + (actorId == actorIter->id && + (verifyActor == NULL || + (verifyActor != NULL && !verifyActor(globalCtx, actor, actorIter, verifyData)))))) { + actorIter = actorIter->next; + } + + return actorIter; +} #pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013E748.s") diff --git a/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c b/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c index 7ea98689ec..43b7d3feb9 100644 --- a/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c +++ b/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c @@ -464,7 +464,7 @@ void EnBigpo_SpawnCutsceneStage8(EnBigpo* this, GlobalContext* globalCtx) { Play_CameraSetAtEye(globalCtx, MAIN_CAM, &subCam->at, &subCam->eye); this->cutsceneSubCamId = SUBCAM_FREE; if (this->actor.params == ENBIGPO_SUMMONED) { - dampe = func_ActorCategoryIterateById(globalCtx, NULL, ACTORCAT_NPC, ACTOR_EN_TK); + dampe = SubS_FindActor(globalCtx, NULL, ACTORCAT_NPC, ACTOR_EN_TK); if (dampe != NULL) { // if dampe exists, switch to viewing his running away cutscene dampe->params = this->actor.cutscene; diff --git a/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c b/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c index 42395579eb..0133b303aa 100644 --- a/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c +++ b/src/overlays/actors/ovl_En_Bigslime/z_en_bigslime.c @@ -2585,8 +2585,7 @@ void EnBigslime_ApplyDamageEffectBigslime(EnBigslime* this, GlobalContext* globa EnBigslime_SetPlayerParams(this, globalCtx); this->rotation = 0; EnBigslime_SetupFreeze(this); - minislime = (EnMinislime*)func_ActorCategoryIterateById(globalCtx, NULL, ACTORCAT_ITEMACTION, - ACTOR_ARROW_ICE); + minislime = (EnMinislime*)SubS_FindActor(globalCtx, NULL, ACTORCAT_ITEMACTION, ACTOR_ARROW_ICE); if (minislime != NULL) { minislime->shakeRefPos.z = -100.0f; } diff --git a/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.c b/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.c index ee51c74444..3b72202214 100644 --- a/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.c +++ b/src/overlays/actors/ovl_En_Bji_01/z_en_bji_01.c @@ -116,8 +116,7 @@ void func_809CCEE8(EnBji01* this, GlobalContext* globalCtx) { return; } } else { - this->moonsTear = - (ObjMoonStone*)func_ActorCategoryIterateById(globalCtx, NULL, ACTORCAT_PROP, ACTOR_OBJ_MOON_STONE); + this->moonsTear = (ObjMoonStone*)SubS_FindActor(globalCtx, NULL, ACTORCAT_PROP, ACTOR_OBJ_MOON_STONE); } func_800B8500(&this->actor, globalCtx, 60.0f, 10.0f, 0); } @@ -350,8 +349,7 @@ void EnBji01_Init(Actor* thisx, GlobalContext* globalCtx) { Actor_SetScale(&this->actor, 0.01f); func_8013E3B8(&this->actor, this->cutscenes, ARRAY_COUNT(this->cutscenes)); /* initializes all elements of cutscenes to -1 */ - this->moonsTear = - (ObjMoonStone*)func_ActorCategoryIterateById(globalCtx, NULL, ACTORCAT_PROP, ACTOR_OBJ_MOON_STONE); + this->moonsTear = (ObjMoonStone*)SubS_FindActor(globalCtx, NULL, ACTORCAT_PROP, ACTOR_OBJ_MOON_STONE); switch (gSaveContext.entranceIndex) { case 0x4C00: /* Observatory from ECT */ diff --git a/src/overlays/actors/ovl_En_Dno/z_en_dno.c b/src/overlays/actors/ovl_En_Dno/z_en_dno.c index 2e82973da5..6b03849ae0 100644 --- a/src/overlays/actors/ovl_En_Dno/z_en_dno.c +++ b/src/overlays/actors/ovl_En_Dno/z_en_dno.c @@ -135,7 +135,7 @@ void func_80A714B4(EnDno* this, GlobalContext* globalCtx) { Actor* actor = NULL; do { - actor = func_ActorCategoryIterateById(globalCtx, actor, ACTORCAT_BG, ACTOR_BG_CRACE_MOVEBG); + actor = SubS_FindActor(globalCtx, actor, ACTORCAT_BG, ACTOR_BG_CRACE_MOVEBG); if (actor != NULL) { if ((s32)ENDNO_GET_F(actor) == ENDNO_GET_F_1) { Actor_SetSwitchFlag(globalCtx, ENDNO_GET_7F0(actor)); @@ -165,8 +165,7 @@ void func_80A715DC(EnDno* this, GlobalContext* globalCtx) { Vec3f sp70; do { - crace = - (BgCraceMovebg*)func_ActorCategoryIterateById(globalCtx, &crace->actor, ACTORCAT_BG, ACTOR_BG_CRACE_MOVEBG); + crace = (BgCraceMovebg*)SubS_FindActor(globalCtx, &crace->actor, ACTORCAT_BG, ACTOR_BG_CRACE_MOVEBG); if (crace != NULL) { if (ENDNO_GET_F(&crace->actor) == ENDNO_GET_F_0 && !(crace->unk_170 & 1)) { if (func_8013E5CC(&crace->actor.home.pos, &crace->actor.home.rot, &D_80A73B2C, &this->actor.prevPos, @@ -188,7 +187,7 @@ void func_80A71788(EnDno* this, GlobalContext* globalCtx) { Actor* actor = NULL; do { - actor = func_ActorCategoryIterateById(globalCtx, actor, ACTORCAT_BG, ACTOR_BG_CRACE_MOVEBG); + actor = SubS_FindActor(globalCtx, actor, ACTORCAT_BG, ACTOR_BG_CRACE_MOVEBG); if (actor != NULL) { Actor_UnsetSwitchFlag(globalCtx, ENDNO_GET_7F0(actor)); actor = actor->next; @@ -202,7 +201,7 @@ void EnDno_Init(Actor* thisx, GlobalContext* globalCtx) { Actor* actor = NULL; while (true) { - actor = func_ActorCategoryIterateById(globalCtx, actor, ACTORCAT_NPC, ACTOR_EN_DNO); + actor = SubS_FindActor(globalCtx, actor, ACTORCAT_NPC, ACTOR_EN_DNO); if (actor != NULL) { if (actor != thisx) { Actor_MarkForDeath(thisx); @@ -249,7 +248,7 @@ void EnDno_Init(Actor* thisx, GlobalContext* globalCtx) { Actor_MarkForDeath(thisx); } else { func_8013E1C8(&this->skelAnime, sAnimations, 13, &this->unk_32C); - this->unk_460 = func_ActorCategoryIterateById(globalCtx, NULL, ACTORCAT_NPC, ACTOR_EN_DNQ); + this->unk_460 = SubS_FindActor(globalCtx, NULL, ACTORCAT_NPC, ACTOR_EN_DNQ); if (this->unk_460 == NULL) { Actor_MarkForDeath(thisx); } else { diff --git a/src/overlays/actors/ovl_En_Door/z_en_door.h b/src/overlays/actors/ovl_En_Door/z_en_door.h index 7331339fcf..6ed5aac156 100644 --- a/src/overlays/actors/ovl_En_Door/z_en_door.h +++ b/src/overlays/actors/ovl_En_Door/z_en_door.h @@ -12,7 +12,10 @@ typedef struct EnDoor { /* 0x144 */ char unk_144[0x5C]; /* 0x1A0 */ s8 unk_1A0; /* 0x1A1 */ s8 unk_1A1; - /* 0x1A2 */ char unk_1A2[0x5]; + /* 0x1A2 */ char unk_1A2[0x2]; + /* 0x1A4 */ u8 unk_1A4; + /* 0x1A5 */ u8 unk_1A5; + /* 0x1A6 */ s8 unk_1A6; /* 0x1A7 */ s8 unk_1A7; /* 0x1A8 */ char unk_1A8[0x20]; /* 0x1C8 */ EnDoorActionFunc actionFunc; diff --git a/src/overlays/actors/ovl_En_Gb2/z_en_gb2.c b/src/overlays/actors/ovl_En_Gb2/z_en_gb2.c index 1141afd1eb..15a1db429c 100644 --- a/src/overlays/actors/ovl_En_Gb2/z_en_gb2.c +++ b/src/overlays/actors/ovl_En_Gb2/z_en_gb2.c @@ -100,7 +100,7 @@ s32 func_80B0F660(EnGb2* this, GlobalContext* globalCtx) { Actor* phi_s0 = NULL; while (true) { - temp_v0 = func_ActorCategoryIterateById(globalCtx, phi_s0, ACTORCAT_NPC, ACTOR_EN_GB2); + temp_v0 = SubS_FindActor(globalCtx, phi_s0, ACTORCAT_NPC, ACTOR_EN_GB2); if (temp_v0 == NULL) { break; } diff --git a/src/overlays/actors/ovl_En_Geg/z_en_geg.c b/src/overlays/actors/ovl_En_Geg/z_en_geg.c index b915aef0d3..e31d3d50ab 100644 --- a/src/overlays/actors/ovl_En_Geg/z_en_geg.c +++ b/src/overlays/actors/ovl_En_Geg/z_en_geg.c @@ -259,7 +259,7 @@ Vec3f* func_80BB19C0(Vec3f* arg0, EnGeg* this, GlobalContext* globalCtx) { u8 func_80BB1B14(EnGeg* this, GlobalContext* globalCtx) { Actor* explosive; - Actor* mm = func_ActorCategoryIterateById(globalCtx, NULL, ACTORCAT_ITEMACTION, ACTOR_EN_MM); + Actor* mm = SubS_FindActor(globalCtx, NULL, ACTORCAT_ITEMACTION, ACTOR_EN_MM); if (mm != NULL) { this->unk_4B0 = Math_Vec3f_Yaw(&this->actor.world.pos, &mm->world.pos); 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 5f3854a138..b6b8bc8ad6 100644 --- a/src/overlays/actors/ovl_En_Gm/z_en_gm.c +++ b/src/overlays/actors/ovl_En_Gm/z_en_gm.c @@ -159,7 +159,7 @@ Actor* func_8094DEE0(EnGm* this, GlobalContext* globalCtx, u8 arg2, s16 arg3) { Actor* actor; while (true) { - actor = func_ActorCategoryIterateById(globalCtx, foundActor, arg2, arg3); + actor = SubS_FindActor(globalCtx, foundActor, arg2, arg3); foundActor = actor; if (actor == NULL) { break; @@ -212,7 +212,7 @@ EnDoor* func_8094DF90(GlobalContext* globalCtx, s32 arg1) { phi_a1 = -1; } - return (EnDoor*)func_8013A7C0(globalCtx, phi_a1); + return SubS_FindDoor(globalCtx, phi_a1); } s32 func_8094DFF8(EnGm* this, GlobalContext* globalCtx) { 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 32ababfcfb..0f7bb8fb7b 100644 --- a/src/overlays/actors/ovl_En_Go/z_en_go.c +++ b/src/overlays/actors/ovl_En_Go/z_en_go.c @@ -953,7 +953,7 @@ Actor* func_80A13400(EnGo* this, GlobalContext* globalCtx) { Actor* retActor = NULL; while (true) { - actor = func_ActorCategoryIterateById(globalCtx, retActor, ACTORCAT_NPC, ACTOR_EN_GO); + actor = SubS_FindActor(globalCtx, retActor, ACTORCAT_NPC, ACTOR_EN_GO); retActor = actor; if ((actor != NULL) && ((EnGo*)actor != this) && (ENGO_GET_F(actor) == ENGO_F_4) && 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 8e50b07947..b5199982f4 100644 --- a/src/overlays/actors/ovl_En_Gs/z_en_gs.c +++ b/src/overlays/actors/ovl_En_Gs/z_en_gs.c @@ -35,7 +35,7 @@ s32 func_809995A4(EnGs* this, GlobalContext* globalCtx); void func_80999A8C(EnGs* this, GlobalContext* globalCtx); void func_80999AC0(EnGs* this); -extern Gfx D_0407D590[]; +extern Gfx gGameplayKeepDrawFlameDL[]; extern Gfx D_06000950[]; extern Gfx D_060009D0[]; extern Gfx D_06000A60[]; @@ -363,7 +363,7 @@ void func_809984F4(EnGs* this, GlobalContext* globalCtx) { EnGs* gossipStone = NULL; do { - gossipStone = (EnGs*)func_ActorCategoryIterateById(globalCtx, &gossipStone->actor, ACTORCAT_PROP, ACTOR_EN_GS); + gossipStone = (EnGs*)SubS_FindActor(globalCtx, &gossipStone->actor, ACTORCAT_PROP, ACTOR_EN_GS); if (gossipStone != NULL) { if ((this != gossipStone) && (this->unk_194 == gossipStone->unk_194)) { gossipStone->unk_19A |= 1; @@ -396,8 +396,7 @@ void func_809985B8(EnGs* this, GlobalContext* globalCtx) { gossipStone = NULL; do { - gossipStone = - (EnGs*)func_ActorCategoryIterateById(globalCtx, &gossipStone->actor, ACTORCAT_PROP, ACTOR_EN_GS); + gossipStone = (EnGs*)SubS_FindActor(globalCtx, &gossipStone->actor, ACTORCAT_PROP, ACTOR_EN_GS); if (gossipStone != NULL) { if ((gossipStone != this) && (gossipStone->actor.params == ENGS_2) && (gossipStone->unk_198 == this->unk_198)) { @@ -1103,7 +1102,7 @@ void EnGs_Draw(Actor* thisx, GlobalContext* globalCtx) { Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, -frames * 20, 0x20, 0x80)); gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 0, 255); gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0); - gSPDisplayList(POLY_XLU_DISP++, D_0407D590); + gSPDisplayList(POLY_XLU_DISP++, gGameplayKeepDrawFlameDL); } CLOSE_DISPS(globalCtx->state.gfxCtx); 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 800e44c6fb..0b9932e253 100644 --- a/src/overlays/actors/ovl_En_In/z_en_in.c +++ b/src/overlays/actors/ovl_En_In/z_en_in.c @@ -369,7 +369,7 @@ void func_808F38F8(EnIn* this, GlobalContext* globalCtx) { this->unk4A4 = NULL; while (true) { //! @bug: Infinite loop if there is only one ACTOR_EN_IN - this->unk4A4 = (EnIn*)func_ActorCategoryIterateById(globalCtx, &this->unk4A4->actor, ACTORCAT_NPC, ACTOR_EN_IN); + this->unk4A4 = (EnIn*)SubS_FindActor(globalCtx, &this->unk4A4->actor, ACTORCAT_NPC, ACTOR_EN_IN); if (this->unk4A4 != NULL && this->unk4A4 != this) { break; } diff --git a/src/overlays/actors/ovl_En_Pm/z_en_pm.c b/src/overlays/actors/ovl_En_Pm/z_en_pm.c index 5993ab3664..28ed05d9d7 100644 --- a/src/overlays/actors/ovl_En_Pm/z_en_pm.c +++ b/src/overlays/actors/ovl_En_Pm/z_en_pm.c @@ -315,7 +315,7 @@ Actor* func_80AF7CB0(EnPm* this, GlobalContext* globalCtx, u8 actorCat, s16 acto Actor* actor; while (true) { - actor = func_ActorCategoryIterateById(globalCtx, phi_s0, actorCat, actorId); + actor = SubS_FindActor(globalCtx, phi_s0, actorCat, actorId); phi_s0 = actor; if (actor == NULL) { @@ -338,7 +338,7 @@ Actor* func_80AF7CB0(EnPm* this, GlobalContext* globalCtx, u8 actorCat, s16 acto return phi_s0; } -Actor* func_80AF7D60(GlobalContext* globalCtx, s32 arg1) { +EnDoor* func_80AF7D60(GlobalContext* globalCtx, s32 arg1) { s32 phi_a1; switch (arg1) { @@ -367,7 +367,7 @@ Actor* func_80AF7D60(GlobalContext* globalCtx, s32 arg1) { return NULL; } - return func_8013A7C0(globalCtx, phi_a1); + return SubS_FindDoor(globalCtx, phi_a1); } Actor* func_80AF7DC4(EnPm* this, GlobalContext* globalCtx, s32 arg2) { @@ -375,7 +375,7 @@ Actor* func_80AF7DC4(EnPm* this, GlobalContext* globalCtx, s32 arg2) { Actor* actor; while (true) { - actor = func_ActorCategoryIterateById(globalCtx, phi_s0, ACTORCAT_PROP, ACTOR_EN_PST); + actor = SubS_FindActor(globalCtx, phi_s0, ACTORCAT_PROP, ACTOR_EN_PST); phi_s0 = actor; if (actor == NULL) { @@ -942,7 +942,7 @@ s32 func_80AF8ED4(EnPm* this, GlobalContext* globalCtx, struct_80133038_arg2* ar s32 func_80AF9008(EnPm* this, GlobalContext* globalCtx, struct_80133038_arg2* arg2) { u16 sp56 = gSaveContext.time - 0x3FFC; u8 sp55 = this->actor.params & 0xFF; - Actor* sp50; + EnDoor* sp50; Vec3s* sp4C; Vec3f sp40; Vec3f sp34; @@ -955,7 +955,7 @@ s32 func_80AF9008(EnPm* this, GlobalContext* globalCtx, struct_80133038_arg2* ar this->unk_234 = func_8013BB34(globalCtx, sp55, D_80AFB430[arg2->unk0]); } - if ((sp50 != NULL) && (sp50->update != NULL)) { + if ((sp50 != NULL) && (sp50->actor.update != NULL)) { if (this->unk_234 != 0) { sp4C = (Vec3s*)Lib_SegmentedToVirtual(this->unk_234->points); Math_Vec3s_ToVec3f(&sp40, &sp4C[0]); @@ -964,7 +964,7 @@ s32 func_80AF9008(EnPm* this, GlobalContext* globalCtx, struct_80133038_arg2* ar Math_Vec3f_Copy(&this->unk_278, &sp34); this->actor.world.rot.y = Math_Vec3f_Yaw(&sp40, &sp34); Math_Vec3f_Copy(&this->actor.world.pos, &sp40); - temp = this->actor.world.rot.y - sp50->shape.rot.y; + temp = this->actor.world.rot.y - sp50->actor.shape.rot.y; if (ABS_ALT(temp) <= 0x4000) { this->unk_260 = -0x4B; } else { @@ -1409,7 +1409,7 @@ s32 func_80AF9BF8(EnPm* this, GlobalContext* globalCtx, struct_80133038_arg2* ar } s32 func_80AF9D04(EnPm* this, GlobalContext* globalCtx) { - EnDoor* sp44 = (EnDoor*)func_80AF7D60(globalCtx, this->unk_258); + EnDoor* sp44 = func_80AF7D60(globalCtx, this->unk_258); Vec3f sp38; Vec3f* sp28; f32 temp; diff --git a/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c b/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c index 9cc8897a2e..7e4bbcc2d5 100644 --- a/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c +++ b/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c @@ -689,7 +689,7 @@ s32 func_80BABDD8(EnSuttari* this, GlobalContext* globalCtx, struct_80133038_arg if (this->unk428 == 10 || this->unk428 == 11 || this->unk428 == 2) { return 0; } - sp48 = (EnDoor*)func_8013BB7C(&this->actor, globalCtx, ACTORCAT_DOOR, ACTOR_EN_DOOR); + sp48 = (EnDoor*)SubS_FindNearestActor(&this->actor, globalCtx, ACTORCAT_DOOR, ACTOR_EN_DOOR); sp24 = D_80BAE8F8[unkStruct->unk0]; if ((sp48 != NULL) && (sp24 >= 0)) { this->unk404 = func_8013BB34(globalCtx, sp47, sp24); diff --git a/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c b/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c index 1ba2e51258..f2ae5333c1 100644 --- a/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c +++ b/src/overlays/actors/ovl_En_Thiefbird/z_en_thiefbird.c @@ -429,7 +429,7 @@ void func_80C11338(EnThiefbird* this, GlobalContext* globalCtx) { this->unk_3EC = NULL; do { - item = (EnItem00*)func_ActorCategoryIterateById(globalCtx, &item->actor, ACTORCAT_MISC, ACTOR_EN_ITEM00); + item = (EnItem00*)SubS_FindActor(globalCtx, &item->actor, ACTORCAT_MISC, ACTOR_EN_ITEM00); if (item != NULL) { if (item->unk152 > 0) { if (Actor_XZDistanceBetweenActors(&player->actor, &item->actor) > 10.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 74577c188b..1792736d7c 100644 --- a/src/overlays/actors/ovl_En_Tk/z_en_tk.c +++ b/src/overlays/actors/ovl_En_Tk/z_en_tk.c @@ -450,7 +450,7 @@ s32 func_80AECE60(EnTk* this, GlobalContext* globalCtx) { door1 = NULL; label: do { - door1 = func_ActorCategoryIterateById(globalCtx, door1, ACTORCAT_DOOR, ACTOR_EN_DOOR); + door1 = SubS_FindActor(globalCtx, door1, ACTORCAT_DOOR, ACTOR_EN_DOOR); if (door1 != NULL) { if (Actor_XZDistanceBetweenActors(&this->actor, door1) <= 120.0f) { if (ABS(BINANG_SUB(Actor_YawToPoint(&this->actor, &door1->world.pos), this->actor.shape.rot.y)) <= @@ -466,7 +466,7 @@ s32 func_80AECE60(EnTk* this, GlobalContext* globalCtx) { } else { door2 = NULL; do { - door2 = func_ActorCategoryIterateById(globalCtx, door2, ACTORCAT_DOOR, ACTOR_EN_DOOR); + door2 = SubS_FindActor(globalCtx, door2, ACTORCAT_DOOR, ACTOR_EN_DOOR); if (door2 != NULL) { if (Actor_XZDistanceBetweenActors(&this->actor, door2) <= 160.0f) { sp4C4 = (EnDoor*)door2; @@ -682,7 +682,7 @@ void func_80AED940(EnTk* this, GlobalContext* globalCtx) { actor = NULL; do { - actor = func_ActorCategoryIterateById(globalCtx, actor, ACTORCAT_NPC, ACTOR_EN_TK); + actor = SubS_FindActor(globalCtx, actor, ACTORCAT_NPC, ACTOR_EN_TK); if (actor != NULL) { if (ENTK_GET_F(actor) == 1) { Math_Vec3f_Copy(&this->unk_2EC, &actor->world.pos); @@ -933,7 +933,7 @@ void func_80AEE374(EnTk* this, GlobalContext* globalCtx) { sp30.unk_00 = NULL; sp30.unk_04 = FLT_MAX; - func_8013E640(globalCtx, &this->actor, NULL, ACTORCAT_NPC, ACTOR_EN_TK, &sp30, func_80AEE300); + SubS_FindActorCustom(globalCtx, &this->actor, NULL, ACTORCAT_NPC, ACTOR_EN_TK, &sp30, func_80AEE300); if (sp30.unk_00 == 0) { Actor_MarkForDeath(&this->actor); } else { @@ -971,7 +971,7 @@ void func_80AEE4D0(EnTk* this, GlobalContext* globalCtx) { if (Animation_OnFrame(&this->skelAnime, 37.0f)) { bigPoe = NULL; do { - bigPoe = func_ActorCategoryIterateById(globalCtx, bigPoe, ACTORCAT_PROP, ACTOR_EN_BIGPO); + bigPoe = SubS_FindActor(globalCtx, bigPoe, ACTORCAT_PROP, ACTOR_EN_BIGPO); if (bigPoe != NULL) { if ((bigPoe->params == 3) && (Actor_DistanceBetweenActors(&this->actor, bigPoe) < 80.0f)) { diff --git a/src/overlays/actors/ovl_TG_Sw/z_tg_sw.c b/src/overlays/actors/ovl_TG_Sw/z_tg_sw.c index d1a6afb3e2..9dcf3ab159 100644 --- a/src/overlays/actors/ovl_TG_Sw/z_tg_sw.c +++ b/src/overlays/actors/ovl_TG_Sw/z_tg_sw.c @@ -56,7 +56,7 @@ void TGSw_ActionExecuteOneShot(TGSw* this, GlobalContext* globalCtx) { if (1) {} do { - actor = func_ActorCategoryIterateById(globalCtx, actor, ACTORCAT_ENEMY, ACTOR_EN_SW); + actor = SubS_FindActor(globalCtx, actor, ACTORCAT_ENEMY, ACTOR_EN_SW); if (actor == NULL) { break; } @@ -71,7 +71,7 @@ void TGSw_ActionExecuteOneShot(TGSw* this, GlobalContext* globalCtx) { actor = NULL; do { - actor = func_ActorCategoryIterateById(globalCtx, actor, ACTORCAT_NPC, ACTOR_EN_SW); + actor = SubS_FindActor(globalCtx, actor, ACTORCAT_NPC, ACTOR_EN_SW); if (actor == NULL) { break; diff --git a/tools/actorfixer.py b/tools/actorfixer.py index 77fe5d38a3..979106fb33 100755 --- a/tools/actorfixer.py +++ b/tools/actorfixer.py @@ -301,28 +301,13 @@ animdict = { "func_8017F9C0": "Math3D_XZInSphere", "func_8017FA34": "Math3D_XYInSphere", "func_8017FAA8": "Math3D_YZInSphere", + "func_8013A7C0": "SubS_FindDoor", + "func_8013E640": "SubS_FindActorCustom", + "func_ActorCategoryIterateById": "SubS_FindActor", + "func_8013BB7C": "SubS_FindNearestActor", "func_800A81F0": "EffectBlure_AddVertex", "func_800A8514": "EffectBlure_AddSpace", "Effect_GetParams": "Effect_GetByIndex", - "D_0407D590": "gGameplayKeepDrawFlameDL", - - - "skelanime.unk03": "skelanime.taper", - "skelanime.animCurrentSeg": "skelanime.animation", - "skelanime.initialFrame": "skelanime.startFrame", - "skelanime.animFrameCount": "skelanime.endFrame", - "skelanime.totalFrames": "skelanime.animLength", - "skelanime.animCurrentFrame": "skelanime.curFrame", - "skelanime.animPlaybackSpeed": "skelanime.playSpeed", - "skelanime.limbDrawTbl": "skelanime.jointTable", - "skelanime.transitionDrawTbl": "skelanime.morphTable", - "skelanime.transCurrentFrame": "skelanime.morphWeight", - "skelanime.transitionStep": "skelanime.morphRate", - "skelanime.animUpdate": "skelanime.update", - "skelanime.flags": "skelanime.moveFlags", - "skelanime.prevFrameRot": "skelanime.prevRot", - "skelanime.prevFramePos": "skelanime.prevTransl", - "skelanime.unk3E": "skelanime.baseTransl", "skelAnime.unk03": "skelAnime.taper", "skelAnime.animCurrentSeg": "skelAnime.animation", @@ -340,16 +325,16 @@ animdict = { "skelAnime.prevFrameRot": "skelAnime.prevRot", "skelAnime.prevFramePos": "skelAnime.prevTransl", "skelAnime.unk3E": "skelAnime.baseTransl", - "actor.yDistToWater" : "actor.depthInWater", - "actor.yDistToPlayer" : "actor.playerHeightRel", + "actor.yDistToWater": "actor.depthInWater", + "actor.yDistToPlayer": "actor.playerHeightRel", + "globalCtx->mf_187FC": "globalCtx->billboardMtxF", + "globalCtx->projectionMatrix": "globalCtx->viewProjectionMtxF", - "globalCtx->mf_187FC" : "globalCtx->billboardMtxF", - "globalCtx->projectionMatrix" : "globalCtx->viewProjectionMtxF", - - "D_801D15B0" : "gZeroVec3f", - "D_801D15BC" : "gZeroVec3s", - "D_801D1DE0" : "gIdentityMtx", - "D_801D1E20" : "gIdentityMtxF", + "D_0407D590": "gGameplayKeepDrawFlameDL", + "D_801D15B0": "gZeroVec3f", + "D_801D15BC": "gZeroVec3s", + "D_801D1DE0": "gIdentityMtx", + "D_801D1E20": "gIdentityMtxF", } def replace_anim(file): diff --git a/tools/disasm/functions.txt b/tools/disasm/functions.txt index 2911e3e105..5b0e2aff88 100644 --- a/tools/disasm/functions.txt +++ b/tools/disasm/functions.txt @@ -2655,7 +2655,7 @@ 0x8013A4C4:("func_8013A4C4",), 0x8013A504:("func_8013A504",), 0x8013A530:("func_8013A530",), - 0x8013A7C0:("func_8013A7C0",), + 0x8013A7C0:("SubS_FindDoor",), 0x8013A860:("func_8013A860",), 0x8013AB00:("func_8013AB00",), 0x8013AD6C:("func_8013AD6C",), @@ -2668,7 +2668,7 @@ 0x8013B6B0:("func_8013B6B0",), 0x8013B878:("func_8013B878",), 0x8013BB34:("func_8013BB34",), - 0x8013BB7C:("func_8013BB7C",), + 0x8013BB7C:("SubS_FindNearestActor",), 0x8013BC6C:("func_8013BC6C",), 0x8013BD40:("func_8013BD40",), 0x8013BEDC:("func_8013BEDC",), @@ -2689,7 +2689,7 @@ 0x8013D83C:("func_8013D83C",), 0x8013D8DC:("func_8013D8DC",), 0x8013D924:("func_8013D924",), - 0x8013D960:("func_ActorCategoryIterateById",), + 0x8013D960:("SubS_FindActor",), 0x8013D9C8:("func_8013D9C8",), 0x8013DB90:("func_8013DB90",), 0x8013DC40:("func_8013DC40",), @@ -2705,7 +2705,7 @@ 0x8013E3B8:("func_8013E3B8",), 0x8013E4B0:("func_8013E4B0",), 0x8013E5CC:("func_8013E5CC",), - 0x8013E640:("func_8013E640",), + 0x8013E640:("SubS_FindActorCustom",), 0x8013E748:("func_8013E748",), 0x8013E7C0:("func_8013E7C0",), 0x8013E8F8:("func_8013E8F8",), diff --git a/tools/rename_sym.sh b/tools/rename_sym.sh index e68966ca7a..227db4df72 100755 --- a/tools/rename_sym.sh +++ b/tools/rename_sym.sh @@ -10,4 +10,4 @@ fi #echo "Replace $1 with $2?" #read -grep -rl "$1" asm/**/*.s src/**/*.{c,h} include/**/*.h tools/disasm/functions.txt tools/disasm/variables.txt | xargs sed -i "s/\b$1\b/$2/g" \ No newline at end of file +grep -rl "$1" asm/**/*.s src/**/*.{c,h} include/**/*.h tools/disasm/functions.txt tools/disasm/variables.txt tools/sizes/*.csv | xargs sed -i "s/\b$1\b/$2/g" diff --git a/tools/sizes/code_functions.csv b/tools/sizes/code_functions.csv index 02830ae3be..1cfe15819d 100644 --- a/tools/sizes/code_functions.csv +++ b/tools/sizes/code_functions.csv @@ -2169,7 +2169,7 @@ asm/non_matchings/code/z_snap/func_8013A46C.s,func_8013A46C,0x8013A46C,0x16 asm/non_matchings/code/z_snap/func_8013A4C4.s,func_8013A4C4,0x8013A4C4,0x10 asm/non_matchings/code/z_snap/func_8013A504.s,func_8013A504,0x8013A504,0xB asm/non_matchings/code/z_snap/func_8013A530.s,func_8013A530,0x8013A530,0xA4 -asm/non_matchings/code/z_sub_s/func_8013A7C0.s,func_8013A7C0,0x8013A7C0,0x28 +asm/non_matchings/code/z_sub_s/SubS_FindDoor.s,SubS_FindDoor,0x8013A7C0,0x28 asm/non_matchings/code/z_sub_s/func_8013A860.s,func_8013A860,0x8013A860,0xA8 asm/non_matchings/code/z_sub_s/func_8013AB00.s,func_8013AB00,0x8013AB00,0x9B asm/non_matchings/code/z_sub_s/func_8013AD6C.s,func_8013AD6C,0x8013AD6C,0xC @@ -2182,7 +2182,7 @@ asm/non_matchings/code/z_sub_s/func_8013B350.s,func_8013B350,0x8013B350,0xD8 asm/non_matchings/code/z_sub_s/func_8013B6B0.s,func_8013B6B0,0x8013B6B0,0x72 asm/non_matchings/code/z_sub_s/func_8013B878.s,func_8013B878,0x8013B878,0xAF asm/non_matchings/code/z_sub_s/func_8013BB34.s,func_8013BB34,0x8013BB34,0x12 -asm/non_matchings/code/z_sub_s/func_8013BB7C.s,func_8013BB7C,0x8013BB7C,0x3C +asm/non_matchings/code/z_sub_s/SubS_FindNearestActor.s,SubS_FindNearestActor,0x8013BB7C,0x3C asm/non_matchings/code/z_sub_s/func_8013BC6C.s,func_8013BC6C,0x8013BC6C,0x35 asm/non_matchings/code/z_sub_s/func_8013BD40.s,func_8013BD40,0x8013BD40,0x67 asm/non_matchings/code/z_sub_s/func_8013BEDC.s,func_8013BEDC,0x8013BEDC,0x63 @@ -2203,7 +2203,7 @@ asm/non_matchings/code/z_sub_s/func_8013D768.s,func_8013D768,0x8013D768,0x35 asm/non_matchings/code/z_sub_s/func_8013D83C.s,func_8013D83C,0x8013D83C,0x28 asm/non_matchings/code/z_sub_s/func_8013D8DC.s,func_8013D8DC,0x8013D8DC,0x12 asm/non_matchings/code/z_sub_s/func_8013D924.s,func_8013D924,0x8013D924,0xF -asm/non_matchings/code/z_sub_s/func_ActorCategoryIterateById.s,func_ActorCategoryIterateById,0x8013D960,0x1A +asm/non_matchings/code/z_sub_s/SubS_FindActor.s,SubS_FindActor,0x8013D960,0x1A asm/non_matchings/code/z_sub_s/func_8013D9C8.s,func_8013D9C8,0x8013D9C8,0x72 asm/non_matchings/code/z_sub_s/func_8013DB90.s,func_8013DB90,0x8013DB90,0x2C asm/non_matchings/code/z_sub_s/func_8013DC40.s,func_8013DC40,0x8013DC40,0x23 @@ -2219,7 +2219,7 @@ asm/non_matchings/code/z_sub_s/func_8013E2D4.s,func_8013E2D4,0x8013E2D4,0x39 asm/non_matchings/code/z_sub_s/func_8013E3B8.s,func_8013E3B8,0x8013E3B8,0x3E asm/non_matchings/code/z_sub_s/func_8013E4B0.s,func_8013E4B0,0x8013E4B0,0x47 asm/non_matchings/code/z_sub_s/func_8013E5CC.s,func_8013E5CC,0x8013E5CC,0x1D -asm/non_matchings/code/z_sub_s/func_8013E640.s,func_8013E640,0x8013E640,0x42 +asm/non_matchings/code/z_sub_s/SubS_FindActorCustom.s,SubS_FindActorCustom,0x8013E640,0x42 asm/non_matchings/code/z_sub_s/func_8013E748.s,func_8013E748,0x8013E748,0x1E asm/non_matchings/code/z_sub_s/func_8013E7C0.s,func_8013E7C0,0x8013E7C0,0x4E asm/non_matchings/code/z_sub_s/func_8013E8F8.s,func_8013E8F8,0x8013E8F8,0x16