From 4982f32384b9954bdb68c0e3a98cd6d2248fbe06 Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Fri, 12 Jan 2024 16:48:54 +0100 Subject: [PATCH] Name actor flags 1: `ACTOR_FLAG_REACT_TO_LENS`, `ACTOR_FLAG_IGNORE_POINT_LIGHTS` (#1583) * 7 -> `ACTOR_FLAG_REACT_TO_LENS` * move comment above actor flag * 22 -> `ACTOR_FLAG_IGNORE_POINT_LIGHTS` * newlines between flags --------- Co-authored-by: fig02 --- include/z64actor.h | 60 ++++++++++++++++++- src/code/z_actor.c | 5 +- .../actors/ovl_Bg_Bombwall/z_bg_bombwall.c | 2 +- .../ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c | 2 +- .../ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.c | 6 +- .../actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c | 6 +- .../ovl_Bg_Haka_Megane/z_bg_haka_megane.c | 8 +-- .../ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c | 2 +- .../ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c | 2 +- .../z_bg_menkuri_nisekabe.c | 6 +- .../z_bg_spot02_objects.c | 2 +- .../z_bg_spot08_bakudankabe.c | 2 +- src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c | 16 ++--- src/overlays/actors/ovl_En_Box/z_en_box.c | 8 +-- src/overlays/actors/ovl_En_Dh/z_en_dh.c | 4 +- .../actors/ovl_En_Firefly/z_en_firefly.c | 2 +- .../actors/ovl_En_Floormas/z_en_floormas.c | 4 +- .../actors/ovl_En_Po_Desert/z_en_po_desert.c | 10 ++-- src/overlays/actors/ovl_En_Rd/z_en_rd.c | 2 +- src/overlays/actors/ovl_En_St/z_en_st.c | 2 +- src/overlays/actors/ovl_En_Test/z_en_test.c | 9 +-- src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c | 2 +- 22 files changed, 109 insertions(+), 53 deletions(-) diff --git a/include/z64actor.h b/include/z64actor.h index fd38b002b2..e02c52a2da 100644 --- a/include/z64actor.h +++ b/include/z64actor.h @@ -140,36 +140,90 @@ typedef struct { /* 0x18 */ Vec3f feetPos[2]; // Update by using `Actor_SetFeetPos` in PostLimbDraw } ActorShape; // size = 0x30 +// #define ACTOR_FLAG_0 (1 << 0) + +// #define ACTOR_FLAG_2 (1 << 2) + +// #define ACTOR_FLAG_3 (1 << 3) + +// #define ACTOR_FLAG_4 (1 << 4) + +// #define ACTOR_FLAG_5 (1 << 5) + +// #define ACTOR_FLAG_6 (1 << 6) -#define ACTOR_FLAG_7 (1 << 7) + +// hidden or revealed by Lens of Truth (depending on room lensMode) +#define ACTOR_FLAG_REACT_TO_LENS (1 << 7) + // Signals that player has accepted an offer to talk to an actor // Player will retain this flag until the player is finished talking // Actor will retain this flag until `Actor_TalkOfferAccepted` is called or manually turned off by the actor #define ACTOR_FLAG_TALK (1 << 8) + +// #define ACTOR_FLAG_9 (1 << 9) + +// #define ACTOR_FLAG_10 (1 << 10) + +// #define ACTOR_FLAG_ENKUSA_CUT (1 << 11) -#define ACTOR_FLAG_IGNORE_QUAKE (1 << 12) // actor will not shake when a quake occurs + +// Actor will not shake when a quake occurs +#define ACTOR_FLAG_IGNORE_QUAKE (1 << 12) + +// #define ACTOR_FLAG_13 (1 << 13) + +// #define ACTOR_FLAG_14 (1 << 14) + +// #define ACTOR_FLAG_15 (1 << 15) + +// #define ACTOR_FLAG_16 (1 << 16) + +// #define ACTOR_FLAG_17 (1 << 17) + +// #define ACTOR_FLAG_18 (1 << 18) + +// #define ACTOR_FLAG_19 (1 << 19) + +// #define ACTOR_FLAG_20 (1 << 20) + +// #define ACTOR_FLAG_21 (1 << 21) -#define ACTOR_FLAG_22 (1 << 22) + +// ignores point lights but not directional lights (such as environment lights) +#define ACTOR_FLAG_IGNORE_POINT_LIGHTS (1 << 22) + +// #define ACTOR_FLAG_23 (1 << 23) + +// #define ACTOR_FLAG_24 (1 << 24) + +// #define ACTOR_FLAG_25 (1 << 25) + +// #define ACTOR_FLAG_26 (1 << 26) + +// #define ACTOR_FLAG_27 (1 << 27) + +// #define ACTOR_FLAG_28 (1 << 28) #define COLORFILTER_GET_COLORINTENSITY(colorFilterParams) (((colorFilterParams) & 0x1F00) >> 5) diff --git a/src/code/z_actor.c b/src/code/z_actor.c index fd6bb0e716..d0b7607e21 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -2302,7 +2302,8 @@ void Actor_Draw(PlayState* play, Actor* actor) { lights = LightContext_NewLights(&play->lightCtx, play->state.gfxCtx); - Lights_BindAll(lights, play->lightCtx.listHead, (actor->flags & ACTOR_FLAG_22) ? NULL : &actor->world.pos); + Lights_BindAll(lights, play->lightCtx.listHead, + (actor->flags & ACTOR_FLAG_IGNORE_POINT_LIGHTS) ? NULL : &actor->world.pos); Lights_Draw(lights, play->state.gfxCtx); if (actor->flags & ACTOR_FLAG_IGNORE_QUAKE) { @@ -2552,7 +2553,7 @@ void func_800315AC(PlayState* play, ActorContext* actorCtx) { if ((HREG(64) != 1) || ((HREG(65) != -1) && (HREG(65) != HREG(66))) || (HREG(71) == 0)) { if ((actor->init == NULL) && (actor->draw != NULL) && (actor->flags & (ACTOR_FLAG_5 | ACTOR_FLAG_6))) { - if ((actor->flags & ACTOR_FLAG_7) && + if ((actor->flags & ACTOR_FLAG_REACT_TO_LENS) && ((play->roomCtx.curRoom.lensMode == LENS_MODE_HIDE_ACTORS) || play->actorCtx.lensActive || (actor->room != play->roomCtx.curRoom.num))) { ASSERT(invisibleActorCounter < INVISIBLE_ACTOR_MAX, diff --git a/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c b/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c index 19d53090ea..3d12a423bc 100644 --- a/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c +++ b/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c @@ -7,7 +7,7 @@ #include "z_bg_bombwall.h" #include "assets/objects/gameplay_field_keep/gameplay_field_keep.h" -#define FLAGS ACTOR_FLAG_22 +#define FLAGS ACTOR_FLAG_IGNORE_POINT_LIGHTS void BgBombwall_Init(Actor* thisx, PlayState* play); void BgBombwall_Destroy(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c b/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c index da1e50e89a..287cd60ea0 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c @@ -55,7 +55,7 @@ void BgGndDarkmeiro_Init(Actor* thisx, PlayState* play2) { switch (this->dyna.actor.params & 0xFF) { case DARKMEIRO_INVISIBLE_PATH: this->dyna.actor.draw = BgGndDarkmeiro_DrawInvisiblePath; - this->dyna.actor.flags |= ACTOR_FLAG_7; + this->dyna.actor.flags |= ACTOR_FLAG_REACT_TO_LENS; break; case DARKMEIRO_CLEAR_BLOCK: CollisionHeader_GetVirtual(&gClearBlockCol, &colHeader); diff --git a/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.c b/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.c index 8b3c4a2225..a6766c62af 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.c @@ -40,9 +40,9 @@ void BgGndNisekabe_Update(Actor* thisx, PlayState* play) { BgGndNisekabe* this = (BgGndNisekabe*)thisx; if (play->actorCtx.lensActive) { - this->actor.flags |= ACTOR_FLAG_7; + this->actor.flags |= ACTOR_FLAG_REACT_TO_LENS; } else { - this->actor.flags &= ~ACTOR_FLAG_7; + this->actor.flags &= ~ACTOR_FLAG_REACT_TO_LENS; } } @@ -55,7 +55,7 @@ void BgGndNisekabe_Draw(Actor* thisx, PlayState* play) { BgGndNisekabe* this = (BgGndNisekabe*)thisx; u32 index = this->actor.params & 0xFF; - if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) { + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) { Gfx_DrawDListXlu(play, dLists[index]); } else { Gfx_DrawDListOpa(play, dLists[index]); diff --git a/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c b/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c index 95f185e4ea..8e129ae40e 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c +++ b/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c @@ -292,9 +292,9 @@ void BgHakaGate_FalseSkull(BgHakaGate* this, PlayState* play) { Math_StepToS(&this->vFlameScale, 350, 20); } if (play->actorCtx.lensActive) { - this->dyna.actor.flags |= ACTOR_FLAG_7; + this->dyna.actor.flags |= ACTOR_FLAG_REACT_TO_LENS; } else { - this->dyna.actor.flags &= ~ACTOR_FLAG_7; + this->dyna.actor.flags &= ~ACTOR_FLAG_REACT_TO_LENS; } } @@ -345,7 +345,7 @@ void BgHakaGate_Draw(Actor* thisx, PlayState* play) { BgHakaGate* this = (BgHakaGate*)thisx; MtxF currentMtxF; - if (CHECK_FLAG_ALL(thisx->flags, ACTOR_FLAG_7)) { + if (CHECK_FLAG_ALL(thisx->flags, ACTOR_FLAG_REACT_TO_LENS)) { Gfx_DrawDListXlu(play, object_haka_objects_DL_00F1B0); } else { Gfx_SetupDL_25Opa(play->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c b/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c index 44690a3765..8caf50d340 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c +++ b/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c @@ -8,7 +8,7 @@ #include "assets/objects/object_hakach_objects/object_hakach_objects.h" #include "assets/objects/object_haka_objects/object_haka_objects.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_7) +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_REACT_TO_LENS) void BgHakaMegane_Init(Actor* thisx, PlayState* play); void BgHakaMegane_Destroy(Actor* thisx, PlayState* play); @@ -109,10 +109,10 @@ void func_8087DBF0(BgHakaMegane* this, PlayState* play) { Actor* thisx = &this->dyna.actor; if (play->actorCtx.lensActive) { - thisx->flags |= ACTOR_FLAG_7; + thisx->flags |= ACTOR_FLAG_REACT_TO_LENS; DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId); } else { - thisx->flags &= ~ACTOR_FLAG_7; + thisx->flags &= ~ACTOR_FLAG_REACT_TO_LENS; DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId); } } @@ -129,7 +129,7 @@ void BgHakaMegane_Update(Actor* thisx, PlayState* play) { void BgHakaMegane_Draw(Actor* thisx, PlayState* play) { BgHakaMegane* this = (BgHakaMegane*)thisx; - if (CHECK_FLAG_ALL(thisx->flags, ACTOR_FLAG_7)) { + if (CHECK_FLAG_ALL(thisx->flags, ACTOR_FLAG_REACT_TO_LENS)) { Gfx_DrawDListXlu(play, sDLists[thisx->params]); } else { Gfx_DrawDListOpa(play, sDLists[thisx->params]); diff --git a/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c b/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c index 7374103639..6c8e3bf119 100644 --- a/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c +++ b/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c @@ -72,7 +72,7 @@ void BgHakaMeganeBG_Init(Actor* thisx, PlayState* play) { if (thisx->params == 0) { CollisionHeader_GetVirtual(&object_haka_objects_Col_009168, &colHeader); - thisx->flags |= ACTOR_FLAG_7; + thisx->flags |= ACTOR_FLAG_REACT_TO_LENS; this->unk_16A = 20; this->actionFunc = func_8087DFF8; } else if (thisx->params == 3) { diff --git a/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c b/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c index d59affce0a..6a1963aeab 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c +++ b/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c @@ -142,7 +142,7 @@ void BgHakaSgami_Init(Actor* thisx, PlayState* play) { thisx->params = (thisx->params >> 8) & 0xFF; if (this->unk_151 != 0) { - thisx->flags |= ACTOR_FLAG_7; + thisx->flags |= ACTOR_FLAG_REACT_TO_LENS; } Collider_InitTris(play, colliderScythe); diff --git a/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.c b/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.c index ab8e39b8de..0d3c4635e2 100644 --- a/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.c +++ b/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.c @@ -41,9 +41,9 @@ void BgMenkuriNisekabe_Update(Actor* thisx, PlayState* play) { BgMenkuriNisekabe* this = (BgMenkuriNisekabe*)thisx; if (play->actorCtx.lensActive) { - this->actor.flags |= ACTOR_FLAG_7; + this->actor.flags |= ACTOR_FLAG_REACT_TO_LENS; } else { - this->actor.flags &= ~ACTOR_FLAG_7; + this->actor.flags &= ~ACTOR_FLAG_REACT_TO_LENS; } } @@ -51,7 +51,7 @@ void BgMenkuriNisekabe_Draw(Actor* thisx, PlayState* play) { BgMenkuriNisekabe* this = (BgMenkuriNisekabe*)thisx; u32 index = this->actor.params & 0xFF; - if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) { + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) { Gfx_DrawDListXlu(play, sDLists[index]); } else { Gfx_DrawDListOpa(play, sDLists[index]); diff --git a/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c b/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c index db26994676..a652df6420 100644 --- a/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c +++ b/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c @@ -74,7 +74,7 @@ void BgSpot02Objects_Init(Actor* thisx, PlayState* play) { } else if (thisx->params == 1) { this->actionFunc = func_808AC8FC; CollisionHeader_GetVirtual(&object_spot02_objects_Col_0128D8, &colHeader); - thisx->flags |= ACTOR_FLAG_22; + thisx->flags |= ACTOR_FLAG_IGNORE_POINT_LIGHTS; } else { if (play->sceneId == SCENE_GRAVEYARD) { this->actionFunc = func_808AC908; diff --git a/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c b/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c index 8b9d4f48ff..17cdba2f1a 100644 --- a/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c +++ b/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c @@ -9,7 +9,7 @@ #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" #include "assets/objects/gameplay_field_keep/gameplay_field_keep.h" -#define FLAGS ACTOR_FLAG_22 +#define FLAGS ACTOR_FLAG_IGNORE_POINT_LIGHTS void BgSpot08Bakudankabe_Init(Actor* thisx, PlayState* play); void BgSpot08Bakudankabe_Destroy(Actor* thisx, PlayState* play); diff --git a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c index ac481ba0c7..df893e790e 100644 --- a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c +++ b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c @@ -581,7 +581,7 @@ void BossSst_HeadIntro(BossSst* this, PlayState* play) { sSubCamEye.y += 400.0f * 0.01f; sSubCamEye.z += 1550.0f * 0.01f; this->vVanish = true; - this->actor.flags |= ACTOR_FLAG_7; + this->actor.flags |= ACTOR_FLAG_REACT_TO_LENS; } else if (revealStateTimer < 40) { sSubCamAt.x += 125.0f * 0.01f; sSubCamAt.y += 350.0f * 0.01f; @@ -819,7 +819,7 @@ void BossSst_HeadSetupStunned(BossSst* this) { this->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT); this->colliderCyl.base.acFlags &= ~AC_ON; this->vVanish = false; - this->actor.flags &= ~ACTOR_FLAG_7; + this->actor.flags &= ~ACTOR_FLAG_REACT_TO_LENS; BossSst_HeadSfx(this, NA_SE_EN_SHADEST_FREEZE); this->actionFunc = BossSst_HeadStunned; } @@ -2646,9 +2646,9 @@ void BossSst_UpdateHead(Actor* thisx, PlayState* play) { this->actionFunc(this, play); if (this->vVanish) { if (!play->actorCtx.lensActive || (thisx->colorFilterTimer != 0)) { - this->actor.flags &= ~ACTOR_FLAG_7; + this->actor.flags &= ~ACTOR_FLAG_REACT_TO_LENS; } else { - this->actor.flags |= ACTOR_FLAG_7; + this->actor.flags |= ACTOR_FLAG_REACT_TO_LENS; } } @@ -2668,7 +2668,7 @@ void BossSst_UpdateHead(Actor* thisx, PlayState* play) { } BossSst_MoveAround(this); - if ((!this->vVanish || CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) && + if ((!this->vVanish || CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) && ((this->actionFunc == BossSst_HeadReadyCharge) || (this->actionFunc == BossSst_HeadCharge) || (this->actionFunc == BossSst_HeadFrozenHand) || (this->actionFunc == BossSst_HeadStunned) || (this->actionFunc == BossSst_HeadVulnerable) || (this->actionFunc == BossSst_HeadDamage))) { @@ -2777,7 +2777,7 @@ s32 BossSst_OverrideHeadDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* s32 timer12; f32 shakeMod; - if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7) && this->vVanish) { + if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS) && this->vVanish) { *dList = NULL; } else if (this->actionFunc == BossSst_HeadThrash) { // Animation modifications for death cutscene shakeAmp = (this->timer / 10) + 1; @@ -2868,7 +2868,7 @@ void BossSst_DrawHead(Actor* thisx, PlayState* play) { OPEN_DISPS(play->state.gfxCtx, "../z_boss_sst.c", 6810); - if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) { + if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) { Gfx_SetupDL_25Opa(play->state.gfxCtx); gDPSetPrimColor(POLY_OPA_DISP++, 0x00, 0x80, sBodyColor.r, sBodyColor.g, sBodyColor.b, 255); if (!sBodyStatic) { @@ -2895,7 +2895,7 @@ void BossSst_DrawHead(Actor* thisx, PlayState* play) { Matrix_RotateY(-randYaw, MTXMODE_APPLY); } - if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) { + if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) { POLY_OPA_DISP = SkelAnime_DrawFlex(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, BossSst_OverrideHeadDraw, BossSst_PostHeadDraw, this, POLY_OPA_DISP); diff --git a/src/overlays/actors/ovl_En_Box/z_en_box.c b/src/overlays/actors/ovl_En_Box/z_en_box.c index fe2fb6e3d0..77eba65b88 100644 --- a/src/overlays/actors/ovl_En_Box/z_en_box.c +++ b/src/overlays/actors/ovl_En_Box/z_en_box.c @@ -160,7 +160,7 @@ void EnBox_Init(Actor* thisx, PlayState* play2) { this->dyna.actor.flags |= ACTOR_FLAG_4; } else { if (this->type == ENBOX_TYPE_4 || this->type == ENBOX_TYPE_6) { - this->dyna.actor.flags |= ACTOR_FLAG_7; + this->dyna.actor.flags |= ACTOR_FLAG_REACT_TO_LENS; } EnBox_SetupAction(this, EnBox_WaitOpen); this->movementFlags |= ENBOX_MOVE_IMMOBILE; @@ -438,7 +438,7 @@ void EnBox_WaitOpen(EnBox* this, PlayState* play) { void EnBox_Open(EnBox* this, PlayState* play) { u16 sfxId; - this->dyna.actor.flags &= ~ACTOR_FLAG_7; + this->dyna.actor.flags &= ~ACTOR_FLAG_REACT_TO_LENS; if (SkelAnime_Update(&this->skelanime)) { if (this->unk_1F4 > 0) { @@ -621,11 +621,11 @@ void EnBox_Draw(Actor* thisx, PlayState* play) { OPEN_DISPS(play->state.gfxCtx, "../z_en_box.c", 1581); /* - this->dyna.actor.flags & ACTOR_FLAG_7 is set by Init (if type is 4 or 6) + this->dyna.actor.flags & ACTOR_FLAG_REACT_TO_LENS is set by Init (if type is 4 or 6) and cleared by Open */ if ((this->alpha == 255 && !(this->type == ENBOX_TYPE_4 || this->type == ENBOX_TYPE_6)) || - (!CHECK_FLAG_ALL(this->dyna.actor.flags, ACTOR_FLAG_7) && + (!CHECK_FLAG_ALL(this->dyna.actor.flags, ACTOR_FLAG_REACT_TO_LENS) && (this->type == ENBOX_TYPE_4 || this->type == ENBOX_TYPE_6))) { gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255); diff --git a/src/overlays/actors/ovl_En_Dh/z_en_dh.c b/src/overlays/actors/ovl_En_Dh/z_en_dh.c index eb3d0b2502..14c454455f 100644 --- a/src/overlays/actors/ovl_En_Dh/z_en_dh.c +++ b/src/overlays/actors/ovl_En_Dh/z_en_dh.c @@ -191,7 +191,7 @@ void EnDh_SetupWait(EnDh* this) { this->actor.shape.yOffset = -15000.0f; this->dirtWaveSpread = this->actor.speed = 0.0f; this->actor.world.rot.y = this->actor.shape.rot.y; - this->actor.flags |= ACTOR_FLAG_7; + this->actor.flags |= ACTOR_FLAG_REACT_TO_LENS; this->dirtWavePhase = this->actionState = this->actor.params = ENDH_WAIT_UNDERGROUND; EnDh_SetupAction(this, EnDh_Wait); } @@ -208,7 +208,7 @@ void EnDh_Wait(EnDh* this, PlayState* play) { case 0: this->actor.flags |= ACTOR_FLAG_0; this->actor.shape.rot.y = this->actor.yawTowardsPlayer; - this->actor.flags &= ~ACTOR_FLAG_7; + this->actor.flags &= ~ACTOR_FLAG_REACT_TO_LENS; this->actionState++; this->drawDirtWave++; Actor_PlaySfx(&this->actor, NA_SE_EN_DEADHAND_HIDE); diff --git a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c index 341d98dfbf..d48103610b 100644 --- a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c +++ b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c @@ -147,7 +147,7 @@ void EnFirefly_Init(Actor* thisx, PlayState* play) { CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit); if ((this->actor.params & 0x8000) != 0) { - this->actor.flags |= ACTOR_FLAG_7; + this->actor.flags |= ACTOR_FLAG_REACT_TO_LENS; if (1) {} this->actor.draw = EnFirefly_DrawInvisible; this->actor.params &= 0x7FFF; diff --git a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c index 1c358be368..e1ed9d58e1 100644 --- a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c +++ b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c @@ -138,7 +138,7 @@ void EnFloormas_Init(Actor* thisx, PlayState* play2) { // s16 cast needed this->actor.params &= (s16) ~(SPAWN_INVISIBLE); if (invisble) { - this->actor.flags |= ACTOR_FLAG_7; + this->actor.flags |= ACTOR_FLAG_REACT_TO_LENS; this->actor.draw = EnFloormas_DrawHighlighted; } @@ -280,7 +280,7 @@ void EnFloormas_SetupLand(EnFloormas* this) { void EnFloormas_SetupSplit(EnFloormas* this) { Actor_SetScale(&this->actor, 0.004f); this->actor.flags |= ACTOR_FLAG_4; - if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) { + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) { this->actor.draw = EnFloormas_DrawHighlighted; } else { this->actor.draw = EnFloormas_Draw; diff --git a/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c b/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c index ee7795db8e..2f6a161cec 100644 --- a/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c +++ b/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c @@ -7,7 +7,7 @@ #include "z_en_po_desert.h" #include "assets/objects/object_po_field/object_po_field.h" -#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_7 | ACTOR_FLAG_IGNORE_QUAKE) +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_REACT_TO_LENS | ACTOR_FLAG_IGNORE_QUAKE) void EnPoDesert_Init(Actor* thisx, PlayState* play); void EnPoDesert_Destroy(Actor* thisx, PlayState* play); @@ -197,11 +197,11 @@ void EnPoDesert_Update(Actor* thisx, PlayState* play) { Collider_UpdateCylinder(&this->actor, &this->collider); CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); if (play->actorCtx.lensActive) { - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_7; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_REACT_TO_LENS; this->actor.shape.shadowDraw = ActorShadow_DrawCircle; } else { this->actor.shape.shadowDraw = NULL; - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_7); + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_REACT_TO_LENS); } } @@ -214,7 +214,7 @@ s32 EnPoDesert_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec mtxScale = this->actionTimer / 16.0f; Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY); } - if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) { + if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) { *dList = NULL; } return false; @@ -234,7 +234,7 @@ void EnPoDesert_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* color.r = (s16)(rand * 30.0f) + 225; color.g = (s16)(rand * 100.0f) + 155; color.b = (s16)(rand * 160.0f) + 95; - if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) { + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) { gDPPipeSync((*gfxP)++); gDPSetEnvColor((*gfxP)++, color.r, color.g, color.b, 255); gSPMatrix((*gfxP)++, MATRIX_NEW(play->state.gfxCtx, "../z_en_po_desert.c", 523), 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 b258cb28bc..21a4869bbe 100644 --- a/src/overlays/actors/ovl_En_Rd/z_en_rd.c +++ b/src/overlays/actors/ovl_En_Rd/z_en_rd.c @@ -181,7 +181,7 @@ void EnRd_Init(Actor* thisx, PlayState* play) { SkelAnime_Update(&this->skelAnime); if (this->actor.params == REDEAD_TYPE_INVISIBLE) { - this->actor.flags |= ACTOR_FLAG_7; + this->actor.flags |= ACTOR_FLAG_REACT_TO_LENS; } } diff --git a/src/overlays/actors/ovl_En_St/z_en_st.c b/src/overlays/actors/ovl_En_St/z_en_st.c index a65aca9455..55aa065dd4 100644 --- a/src/overlays/actors/ovl_En_St/z_en_st.c +++ b/src/overlays/actors/ovl_En_St/z_en_st.c @@ -790,7 +790,7 @@ void EnSt_Init(Actor* thisx, PlayState* play) { this->blureIdx = EnSt_CreateBlureEffect(play); EnSt_InitColliders(this, play); if (thisx->params == 2) { - this->actor.flags |= ACTOR_FLAG_7; + this->actor.flags |= ACTOR_FLAG_REACT_TO_LENS; } if (this->actor.params == 1) { this->actor.naviEnemyId = NAVI_ENEMY_BIG_SKULLTULA; diff --git a/src/overlays/actors/ovl_En_Test/z_en_test.c b/src/overlays/actors/ovl_En_Test/z_en_test.c index 40f36cc669..e050fc3321 100644 --- a/src/overlays/actors/ovl_En_Test/z_en_test.c +++ b/src/overlays/actors/ovl_En_Test/z_en_test.c @@ -306,7 +306,7 @@ void EnTest_Init(Actor* thisx, PlayState* play) { } if (this->actor.params == STALFOS_TYPE_INVISIBLE) { - this->actor.flags |= ACTOR_FLAG_7; + this->actor.flags |= ACTOR_FLAG_REACT_TO_LENS; } } @@ -1810,10 +1810,10 @@ void EnTest_Update(Actor* thisx, PlayState* play) { if (this->actor.params == STALFOS_TYPE_INVISIBLE) { if (play->actorCtx.lensActive) { - this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_7; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_REACT_TO_LENS; this->actor.shape.shadowDraw = ActorShadow_DrawFeet; } else { - this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_7); + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_REACT_TO_LENS); this->actor.shape.shadowDraw = NULL; } } @@ -1836,7 +1836,8 @@ s32 EnTest_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* CLOSE_DISPS(play->state.gfxCtx, "../z_en_test.c", 3587); } - if ((this->actor.params == STALFOS_TYPE_INVISIBLE) && !CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) { + if ((this->actor.params == STALFOS_TYPE_INVISIBLE) && + !CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) { *dList = NULL; } 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 ac0524ea35..fb7db74af1 100644 --- a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c +++ b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c @@ -9,7 +9,7 @@ #include "assets/objects/gameplay_keep/gameplay_keep.h" #include "terminal.h" -#define FLAGS ACTOR_FLAG_22 +#define FLAGS ACTOR_FLAG_IGNORE_POINT_LIGHTS void ObjBean_Init(Actor* thisx, PlayState* play); void ObjBean_Destroy(Actor* thisx, PlayState* play);