From 702f3cf44e7a6972801150a6d13d6fbb2283f230 Mon Sep 17 00:00:00 2001 From: engineer124 <47598039+engineer124@users.noreply.github.com> Date: Mon, 27 Nov 2023 21:02:28 +1100 Subject: [PATCH] Document Actor Category Change (#1518) * Actor Category Change * cleanup * comments * adj comment * revert small cleanup for libc64 PR * adjust comments --- include/functions.h | 2 +- include/z64actor.h | 2 +- src/boot/fault_drawer.c | 2 +- src/code/z_actor.c | 83 ++++++++++--------- src/code/z_collision_check.c | 2 +- src/code/z_player_lib.c | 2 +- src/code/z_sram_NES.c | 2 +- .../z_bg_hakugin_switch.c | 4 +- src/overlays/actors/ovl_Boss_01/z_boss_01.c | 2 +- src/overlays/actors/ovl_Boss_05/z_boss_05.c | 6 +- src/overlays/actors/ovl_En_Bee/z_en_bee.c | 4 +- src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c | 4 +- src/overlays/actors/ovl_En_Bombf/z_en_bombf.c | 2 +- .../actors/ovl_En_Dekubaba/z_en_dekubaba.c | 2 +- .../actors/ovl_En_Dinofos/z_en_dinofos.c | 2 +- .../actors/ovl_En_Fishing/z_en_fishing.c | 2 +- src/overlays/actors/ovl_En_Fz/z_en_fz.c | 2 +- src/overlays/actors/ovl_En_Jso/z_en_jso.c | 2 +- .../actors/ovl_En_Karebaba/z_en_karebaba.c | 4 +- src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.c | 2 +- src/overlays/actors/ovl_En_Mnk/z_en_mnk.c | 2 +- src/overlays/actors/ovl_En_Poh/z_en_poh.c | 2 +- src/overlays/actors/ovl_En_Raf/z_en_raf.c | 4 +- src/overlays/actors/ovl_En_Rd/z_en_rd.c | 2 +- src/overlays/actors/ovl_En_Sw/z_en_sw.c | 6 +- .../actors/ovl_En_Tanron2/z_en_tanron2.c | 2 +- src/overlays/actors/ovl_En_Test3/z_en_test3.c | 8 +- src/overlays/actors/ovl_En_Tsn/z_en_tsn.c | 2 +- .../actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c | 2 +- .../ovl_En_Weather_Tag/z_en_weather_tag.c | 2 +- src/overlays/actors/ovl_En_Wf/z_en_wf.c | 2 +- src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c | 2 +- src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c | 2 +- .../ovl_Obj_Roomtimer/z_obj_roomtimer.c | 2 +- .../actors/ovl_Obj_Usiyane/z_obj_usiyane.c | 2 +- tools/disasm/functions.txt | 2 +- tools/namefixer.py | 1 + tools/sizes/code_functions.csv | 2 +- 38 files changed, 92 insertions(+), 88 deletions(-) diff --git a/include/functions.h b/include/functions.h index 44fb1b6153..2312251f54 100644 --- a/include/functions.h +++ b/include/functions.h @@ -363,7 +363,7 @@ s16 func_800BBC20(BlinkInfo* info, s16 arg1, s16 arg2, s16 arg3); void Actor_SpawnBodyParts(Actor* actor, PlayState* play, s32 partParams, Gfx** dList); void Actor_SpawnFloorDustRing(PlayState* play, Actor* actor, Vec3f* posXZ, f32 radius, s32 countMinusOne, f32 randAccelWeight, s16 scale, s16 scaleStep, u8 useLighting); void func_800BBFB0(PlayState* play, Vec3f* position, f32 arg2, s32 arg3, s16 arg4, s16 scaleStep, u8 arg6); -void func_800BC154(PlayState* play, ActorContext* actorCtx, Actor* actor, u8 actorCategory); +void Actor_ChangeCategory(PlayState* play, ActorContext* actorCtx, Actor* actor, u8 actorCategory); u32 Actor_GetArrowDmgFlags(s32 params); Actor* func_800BC270(PlayState* play, Actor* actor, f32 distance, u32 dmgFlags); Actor* func_800BC444(PlayState* play, Actor* actor, f32 distance); diff --git a/include/z64actor.h b/include/z64actor.h index 19bf3b8706..fcd80ca919 100644 --- a/include/z64actor.h +++ b/include/z64actor.h @@ -382,7 +382,7 @@ typedef struct ActorContextSceneFlags { typedef struct ActorListEntry { /* 0x0 */ s32 length; // number of actors loaded of this type /* 0x4 */ Actor* first; // pointer to first actor of this type - /* 0x8 */ s32 unk_08; + /* 0x8 */ s32 categoryChanged; // at least one actor has changed categories and needs to be moved to a different list } ActorListEntry; // size = 0xC typedef enum { diff --git a/src/boot/fault_drawer.c b/src/boot/fault_drawer.c index 6031ccaa61..78dc4fd38c 100644 --- a/src/boot/fault_drawer.c +++ b/src/boot/fault_drawer.c @@ -216,7 +216,7 @@ void FaultDrawer_FillScreen() { } void* FaultDrawer_FormatStringFunc(void* arg, const char* str, size_t count) { - for (; count != 0; count--, str++) { + for (; count > 0; count--, str++) { if (sFaultDrawerInstance->escCode) { sFaultDrawerInstance->escCode = false; if (*str >= '1' && *str <= '9') { diff --git a/src/code/z_actor.c b/src/code/z_actor.c index ca6267ff4c..63ce42cfa6 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -57,7 +57,6 @@ Actor* D_801ED920; // 2 funcs. 1 out of z_actor #define ACTOR_AUDIO_FLAG_SEQ_ALL (ACTOR_AUDIO_FLAG_SEQ_MUSIC_BOX_HOUSE | ACTOR_AUDIO_FLAG_SEQ_KAMARO_DANCE) #define ACTOR_AUDIO_FLAG_ALL (ACTOR_AUDIO_FLAG_SFX_ALL | ACTOR_AUDIO_FLAG_SEQ_ALL) -// Internal forward declarations void Actor_KillAllOnHalfDayChange(PlayState* play, ActorContext* actorCtx); Actor* Actor_SpawnEntry(ActorContext* actorCtx, ActorEntry* actorEntry, PlayState* play); Actor* Actor_Delete(ActorContext* actorCtx, Actor* actor, PlayState* play); @@ -69,17 +68,17 @@ Actor* Actor_RemoveFromCategory(PlayState* play, ActorContext* actorCtx, Actor* void Actor_PrintLists(ActorContext* actorCtx) { ActorListEntry* actorList = &actorCtx->actorLists[0]; Actor* actor; - s32 i; + s32 category; FaultDrawer_SetCharPad(-2, 0); FaultDrawer_Printf("actor\n", gMaxActorId); FaultDrawer_Printf("No. Actor Name Part SegName\n"); - for (i = 0; i < ARRAY_COUNT(actorCtx->actorLists); i++) { - actor = actorList[i].first; + for (category = 0; category < ACTORCAT_MAX; category++) { + actor = actorList[category].first; while (actor != NULL) { - FaultDrawer_Printf("%3d %08x %04x %3d %s\n", i, actor, actor->id, actor->category, ""); + FaultDrawer_Printf("%3d %08x %04x %3d %s\n", category, actor, actor->id, actor->category, ""); actor = actor->next; } } @@ -2604,11 +2603,11 @@ u32 sCategoryFreezeMasks[ACTORCAT_MAX] = { }; void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) { - s32 i; + s32 category; Actor* actor; Player* player = GET_PLAYER(play); u32* categoryFreezeMaskP; - s32 cat; + s32 newCategory; Actor* next; ActorListEntry* entry; UpdateActor_Params params; @@ -2642,8 +2641,8 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) { params.talkActor = NULL; } - for (i = 0, entry = actorCtx->actorLists; i < ARRAY_COUNT(actorCtx->actorLists); - entry++, categoryFreezeMaskP++, i++) { + for (category = 0, entry = actorCtx->actorLists; category < ACTORCAT_MAX; + entry++, categoryFreezeMaskP++, category++) { params.canFreezeCategory = *categoryFreezeMaskP & player->stateFlags1; params.actor = entry->first; @@ -2651,28 +2650,32 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) { params.actor = Actor_UpdateActor(¶ms); } - if (i == ACTORCAT_BG) { + if (category == ACTORCAT_BG) { DynaPoly_UpdateContext(play, &play->colCtx.dyna); } } - for (i = 0, entry = actorCtx->actorLists; i < ARRAY_COUNT(actorCtx->actorLists); entry++, i++) { - if (entry->unk_08 != 0) { + // Move actors to a different actorList if it has changed categories. + for (category = 0, entry = actorCtx->actorLists; category < ACTORCAT_MAX; entry++, category++) { + if (entry->categoryChanged) { actor = entry->first; while (actor != NULL) { - if (i == actor->category) { + if (actor->category == category) { + // The actor category matches the list category. No change needed. actor = actor->next; - } else { - next = actor->next; - cat = actor->category; - actor->category = i; - Actor_RemoveFromCategory(play, actorCtx, actor); - Actor_AddToCategory(actorCtx, actor, cat); - actor = next; + continue; } + + // The actor category does not match the list category and needs to be moved. + next = actor->next; + newCategory = actor->category; + actor->category = category; + Actor_RemoveFromCategory(play, actorCtx, actor); + Actor_AddToCategory(actorCtx, actor, newCategory); + actor = next; } - entry->unk_08 = 0; + entry->categoryChanged = false; } } @@ -2986,7 +2989,7 @@ void Actor_DrawAll(PlayState* play, ActorContext* actorCtx) { ActorListEntry* actorEntry; Actor* actor; s32 actorFlags; - s32 i; + s32 category; if (play->unk_18844) { actorFlags = ACTOR_FLAG_200000; @@ -3001,7 +3004,7 @@ void Actor_DrawAll(PlayState* play, ActorContext* actorCtx) { sp58 = POLY_XLU_DISP; POLY_XLU_DISP = &sp58[1]; - for (i = 0, actorEntry = actorCtx->actorLists; i < ARRAY_COUNT(actorCtx->actorLists); i++, actorEntry++) { + for (category = 0, actorEntry = actorCtx->actorLists; category < ACTORCAT_MAX; category++, actorEntry++) { actor = actorEntry->first; while (actor != NULL) { @@ -3075,10 +3078,10 @@ void Actor_DrawAll(PlayState* play, ActorContext* actorCtx) { */ void Actor_KillAllWithMissingObject(PlayState* play, ActorContext* actorCtx) { Actor* actor; - s32 i; + s32 category; - for (i = 0; i != ARRAY_COUNT(actorCtx->actorLists); i++) { - actor = actorCtx->actorLists[i].first; + for (category = 0; category < ACTORCAT_MAX; category++) { + actor = actorCtx->actorLists[category].first; while (actor != NULL) { if (!Object_IsLoaded(&play->objectCtx, actor->objectSlot)) { @@ -3095,10 +3098,10 @@ void Actor_KillAllWithMissingObject(PlayState* play, ActorContext* actorCtx) { */ void func_800BA798(PlayState* play, ActorContext* actorCtx) { Actor* actor; - s32 i; + s32 category; - for (i = 0; i < ARRAY_COUNT(actorCtx->actorLists); i++) { - actor = actorCtx->actorLists[i].first; + for (category = 0; category < ACTORCAT_MAX; category++) { + actor = actorCtx->actorLists[category].first; while (actor != NULL) { if ((actor->room >= 0) && (actor->room != play->roomCtx.curRoom.num) && @@ -3127,10 +3130,10 @@ void func_800BA798(PlayState* play, ActorContext* actorCtx) { * Kill every actor which does not have the current halfDayBit enabled */ void Actor_KillAllOnHalfDayChange(PlayState* play, ActorContext* actorCtx) { - s32 i; + s32 category; - for (i = 0; i < ARRAY_COUNT(actorCtx->actorLists); i++) { - Actor* actor = actorCtx->actorLists[i].first; + for (category = 0; category < ACTORCAT_MAX; category++) { + Actor* actor = actorCtx->actorLists[category].first; while (actor != NULL) { if (!(actor->halfDaysBits & actorCtx->halfDaysBit)) { @@ -3154,17 +3157,17 @@ void Actor_KillAllOnHalfDayChange(PlayState* play, ActorContext* actorCtx) { } void Actor_CleanupContext(ActorContext* actorCtx, PlayState* play) { - s32 i; + s32 category; Fault_RemoveClient(&sActorFaultClient); - for (i = 0; i < ARRAY_COUNT(actorCtx->actorLists); i++) { - if (i != ACTORCAT_PLAYER) { - Actor* actor = actorCtx->actorLists[i].first; + for (category = 0; category < ACTORCAT_MAX; category++) { + if (category != ACTORCAT_PLAYER) { + Actor* actor = actorCtx->actorLists[category].first; while (actor != NULL) { Actor_Delete(actorCtx, actor, play); - actor = actorCtx->actorLists[i].first; + actor = actorCtx->actorLists[category].first; } } } @@ -3797,8 +3800,8 @@ void func_800BBFB0(PlayState* play, Vec3f* position, f32 arg2, s32 arg3, s16 arg } } -void func_800BC154(PlayState* play, ActorContext* actorCtx, Actor* actor, u8 actorCategory) { - actorCtx->actorLists[actor->category].unk_08 = 1; +void Actor_ChangeCategory(PlayState* play, ActorContext* actorCtx, Actor* actor, u8 actorCategory) { + actorCtx->actorLists[actor->category].categoryChanged = true; actor->category = actorCategory; } @@ -4663,7 +4666,7 @@ Actor* Actor_FindNearby(PlayState* play, Actor* inActor, s16 actorId, u8 actorCa Actor* actor = play->actorCtx.actorLists[actorCategory].first; while (actor != NULL) { - if (actor == inActor || ((actorId != -1) && (actorId != actor->id))) { + if ((actor == inActor) || ((actorId != -1) && (actorId != actor->id))) { actor = actor->next; continue; } diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c index 55d27413f2..e4c0cd2a7c 100644 --- a/src/code/z_collision_check.c +++ b/src/code/z_collision_check.c @@ -75,7 +75,7 @@ f32 CollisionCheck_GetDamageAndEffectOnBumper(Collider* at, ColliderInfo* atInfo if (ac->actor->colChkInfo.damageTable != NULL) { dmgFlags = atInfo->toucher.dmgFlags; - for (i = 0; i != ARRAY_COUNT(ac->actor->colChkInfo.damageTable->attack); i++) { + for (i = 0; i < ARRAY_COUNT(ac->actor->colChkInfo.damageTable->attack); i++) { if (dmgFlags == 1) { break; } diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c index 7e9c2a1aaa..a8e8dd38b7 100644 --- a/src/code/z_player_lib.c +++ b/src/code/z_player_lib.c @@ -284,7 +284,7 @@ void func_80122D44(PlayState* play, struct_80122D44_arg1* arg1) { OPEN_DISPS(play->state.gfxCtx); - for (i = 0; i != ARRAY_COUNT(arg1->unk_04); i++) { + for (i = 0; i < ARRAY_COUNT(arg1->unk_04); i++) { if ((phi_s2->alpha != 0) && (phi_s2->alpha != 255)) { temp_s3 = &D_801BFDD0[phi_s2->unk_00 - 1]; Matrix_Put(&phi_s2->mf); diff --git a/src/code/z_sram_NES.c b/src/code/z_sram_NES.c index e4a74e04c0..1e3867bdf1 100644 --- a/src/code/z_sram_NES.c +++ b/src/code/z_sram_NES.c @@ -1309,7 +1309,7 @@ void Sram_OpenSave(FileSelectState* fileSelect, SramContext* sramCtx) { Lib_MemCpy(gScarecrowSpawnSongPtr, gSaveContext.save.saveInfo.scarecrowSpawnSong, sizeof(gSaveContext.save.saveInfo.scarecrowSpawnSong)); - for (i = 0; i != ARRAY_COUNT(gSaveContext.save.saveInfo.scarecrowSpawnSong); i++) {} + for (i = 0; i < ARRAY_COUNT(gSaveContext.save.saveInfo.scarecrowSpawnSong); i++) {} } fileNum = gSaveContext.fileNum; diff --git a/src/overlays/actors/ovl_Bg_Hakugin_Switch/z_bg_hakugin_switch.c b/src/overlays/actors/ovl_Bg_Hakugin_Switch/z_bg_hakugin_switch.c index b1e1cfa8fa..7bc5ce0600 100644 --- a/src/overlays/actors/ovl_Bg_Hakugin_Switch/z_bg_hakugin_switch.c +++ b/src/overlays/actors/ovl_Bg_Hakugin_Switch/z_bg_hakugin_switch.c @@ -400,7 +400,7 @@ void func_80B16244(BgHakuginSwitch* this, PlayState* play) { this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y; if ((BGHAKUGINSWITCH_GET_7(&this->dyna.actor) == BGHAKUGINSWITCH_GET_7_1) && (this->dyna.actor.category != ACTORCAT_SWITCH)) { - func_800BC154(play, &play->actorCtx, &this->dyna.actor, 0); + Actor_ChangeCategory(play, &play->actorCtx, &this->dyna.actor, ACTORCAT_SWITCH); } this->actionFunc = func_80B162AC; } @@ -459,7 +459,7 @@ void func_80B16494(BgHakuginSwitch* this, PlayState* play) { this->dyna.actor.world.pos.y = (this->dyna.actor.home.pos.y - (1800.0f * this->dyna.actor.scale.y)) + 2.0f; if ((BGHAKUGINSWITCH_GET_7(&this->dyna.actor) == BGHAKUGINSWITCH_GET_7_1) && (this->dyna.actor.category != ACTORCAT_PROP)) { - func_800BC154(play, &play->actorCtx, &this->dyna.actor, ACTORCAT_PROP); + Actor_ChangeCategory(play, &play->actorCtx, &this->dyna.actor, ACTORCAT_PROP); } this->actionFunc = func_80B16520; } diff --git a/src/overlays/actors/ovl_Boss_01/z_boss_01.c b/src/overlays/actors/ovl_Boss_01/z_boss_01.c index 6a9e6c8388..26ce0eda7f 100644 --- a/src/overlays/actors/ovl_Boss_01/z_boss_01.c +++ b/src/overlays/actors/ovl_Boss_01/z_boss_01.c @@ -2107,7 +2107,7 @@ void Boss01_SetupDeathCutscene(Boss01* this, PlayState* play) { this->cutsceneState = ODOLWA_DEATH_CS_STATE_STARTED; SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 1); sMothSwarm->unk_144 = 250; - func_800BC154(play, &play->actorCtx, &sMothSwarm->actor, ACTORCAT_BOSS); + Actor_ChangeCategory(play, &play->actorCtx, &sMothSwarm->actor, ACTORCAT_BOSS); } /** diff --git a/src/overlays/actors/ovl_Boss_05/z_boss_05.c b/src/overlays/actors/ovl_Boss_05/z_boss_05.c index ead388dc90..06d8f3b4ac 100644 --- a/src/overlays/actors/ovl_Boss_05/z_boss_05.c +++ b/src/overlays/actors/ovl_Boss_05/z_boss_05.c @@ -388,7 +388,7 @@ void Boss05_Init(Actor* thisx, PlayState* play) { this->dyna.actor.params = BIO_BABA_TYPE_LILY_PAD; this->actionFunc = Boss05_LilyPad_Idle; this->dyna.actor.flags &= ~ACTOR_FLAG_TARGETABLE; - func_800BC154(play, &play->actorCtx, &this->dyna.actor, ACTORCAT_BG); + Actor_ChangeCategory(play, &play->actorCtx, &this->dyna.actor, ACTORCAT_BG); } } else if (BIO_BABA_GET_TYPE(&this->dyna.actor) == BIO_BABA_TYPE_LILY_PAD) { this->actionFunc = Boss05_LilyPad_Idle; @@ -399,7 +399,7 @@ void Boss05_Init(Actor* thisx, PlayState* play) { SkelAnime_InitFlex(play, &this->lilyPadSkelAnime, &gBioDekuBabaLilyPadSkel, &gBioDekuBabaLilyPadIdleAnim, this->lilyPadJointTable, this->lilyPadMorphTable, BIO_DEKU_BABA_LILY_PAD_LIMB_MAX); this->dyna.actor.flags &= ~ACTOR_FLAG_TARGETABLE; - func_800BC154(play, &play->actorCtx, &this->dyna.actor, ACTORCAT_BG); + Actor_ChangeCategory(play, &play->actorCtx, &this->dyna.actor, ACTORCAT_BG); } else if (BIO_BABA_GET_TYPE(&this->dyna.actor) == BIO_BABA_TYPE_FALLING_HEAD) { this->actionFunc = Boss05_FallingHead_Fall; this->fallingHeadLilyPadLimbScale = 1.0f; @@ -781,7 +781,7 @@ void Boss05_LilyPadWithHead_Move(Boss05* this, PlayState* play) { this->dyna.actor.params = BIO_BABA_TYPE_LILY_PAD; this->actionFunc = Boss05_LilyPad_Idle; this->dyna.actor.flags &= ~ACTOR_FLAG_TARGETABLE; - func_800BC154(play, &play->actorCtx, &this->dyna.actor, ACTORCAT_BG); + Actor_ChangeCategory(play, &play->actorCtx, &this->dyna.actor, ACTORCAT_BG); if (this->forceDetachTimer != 0) { hitReaction = BIO_BABA_HEAD_HIT_REACTION_DEATCH; } diff --git a/src/overlays/actors/ovl_En_Bee/z_en_bee.c b/src/overlays/actors/ovl_En_Bee/z_en_bee.c index a23a4d4866..2034dccbae 100644 --- a/src/overlays/actors/ovl_En_Bee/z_en_bee.c +++ b/src/overlays/actors/ovl_En_Bee/z_en_bee.c @@ -105,7 +105,7 @@ void EnBee_Init(Actor* thisx, PlayState* play) { this->actor.shape.shadowScale = 12.0f; if (CutsceneManager_GetCurrentCsId() != CS_ID_NONE) { - func_800BC154(play, &play->actorCtx, &this->actor, ACTORCAT_ITEMACTION); + Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ITEMACTION); } this->actor.hintId = TATL_HINT_ID_GIANT_BEE; @@ -151,7 +151,7 @@ void EnBee_FlyIdle(EnBee* this, PlayState* play) { s32 pad[2]; if ((this->actor.category != ACTORCAT_ENEMY) && (CutsceneManager_GetCurrentCsId() == CS_ID_NONE)) { - func_800BC154(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY); + Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY); } Math_Vec3f_Copy(&nextPos, &this->targetPos[this->posIndex]); 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 92e542f4dd..490ded3c61 100644 --- a/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c +++ b/src/overlays/actors/ovl_En_Bigpo/z_en_bigpo.c @@ -748,7 +748,7 @@ void EnBigpo_SetupLanternDrop(EnBigpo* this, PlayState* play) { this->actor.shape.rot.x = -0x8000; this->actor.velocity.y = 0.0f; this->actor.world.pos.y -= 15.0f; - func_800BC154(play, &play->actorCtx, &this->actor, ACTORCAT_MISC); + Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_MISC); this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UNFRIENDLY); // targetable OFF, enemy music OFF this->actor.bgCheckFlags &= ~BGCHECKFLAG_PLAYER_400; this->actionFunc = EnBigpo_LanternFalling; @@ -895,7 +895,7 @@ void EnBigpo_SelectRandomFireLocations(EnBigpo* this, PlayState* play) { Math_Vec3f_Copy(&this->fires[fireIndex].pos, &randomFirePo->actor.world.pos); randomFirePo->actor.parent = (Actor*)this; randomFirePo->actor.update = EnBigpo_UpdateFire; - func_800BC154(play, &play->actorCtx, &randomFirePo->actor, ACTORCAT_PROP); + Actor_ChangeCategory(play, &play->actorCtx, &randomFirePo->actor, ACTORCAT_PROP); randomFirePo->unk20C = fireIndex; randomFirePo->actor.flags &= ~ACTOR_FLAG_TARGETABLE; // make invisible by size: 0 diff --git a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c index a241d94d08..75852a9d93 100644 --- a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c +++ b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c @@ -116,7 +116,7 @@ void EnBombf_Init(Actor* thisx, PlayState* play2) { this->timer = 140; this->unk_1FE = 15; thisx->gravity = -1.5f; - func_800BC154(play, &play->actorCtx, thisx, 3); + Actor_ChangeCategory(play, &play->actorCtx, thisx, ACTORCAT_EXPLOSIVES); thisx->colChkInfo.mass = 200; thisx->flags &= ~ACTOR_FLAG_TARGETABLE; EnBombf_SetupAction(this, func_808AEE3C); diff --git a/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c b/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c index adf3639a77..41ef4302ec 100644 --- a/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c +++ b/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c @@ -1043,7 +1043,7 @@ void EnDekubaba_SetupDeadStickDrop(EnDekubaba* this, PlayState* play) { this->actor.gravity = 0.0f; this->actor.velocity.y = 0.0f; this->actor.shape.shadowScale = 3.0f; - func_800BC154(play, &play->actorCtx, &this->actor, ACTORCAT_MISC); + Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_MISC); this->actor.flags &= ~ACTOR_FLAG_20; this->timer = 200; this->drawDmgEffAlpha = 0.0f; diff --git a/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c b/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c index 314db46bff..4d8156a5f4 100644 --- a/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c +++ b/src/overlays/actors/ovl_En_Dinofos/z_en_dinofos.c @@ -1143,7 +1143,7 @@ void func_8089D018(EnDinofos* this, PlayState* play) { s32 temp_v0 = this->unk_288 - 10; if (this->actor.category == ACTORCAT_ENEMY) { - func_800BC154(play, &play->actorCtx, &this->actor, ACTORCAT_PROP); + Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_PROP); func_8089ABF4(this, play); } diff --git a/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c b/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c index 69720cdc88..cc26b6ecfe 100644 --- a/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c +++ b/src/overlays/actors/ovl_En_Fishing/z_en_fishing.c @@ -958,7 +958,7 @@ void EnFishing_Init(Actor* thisx, PlayState* play2) { if (thisx->params == 200) { this->unk_150 = 100; - func_800BC154(play, &play->actorCtx, thisx, ACTORCAT_PROP); + Actor_ChangeCategory(play, &play->actorCtx, thisx, ACTORCAT_PROP); thisx->targetMode = TARGET_MODE_0; thisx->flags |= (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY); this->lightNode = LightContext_InsertLight(play, &play->lightCtx, &this->lightInfo); diff --git a/src/overlays/actors/ovl_En_Fz/z_en_fz.c b/src/overlays/actors/ovl_En_Fz/z_en_fz.c index 0b46524965..c4ae08bd34 100644 --- a/src/overlays/actors/ovl_En_Fz/z_en_fz.c +++ b/src/overlays/actors/ovl_En_Fz/z_en_fz.c @@ -656,7 +656,7 @@ void func_809336C0(EnFz* this, PlayState* play) { this->actor.flags &= ~ACTOR_FLAG_TARGETABLE; this->unk_BD7 = 0; this->unk_BCA = 60; - func_800BC154(play, &play->actorCtx, &this->actor, ACTORCAT_PROP); + Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_PROP); Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0xA0); this->actionFunc = func_80933760; } diff --git a/src/overlays/actors/ovl_En_Jso/z_en_jso.c b/src/overlays/actors/ovl_En_Jso/z_en_jso.c index 0efa7799e4..98c3f330b8 100644 --- a/src/overlays/actors/ovl_En_Jso/z_en_jso.c +++ b/src/overlays/actors/ovl_En_Jso/z_en_jso.c @@ -1166,7 +1166,7 @@ void EnJso_SetupFallDownAndTalk(EnJso* this, PlayState* play) { this->textIndex = 2; this->actor.colChkInfo.mass = MASS_IMMOVABLE; this->actor.flags |= (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY); - func_800BC154(play, &play->actorCtx, &this->actor, ACTORCAT_NPC); + Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_NPC); this->actor.flags &= ~ACTOR_FLAG_CANT_LOCK_ON; this->actor.flags &= ~ACTOR_FLAG_100000; this->action = EN_JSO_ACTION_FALL_DOWN_AND_TALK; diff --git a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c index ebfe9e7d10..cfdb2bda94 100644 --- a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c +++ b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c @@ -485,7 +485,7 @@ void EnKarebaba_SetupDeadItemDrop(EnKarebaba* this, PlayState* play) { this->actor.gravity = 0.0f; this->actor.velocity.y = 0.0f; this->actor.shape.shadowScale = 3.0f; - func_800BC154(play, &play->actorCtx, &this->actor, ACTORCAT_MISC); + Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_MISC); this->timer = 200; this->actor.flags &= ~ACTOR_FLAG_20; this->drawDmgEffAlpha = 0.0f; @@ -553,7 +553,7 @@ void EnKarebaba_Regrow(EnKarebaba* this, PlayState* play) { this->actor.flags &= ~ACTOR_FLAG_10; this->actor.flags |= (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UNFRIENDLY); if (this->actor.params == ENKAREBABA_1) { - func_800BC154(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY); + Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY); } EnKarebaba_SetupIdle(this); } diff --git a/src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.c b/src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.c index 6c833867c8..df03abf515 100644 --- a/src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.c +++ b/src/overlays/actors/ovl_En_Kusa2/z_en_kusa2.c @@ -864,7 +864,7 @@ void EnKusa2_Init(Actor* thisx, PlayState* play) { this->actor.update = func_80A5E604; this->actor.draw = NULL; this->actor.flags |= ACTOR_FLAG_20; - func_800BC154(play, &play->actorCtx, &this->actor, 1); + Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_BG); this->unk_1BE = 0; if (D_80A5EAEC != 0) { D_80A5EAEC = 0; diff --git a/src/overlays/actors/ovl_En_Mnk/z_en_mnk.c b/src/overlays/actors/ovl_En_Mnk/z_en_mnk.c index 2477a5b686..094438d081 100644 --- a/src/overlays/actors/ovl_En_Mnk/z_en_mnk.c +++ b/src/overlays/actors/ovl_En_Mnk/z_en_mnk.c @@ -274,7 +274,7 @@ void EnMnk_MonkeyTiedUp_Init(Actor* thisx, PlayState* play) { void EnMnk_MonkeyHanging_Init(Actor* thisx, PlayState* play) { EnMnk* this = THIS; - func_800BC154(play, &play->actorCtx, &this->picto.actor, ACTORCAT_PROP); + Actor_ChangeCategory(play, &play->actorCtx, &this->picto.actor, ACTORCAT_PROP); this->actionFunc = EnMnk_MonkeyHanging_StruggleBeforeDunk; this->picto.actor.textId = 0x8E8; SkelAnime_InitFlex(play, &this->propSkelAnime, &gMonkeyHangingRopeSkel, &gMonkeyHangingStruggleAnim, 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 2c6fe4ebe1..95cac64e59 100644 --- a/src/overlays/actors/ovl_En_Poh/z_en_poh.c +++ b/src/overlays/actors/ovl_En_Poh/z_en_poh.c @@ -576,7 +576,7 @@ void func_80B2DC50(EnPoh* this, PlayState* play) { this->actor.shape.yOffset = 1500.0f; this->actor.world.pos.y -= 15.0f; this->actor.shape.rot.x = -0x8000; - func_800BC154(play, &play->actorCtx, &this->actor, 8); + Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_MISC); this->actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UNFRIENDLY); this->actionFunc = func_80B2DD2C; } diff --git a/src/overlays/actors/ovl_En_Raf/z_en_raf.c b/src/overlays/actors/ovl_En_Raf/z_en_raf.c index 1139e9a89e..7476a9b18e 100644 --- a/src/overlays/actors/ovl_En_Raf/z_en_raf.c +++ b/src/overlays/actors/ovl_En_Raf/z_en_raf.c @@ -537,7 +537,7 @@ void EnRaf_Explode(EnRaf* this, PlayState* play) { this->timer = 5; if (this->grabTarget == EN_RAF_GRAB_TARGET_EXPLOSIVE) { - func_800BC154(play, &play->actorCtx, &this->dyna.actor, 5); + Actor_ChangeCategory(play, &play->actorCtx, &this->dyna.actor, ACTORCAT_ENEMY); this->dyna.actor.flags |= (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UNFRIENDLY); } @@ -551,7 +551,7 @@ void EnRaf_PostDetonation(EnRaf* this, PlayState* play) { if (this->timer == 0) { this->collider.dim.radius = 50; this->collider.dim.height = 10; - func_800BC154(play, &play->actorCtx, &this->dyna.actor, 6); + Actor_ChangeCategory(play, &play->actorCtx, &this->dyna.actor, ACTORCAT_PROP); this->dyna.actor.flags &= ~(ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_UNFRIENDLY); EnRaf_SetupDormant(this); } else if (this->grabTarget == EN_RAF_GRAB_TARGET_EXPLOSIVE) { diff --git a/src/overlays/actors/ovl_En_Rd/z_en_rd.c b/src/overlays/actors/ovl_En_Rd/z_en_rd.c index b83dbf1f11..1ec240e41b 100644 --- a/src/overlays/actors/ovl_En_Rd/z_en_rd.c +++ b/src/overlays/actors/ovl_En_Rd/z_en_rd.c @@ -1051,7 +1051,7 @@ void EnRd_SetupDead(EnRd* this) { void EnRd_Dead(EnRd* this, PlayState* play) { if (this->actor.category != ACTORCAT_PROP) { - func_800BC154(play, &play->actorCtx, &this->actor, ACTORCAT_PROP); + Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_PROP); } Math_SmoothStepToS(&this->headYRotation, 0, 1, 2000, 0); diff --git a/src/overlays/actors/ovl_En_Sw/z_en_sw.c b/src/overlays/actors/ovl_En_Sw/z_en_sw.c index 6599ec0015..ca4d53a9f9 100644 --- a/src/overlays/actors/ovl_En_Sw/z_en_sw.c +++ b/src/overlays/actors/ovl_En_Sw/z_en_sw.c @@ -629,7 +629,7 @@ void func_808D9F08(EnSw* this) { void func_808D9F78(EnSw* this, PlayState* play, s32 arg2) { if (arg2 != 0) { - func_800BC154(play, &play->actorCtx, &this->actor, 5); + Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY); } Actor_SetScale(&this->actor, 0.02f); func_808D9DA0(this); @@ -1061,7 +1061,7 @@ void func_808DB100(EnSw* this, PlayState* play) { this->unk_456 = 0; this->unk_454 = 0; this->skelAnime.curFrame = 0.0f; - func_800BC154(play, &play->actorCtx, &this->actor, 4); + Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_NPC); this->actionFunc = func_808DB25C; return; } @@ -1113,7 +1113,7 @@ void func_808DB2E0(EnSw* this, PlayState* play) { if ((s32)temp_f2 != 0) { Actor_PlaySfx(&this->actor, NA_SE_EN_STALTURA_BOUND); } else { - func_800BC154(play, &play->actorCtx, &this->actor, 5); + Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY); Math_Vec3f_Copy(&this->actor.velocity, &gZeroVec3f); this->unk_410 &= ~(0x10 | 0x1); this->actionFunc = func_808DB100; diff --git a/src/overlays/actors/ovl_En_Tanron2/z_en_tanron2.c b/src/overlays/actors/ovl_En_Tanron2/z_en_tanron2.c index 3993a9c91f..e018a0c060 100644 --- a/src/overlays/actors/ovl_En_Tanron2/z_en_tanron2.c +++ b/src/overlays/actors/ovl_En_Tanron2/z_en_tanron2.c @@ -128,7 +128,7 @@ void EnTanron2_Init(Actor* thisx, PlayState* play) { if (this->actor.params == 100) { this->actor.update = func_80BB7B90; - func_800BC154(play, &play->actorCtx, &this->actor, 5); + Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY); return; } diff --git a/src/overlays/actors/ovl_En_Test3/z_en_test3.c b/src/overlays/actors/ovl_En_Test3/z_en_test3.c index 6fedf9d415..c2f51dd92f 100644 --- a/src/overlays/actors/ovl_En_Test3/z_en_test3.c +++ b/src/overlays/actors/ovl_En_Test3/z_en_test3.c @@ -525,8 +525,8 @@ s32 func_80A3F09C(EnTest3* this, PlayState* play) { } void func_80A3F0B0(EnTest3* this, PlayState* play) { - func_800BC154(play, &play->actorCtx, &this->unk_D90->actor, 2); - func_800BC154(play, &play->actorCtx, &this->player.actor, 4); + Actor_ChangeCategory(play, &play->actorCtx, &this->unk_D90->actor, ACTORCAT_PLAYER); + Actor_ChangeCategory(play, &play->actorCtx, &this->player.actor, ACTORCAT_NPC); this->unk_D90->stateFlags1 &= ~PLAYER_STATE1_20; } @@ -669,8 +669,8 @@ s32 func_80A3F73C(EnTest3* this, PlayState* play) { play->actorCtx.flags &= ~ACTORCTX_FLAG_4; this->player.stateFlags2 &= ~PLAYER_STATE2_40000; this->unk_D90->stateFlags1 |= PLAYER_STATE1_20; - func_800BC154(play, &play->actorCtx, &this->unk_D90->actor, 4); - func_800BC154(play, &play->actorCtx, &this->player.actor, 2); + Actor_ChangeCategory(play, &play->actorCtx, &this->unk_D90->actor, ACTORCAT_NPC); + Actor_ChangeCategory(play, &play->actorCtx, &this->player.actor, ACTORCAT_PLAYER); CutsceneManager_SetReturnCamera(this->subCamId); play->tryPlayerCsAction(play, &this->player, PLAYER_CSACTION_WAIT); } diff --git a/src/overlays/actors/ovl_En_Tsn/z_en_tsn.c b/src/overlays/actors/ovl_En_Tsn/z_en_tsn.c index cd595c6c40..fc794c45a0 100644 --- a/src/overlays/actors/ovl_En_Tsn/z_en_tsn.c +++ b/src/overlays/actors/ovl_En_Tsn/z_en_tsn.c @@ -118,7 +118,7 @@ void func_80ADFCEC(EnTsn* this, PlayState* play) { if (this->unk_1D8 == NULL) { Actor_Kill(&this->actor); } else if ((ENTSN_GET_F(&this->actor)) == ENTSN_F_1) { - func_800BC154(play, &play->actorCtx, &this->actor, 6); + Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_PROP); } } diff --git a/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c b/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c index 83d54f8372..c50e82377b 100644 --- a/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c +++ b/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c @@ -234,7 +234,7 @@ void EnTuboTrap_Idle(EnTuboTrap* this, PlayState* play) { if ((this->actor.xzDistToPlayer < 200.0f) && (this->actor.world.pos.y <= player->actor.world.pos.y)) { startingRotation = this->actor.home.rot.z; if ((startingRotation == 0) || (this->actor.playerHeightRel <= (startingRotation * 10.0f))) { - func_800BC154(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY); + Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY); currentHeight = this->actor.world.pos.y; this->actor.flags |= (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_10); // always update and can target diff --git a/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c b/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c index 90f724bcf7..768ba05ab6 100644 --- a/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c +++ b/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c @@ -91,7 +91,7 @@ void EnWeatherTag_Init(Actor* thisx, PlayState* play) { break; case WEATHERTAG_TYPE_UNK5: - func_800BC154(play, &play->actorCtx, &this->actor, 7); + Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ITEMACTION); play->skyboxId = SKYBOX_3; play->envCtx.lightConfig = 5; play->envCtx.changeLightNextConfig = 5; diff --git a/src/overlays/actors/ovl_En_Wf/z_en_wf.c b/src/overlays/actors/ovl_En_Wf/z_en_wf.c index d2f1595cfe..6160cc15a7 100644 --- a/src/overlays/actors/ovl_En_Wf/z_en_wf.c +++ b/src/overlays/actors/ovl_En_Wf/z_en_wf.c @@ -339,7 +339,7 @@ void EnWf_Init(Actor* thisx, PlayState* play) { func_80992FD4(this); } - func_800BC154(play, &play->actorCtx, &this->actor, 5); + Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_ENEMY); if (D_809942D8 == 0) { for (i = 0; i < ARRAY_COUNT(sNormalEyeTextures); i++) { 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 b141ce2220..bb084a14ea 100644 --- a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c +++ b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c @@ -382,7 +382,7 @@ void ObjBean_Init(Actor* thisx, PlayState* play) { return; } - func_800BC154(play, &play->actorCtx, &this->dyna.actor, 7); + Actor_ChangeCategory(play, &play->actorCtx, &this->dyna.actor, ACTORCAT_ITEMACTION); func_80937DD8(this); } else { s32 params2 = OBJBEAN_GET_3F00(&this->dyna.actor); diff --git a/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c b/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c index c2599941b7..77d5c15d15 100644 --- a/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c +++ b/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c @@ -314,7 +314,7 @@ void ObjMure_SetChildToFollowPlayer(ObjMure* this, s32 idx1) { i2++; this->children[i]->child = this->children[i]; for (j = 0; j < maxChildren; j++) { - if (i != j && this->children[j]->child == this->children[i]) { + if ((i != j) && (this->children[j]->child == this->children[i])) { this->children[j]->child = NULL; } } diff --git a/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c b/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c index dc43350159..5393b0d7ad 100644 --- a/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c +++ b/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c @@ -55,7 +55,7 @@ void func_80973CD8(ObjRoomtimer* this, PlayState* play) { Interface_StartTimer(TIMER_ID_MINIGAME_2, this->actor.params); } - func_800BC154(play, &play->actorCtx, &this->actor, ACTORCAT_PROP); + Actor_ChangeCategory(play, &play->actorCtx, &this->actor, ACTORCAT_PROP); this->actionFunc = func_80973D3C; } diff --git a/src/overlays/actors/ovl_Obj_Usiyane/z_obj_usiyane.c b/src/overlays/actors/ovl_Obj_Usiyane/z_obj_usiyane.c index dad72d9a78..05d3314653 100644 --- a/src/overlays/actors/ovl_Obj_Usiyane/z_obj_usiyane.c +++ b/src/overlays/actors/ovl_Obj_Usiyane/z_obj_usiyane.c @@ -111,7 +111,7 @@ void func_80C07F30(ObjUsiyane* this, PlayState* play) { for (i = 0; i < ARRAY_COUNT(this->unk_168[0]); i++) { for (j = 0; j < ARRAY_COUNT(this->unk_168); j++) { - if (i != ARRAY_COUNT(this->unk_168[0]) - 1) { + if (i != (ARRAY_COUNT(this->unk_168[0]) - 1)) { func_80C07DFC(&this->unk_710[i], &D_80C08660[i].rot, &this->unk_710[i + 1], &D_80C08660[i + 1].rot, j, 10, &this->unk_168[j][i].unk_00, &this->unk_168[j][i].unk_18); } else { diff --git a/tools/disasm/functions.txt b/tools/disasm/functions.txt index a114497382..d5d5e1f6f2 100644 --- a/tools/disasm/functions.txt +++ b/tools/disasm/functions.txt @@ -850,7 +850,7 @@ 0x800BBCEC:("Actor_SpawnBodyParts",), 0x800BBDAC:("Actor_SpawnFloorDustRing",), 0x800BBFB0:("func_800BBFB0",), - 0x800BC154:("func_800BC154",), + 0x800BC154:("Actor_ChangeCategory",), 0x800BC188:("Actor_GetArrowDmgFlags",), 0x800BC1B4:("func_800BC1B4",), 0x800BC270:("func_800BC270",), diff --git a/tools/namefixer.py b/tools/namefixer.py index e28f714c94..cafbac0379 100755 --- a/tools/namefixer.py +++ b/tools/namefixer.py @@ -149,6 +149,7 @@ wordReplace = { "Actor_MarkForDeath": "Actor_Kill", "func_800B84D0": "Actor_TalkOfferAccepted", "Actor_ProcessTalkRequest": "Actor_TalkOfferAccepted", + "func_800BC154": "Actor_ChangeCategory", "func_8017D668": "Math3D_PointDistToLine2D", "THGA_GetSize": "THGA_GetRemaining", diff --git a/tools/sizes/code_functions.csv b/tools/sizes/code_functions.csv index b441b2f4c0..7974f14ad5 100644 --- a/tools/sizes/code_functions.csv +++ b/tools/sizes/code_functions.csv @@ -364,7 +364,7 @@ asm/non_matchings/code/z_actor/func_800BBC20.s,func_800BBC20,0x800BBC20,0x33 asm/non_matchings/code/z_actor/Actor_SpawnBodyParts.s,Actor_SpawnBodyParts,0x800BBCEC,0x30 asm/non_matchings/code/z_actor/Actor_SpawnFloorDustRing.s,Actor_SpawnFloorDustRing,0x800BBDAC,0x81 asm/non_matchings/code/z_actor/func_800BBFB0.s,func_800BBFB0,0x800BBFB0,0x69 -asm/non_matchings/code/z_actor/func_800BC154.s,func_800BC154,0x800BC154,0xD +asm/non_matchings/code/z_actor/Actor_ChangeCategory.s,Actor_ChangeCategory,0x800BC154,0xD asm/non_matchings/code/z_actor/Actor_GetArrowDmgFlags.s,Actor_GetArrowDmgFlags,0x800BC188,0xB asm/non_matchings/code/z_actor/func_800BC1B4.s,func_800BC1B4,0x800BC1B4,0x2F asm/non_matchings/code/z_actor/func_800BC270.s,func_800BC270,0x800BC270,0x75