1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-05-11 11:33:48 +00:00

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 <fig02srl@gmail.com>
This commit is contained in:
Dragorn421 2024-01-12 16:48:54 +01:00 committed by GitHub
parent 324db1d578
commit 4982f32384
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 109 additions and 53 deletions

View file

@ -140,36 +140,90 @@ typedef struct {
/* 0x18 */ Vec3f feetPos[2]; // Update by using `Actor_SetFeetPos` in PostLimbDraw /* 0x18 */ Vec3f feetPos[2]; // Update by using `Actor_SetFeetPos` in PostLimbDraw
} ActorShape; // size = 0x30 } ActorShape; // size = 0x30
//
#define ACTOR_FLAG_0 (1 << 0) #define ACTOR_FLAG_0 (1 << 0)
//
#define ACTOR_FLAG_2 (1 << 2) #define ACTOR_FLAG_2 (1 << 2)
//
#define ACTOR_FLAG_3 (1 << 3) #define ACTOR_FLAG_3 (1 << 3)
//
#define ACTOR_FLAG_4 (1 << 4) #define ACTOR_FLAG_4 (1 << 4)
//
#define ACTOR_FLAG_5 (1 << 5) #define ACTOR_FLAG_5 (1 << 5)
//
#define ACTOR_FLAG_6 (1 << 6) #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 // Signals that player has accepted an offer to talk to an actor
// Player will retain this flag until the player is finished talking // 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 // 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_TALK (1 << 8)
//
#define ACTOR_FLAG_9 (1 << 9) #define ACTOR_FLAG_9 (1 << 9)
//
#define ACTOR_FLAG_10 (1 << 10) #define ACTOR_FLAG_10 (1 << 10)
//
#define ACTOR_FLAG_ENKUSA_CUT (1 << 11) #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_13 (1 << 13)
//
#define ACTOR_FLAG_14 (1 << 14) #define ACTOR_FLAG_14 (1 << 14)
//
#define ACTOR_FLAG_15 (1 << 15) #define ACTOR_FLAG_15 (1 << 15)
//
#define ACTOR_FLAG_16 (1 << 16) #define ACTOR_FLAG_16 (1 << 16)
//
#define ACTOR_FLAG_17 (1 << 17) #define ACTOR_FLAG_17 (1 << 17)
//
#define ACTOR_FLAG_18 (1 << 18) #define ACTOR_FLAG_18 (1 << 18)
//
#define ACTOR_FLAG_19 (1 << 19) #define ACTOR_FLAG_19 (1 << 19)
//
#define ACTOR_FLAG_20 (1 << 20) #define ACTOR_FLAG_20 (1 << 20)
//
#define ACTOR_FLAG_21 (1 << 21) #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_23 (1 << 23)
//
#define ACTOR_FLAG_24 (1 << 24) #define ACTOR_FLAG_24 (1 << 24)
//
#define ACTOR_FLAG_25 (1 << 25) #define ACTOR_FLAG_25 (1 << 25)
//
#define ACTOR_FLAG_26 (1 << 26) #define ACTOR_FLAG_26 (1 << 26)
//
#define ACTOR_FLAG_27 (1 << 27) #define ACTOR_FLAG_27 (1 << 27)
//
#define ACTOR_FLAG_28 (1 << 28) #define ACTOR_FLAG_28 (1 << 28)
#define COLORFILTER_GET_COLORINTENSITY(colorFilterParams) (((colorFilterParams) & 0x1F00) >> 5) #define COLORFILTER_GET_COLORINTENSITY(colorFilterParams) (((colorFilterParams) & 0x1F00) >> 5)

View file

@ -2302,7 +2302,8 @@ void Actor_Draw(PlayState* play, Actor* actor) {
lights = LightContext_NewLights(&play->lightCtx, play->state.gfxCtx); 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); Lights_Draw(lights, play->state.gfxCtx);
if (actor->flags & ACTOR_FLAG_IGNORE_QUAKE) { 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 ((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->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 || ((play->roomCtx.curRoom.lensMode == LENS_MODE_HIDE_ACTORS) || play->actorCtx.lensActive ||
(actor->room != play->roomCtx.curRoom.num))) { (actor->room != play->roomCtx.curRoom.num))) {
ASSERT(invisibleActorCounter < INVISIBLE_ACTOR_MAX, ASSERT(invisibleActorCounter < INVISIBLE_ACTOR_MAX,

View file

@ -7,7 +7,7 @@
#include "z_bg_bombwall.h" #include "z_bg_bombwall.h"
#include "assets/objects/gameplay_field_keep/gameplay_field_keep.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_Init(Actor* thisx, PlayState* play);
void BgBombwall_Destroy(Actor* thisx, PlayState* play); void BgBombwall_Destroy(Actor* thisx, PlayState* play);

View file

@ -55,7 +55,7 @@ void BgGndDarkmeiro_Init(Actor* thisx, PlayState* play2) {
switch (this->dyna.actor.params & 0xFF) { switch (this->dyna.actor.params & 0xFF) {
case DARKMEIRO_INVISIBLE_PATH: case DARKMEIRO_INVISIBLE_PATH:
this->dyna.actor.draw = BgGndDarkmeiro_DrawInvisiblePath; this->dyna.actor.draw = BgGndDarkmeiro_DrawInvisiblePath;
this->dyna.actor.flags |= ACTOR_FLAG_7; this->dyna.actor.flags |= ACTOR_FLAG_REACT_TO_LENS;
break; break;
case DARKMEIRO_CLEAR_BLOCK: case DARKMEIRO_CLEAR_BLOCK:
CollisionHeader_GetVirtual(&gClearBlockCol, &colHeader); CollisionHeader_GetVirtual(&gClearBlockCol, &colHeader);

View file

@ -40,9 +40,9 @@ void BgGndNisekabe_Update(Actor* thisx, PlayState* play) {
BgGndNisekabe* this = (BgGndNisekabe*)thisx; BgGndNisekabe* this = (BgGndNisekabe*)thisx;
if (play->actorCtx.lensActive) { if (play->actorCtx.lensActive) {
this->actor.flags |= ACTOR_FLAG_7; this->actor.flags |= ACTOR_FLAG_REACT_TO_LENS;
} else { } 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; BgGndNisekabe* this = (BgGndNisekabe*)thisx;
u32 index = this->actor.params & 0xFF; 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]); Gfx_DrawDListXlu(play, dLists[index]);
} else { } else {
Gfx_DrawDListOpa(play, dLists[index]); Gfx_DrawDListOpa(play, dLists[index]);

View file

@ -292,9 +292,9 @@ void BgHakaGate_FalseSkull(BgHakaGate* this, PlayState* play) {
Math_StepToS(&this->vFlameScale, 350, 20); Math_StepToS(&this->vFlameScale, 350, 20);
} }
if (play->actorCtx.lensActive) { if (play->actorCtx.lensActive) {
this->dyna.actor.flags |= ACTOR_FLAG_7; this->dyna.actor.flags |= ACTOR_FLAG_REACT_TO_LENS;
} else { } 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; BgHakaGate* this = (BgHakaGate*)thisx;
MtxF currentMtxF; 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); Gfx_DrawDListXlu(play, object_haka_objects_DL_00F1B0);
} else { } else {
Gfx_SetupDL_25Opa(play->state.gfxCtx); Gfx_SetupDL_25Opa(play->state.gfxCtx);

View file

@ -8,7 +8,7 @@
#include "assets/objects/object_hakach_objects/object_hakach_objects.h" #include "assets/objects/object_hakach_objects/object_hakach_objects.h"
#include "assets/objects/object_haka_objects/object_haka_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_Init(Actor* thisx, PlayState* play);
void BgHakaMegane_Destroy(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; Actor* thisx = &this->dyna.actor;
if (play->actorCtx.lensActive) { 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); DynaPoly_DisableCollision(play, &play->colCtx.dyna, this->dyna.bgId);
} else { } else {
thisx->flags &= ~ACTOR_FLAG_7; thisx->flags &= ~ACTOR_FLAG_REACT_TO_LENS;
DynaPoly_EnableCollision(play, &play->colCtx.dyna, this->dyna.bgId); 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) { void BgHakaMegane_Draw(Actor* thisx, PlayState* play) {
BgHakaMegane* this = (BgHakaMegane*)thisx; 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]); Gfx_DrawDListXlu(play, sDLists[thisx->params]);
} else { } else {
Gfx_DrawDListOpa(play, sDLists[thisx->params]); Gfx_DrawDListOpa(play, sDLists[thisx->params]);

View file

@ -72,7 +72,7 @@ void BgHakaMeganeBG_Init(Actor* thisx, PlayState* play) {
if (thisx->params == 0) { if (thisx->params == 0) {
CollisionHeader_GetVirtual(&object_haka_objects_Col_009168, &colHeader); 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->unk_16A = 20;
this->actionFunc = func_8087DFF8; this->actionFunc = func_8087DFF8;
} else if (thisx->params == 3) { } else if (thisx->params == 3) {

View file

@ -142,7 +142,7 @@ void BgHakaSgami_Init(Actor* thisx, PlayState* play) {
thisx->params = (thisx->params >> 8) & 0xFF; thisx->params = (thisx->params >> 8) & 0xFF;
if (this->unk_151 != 0) { if (this->unk_151 != 0) {
thisx->flags |= ACTOR_FLAG_7; thisx->flags |= ACTOR_FLAG_REACT_TO_LENS;
} }
Collider_InitTris(play, colliderScythe); Collider_InitTris(play, colliderScythe);

View file

@ -41,9 +41,9 @@ void BgMenkuriNisekabe_Update(Actor* thisx, PlayState* play) {
BgMenkuriNisekabe* this = (BgMenkuriNisekabe*)thisx; BgMenkuriNisekabe* this = (BgMenkuriNisekabe*)thisx;
if (play->actorCtx.lensActive) { if (play->actorCtx.lensActive) {
this->actor.flags |= ACTOR_FLAG_7; this->actor.flags |= ACTOR_FLAG_REACT_TO_LENS;
} else { } 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; BgMenkuriNisekabe* this = (BgMenkuriNisekabe*)thisx;
u32 index = this->actor.params & 0xFF; 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]); Gfx_DrawDListXlu(play, sDLists[index]);
} else { } else {
Gfx_DrawDListOpa(play, sDLists[index]); Gfx_DrawDListOpa(play, sDLists[index]);

View file

@ -74,7 +74,7 @@ void BgSpot02Objects_Init(Actor* thisx, PlayState* play) {
} else if (thisx->params == 1) { } else if (thisx->params == 1) {
this->actionFunc = func_808AC8FC; this->actionFunc = func_808AC8FC;
CollisionHeader_GetVirtual(&object_spot02_objects_Col_0128D8, &colHeader); CollisionHeader_GetVirtual(&object_spot02_objects_Col_0128D8, &colHeader);
thisx->flags |= ACTOR_FLAG_22; thisx->flags |= ACTOR_FLAG_IGNORE_POINT_LIGHTS;
} else { } else {
if (play->sceneId == SCENE_GRAVEYARD) { if (play->sceneId == SCENE_GRAVEYARD) {
this->actionFunc = func_808AC908; this->actionFunc = func_808AC908;

View file

@ -9,7 +9,7 @@
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#include "assets/objects/gameplay_field_keep/gameplay_field_keep.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_Init(Actor* thisx, PlayState* play);
void BgSpot08Bakudankabe_Destroy(Actor* thisx, PlayState* play); void BgSpot08Bakudankabe_Destroy(Actor* thisx, PlayState* play);

View file

@ -581,7 +581,7 @@ void BossSst_HeadIntro(BossSst* this, PlayState* play) {
sSubCamEye.y += 400.0f * 0.01f; sSubCamEye.y += 400.0f * 0.01f;
sSubCamEye.z += 1550.0f * 0.01f; sSubCamEye.z += 1550.0f * 0.01f;
this->vVanish = true; this->vVanish = true;
this->actor.flags |= ACTOR_FLAG_7; this->actor.flags |= ACTOR_FLAG_REACT_TO_LENS;
} else if (revealStateTimer < 40) { } else if (revealStateTimer < 40) {
sSubCamAt.x += 125.0f * 0.01f; sSubCamAt.x += 125.0f * 0.01f;
sSubCamAt.y += 350.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->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT);
this->colliderCyl.base.acFlags &= ~AC_ON; this->colliderCyl.base.acFlags &= ~AC_ON;
this->vVanish = false; 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); BossSst_HeadSfx(this, NA_SE_EN_SHADEST_FREEZE);
this->actionFunc = BossSst_HeadStunned; this->actionFunc = BossSst_HeadStunned;
} }
@ -2646,9 +2646,9 @@ void BossSst_UpdateHead(Actor* thisx, PlayState* play) {
this->actionFunc(this, play); this->actionFunc(this, play);
if (this->vVanish) { if (this->vVanish) {
if (!play->actorCtx.lensActive || (thisx->colorFilterTimer != 0)) { if (!play->actorCtx.lensActive || (thisx->colorFilterTimer != 0)) {
this->actor.flags &= ~ACTOR_FLAG_7; this->actor.flags &= ~ACTOR_FLAG_REACT_TO_LENS;
} else { } 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); 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_HeadReadyCharge) || (this->actionFunc == BossSst_HeadCharge) ||
(this->actionFunc == BossSst_HeadFrozenHand) || (this->actionFunc == BossSst_HeadStunned) || (this->actionFunc == BossSst_HeadFrozenHand) || (this->actionFunc == BossSst_HeadStunned) ||
(this->actionFunc == BossSst_HeadVulnerable) || (this->actionFunc == BossSst_HeadDamage))) { (this->actionFunc == BossSst_HeadVulnerable) || (this->actionFunc == BossSst_HeadDamage))) {
@ -2777,7 +2777,7 @@ s32 BossSst_OverrideHeadDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
s32 timer12; s32 timer12;
f32 shakeMod; 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; *dList = NULL;
} else if (this->actionFunc == BossSst_HeadThrash) { // Animation modifications for death cutscene } else if (this->actionFunc == BossSst_HeadThrash) { // Animation modifications for death cutscene
shakeAmp = (this->timer / 10) + 1; 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); 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); Gfx_SetupDL_25Opa(play->state.gfxCtx);
gDPSetPrimColor(POLY_OPA_DISP++, 0x00, 0x80, sBodyColor.r, sBodyColor.g, sBodyColor.b, 255); gDPSetPrimColor(POLY_OPA_DISP++, 0x00, 0x80, sBodyColor.r, sBodyColor.g, sBodyColor.b, 255);
if (!sBodyStatic) { if (!sBodyStatic) {
@ -2895,7 +2895,7 @@ void BossSst_DrawHead(Actor* thisx, PlayState* play) {
Matrix_RotateY(-randYaw, MTXMODE_APPLY); 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 = POLY_OPA_DISP =
SkelAnime_DrawFlex(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, SkelAnime_DrawFlex(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
BossSst_OverrideHeadDraw, BossSst_PostHeadDraw, this, POLY_OPA_DISP); BossSst_OverrideHeadDraw, BossSst_PostHeadDraw, this, POLY_OPA_DISP);

View file

@ -160,7 +160,7 @@ void EnBox_Init(Actor* thisx, PlayState* play2) {
this->dyna.actor.flags |= ACTOR_FLAG_4; this->dyna.actor.flags |= ACTOR_FLAG_4;
} else { } else {
if (this->type == ENBOX_TYPE_4 || this->type == ENBOX_TYPE_6) { 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); EnBox_SetupAction(this, EnBox_WaitOpen);
this->movementFlags |= ENBOX_MOVE_IMMOBILE; this->movementFlags |= ENBOX_MOVE_IMMOBILE;
@ -438,7 +438,7 @@ void EnBox_WaitOpen(EnBox* this, PlayState* play) {
void EnBox_Open(EnBox* this, PlayState* play) { void EnBox_Open(EnBox* this, PlayState* play) {
u16 sfxId; u16 sfxId;
this->dyna.actor.flags &= ~ACTOR_FLAG_7; this->dyna.actor.flags &= ~ACTOR_FLAG_REACT_TO_LENS;
if (SkelAnime_Update(&this->skelanime)) { if (SkelAnime_Update(&this->skelanime)) {
if (this->unk_1F4 > 0) { 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); 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 and cleared by Open
*/ */
if ((this->alpha == 255 && !(this->type == ENBOX_TYPE_4 || this->type == ENBOX_TYPE_6)) || 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))) { (this->type == ENBOX_TYPE_4 || this->type == ENBOX_TYPE_6))) {
gDPPipeSync(POLY_OPA_DISP++); gDPPipeSync(POLY_OPA_DISP++);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255); gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);

View file

@ -191,7 +191,7 @@ void EnDh_SetupWait(EnDh* this) {
this->actor.shape.yOffset = -15000.0f; this->actor.shape.yOffset = -15000.0f;
this->dirtWaveSpread = this->actor.speed = 0.0f; this->dirtWaveSpread = this->actor.speed = 0.0f;
this->actor.world.rot.y = this->actor.shape.rot.y; 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; this->dirtWavePhase = this->actionState = this->actor.params = ENDH_WAIT_UNDERGROUND;
EnDh_SetupAction(this, EnDh_Wait); EnDh_SetupAction(this, EnDh_Wait);
} }
@ -208,7 +208,7 @@ void EnDh_Wait(EnDh* this, PlayState* play) {
case 0: case 0:
this->actor.flags |= ACTOR_FLAG_0; this->actor.flags |= ACTOR_FLAG_0;
this->actor.shape.rot.y = this->actor.yawTowardsPlayer; 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->actionState++;
this->drawDirtWave++; this->drawDirtWave++;
Actor_PlaySfx(&this->actor, NA_SE_EN_DEADHAND_HIDE); Actor_PlaySfx(&this->actor, NA_SE_EN_DEADHAND_HIDE);

View file

@ -147,7 +147,7 @@ void EnFirefly_Init(Actor* thisx, PlayState* play) {
CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit); CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit);
if ((this->actor.params & 0x8000) != 0) { if ((this->actor.params & 0x8000) != 0) {
this->actor.flags |= ACTOR_FLAG_7; this->actor.flags |= ACTOR_FLAG_REACT_TO_LENS;
if (1) {} if (1) {}
this->actor.draw = EnFirefly_DrawInvisible; this->actor.draw = EnFirefly_DrawInvisible;
this->actor.params &= 0x7FFF; this->actor.params &= 0x7FFF;

View file

@ -138,7 +138,7 @@ void EnFloormas_Init(Actor* thisx, PlayState* play2) {
// s16 cast needed // s16 cast needed
this->actor.params &= (s16) ~(SPAWN_INVISIBLE); this->actor.params &= (s16) ~(SPAWN_INVISIBLE);
if (invisble) { if (invisble) {
this->actor.flags |= ACTOR_FLAG_7; this->actor.flags |= ACTOR_FLAG_REACT_TO_LENS;
this->actor.draw = EnFloormas_DrawHighlighted; this->actor.draw = EnFloormas_DrawHighlighted;
} }
@ -280,7 +280,7 @@ void EnFloormas_SetupLand(EnFloormas* this) {
void EnFloormas_SetupSplit(EnFloormas* this) { void EnFloormas_SetupSplit(EnFloormas* this) {
Actor_SetScale(&this->actor, 0.004f); Actor_SetScale(&this->actor, 0.004f);
this->actor.flags |= ACTOR_FLAG_4; 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; this->actor.draw = EnFloormas_DrawHighlighted;
} else { } else {
this->actor.draw = EnFloormas_Draw; this->actor.draw = EnFloormas_Draw;

View file

@ -7,7 +7,7 @@
#include "z_en_po_desert.h" #include "z_en_po_desert.h"
#include "assets/objects/object_po_field/object_po_field.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_Init(Actor* thisx, PlayState* play);
void EnPoDesert_Destroy(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); Collider_UpdateCylinder(&this->actor, &this->collider);
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base); CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
if (play->actorCtx.lensActive) { 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; this->actor.shape.shadowDraw = ActorShadow_DrawCircle;
} else { } else {
this->actor.shape.shadowDraw = NULL; 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; mtxScale = this->actionTimer / 16.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY); 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; *dList = NULL;
} }
return false; return false;
@ -234,7 +234,7 @@ void EnPoDesert_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
color.r = (s16)(rand * 30.0f) + 225; color.r = (s16)(rand * 30.0f) + 225;
color.g = (s16)(rand * 100.0f) + 155; color.g = (s16)(rand * 100.0f) + 155;
color.b = (s16)(rand * 160.0f) + 95; 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)++); gDPPipeSync((*gfxP)++);
gDPSetEnvColor((*gfxP)++, color.r, color.g, color.b, 255); gDPSetEnvColor((*gfxP)++, color.r, color.g, color.b, 255);
gSPMatrix((*gfxP)++, MATRIX_NEW(play->state.gfxCtx, "../z_en_po_desert.c", 523), gSPMatrix((*gfxP)++, MATRIX_NEW(play->state.gfxCtx, "../z_en_po_desert.c", 523),

View file

@ -181,7 +181,7 @@ void EnRd_Init(Actor* thisx, PlayState* play) {
SkelAnime_Update(&this->skelAnime); SkelAnime_Update(&this->skelAnime);
if (this->actor.params == REDEAD_TYPE_INVISIBLE) { if (this->actor.params == REDEAD_TYPE_INVISIBLE) {
this->actor.flags |= ACTOR_FLAG_7; this->actor.flags |= ACTOR_FLAG_REACT_TO_LENS;
} }
} }

View file

@ -790,7 +790,7 @@ void EnSt_Init(Actor* thisx, PlayState* play) {
this->blureIdx = EnSt_CreateBlureEffect(play); this->blureIdx = EnSt_CreateBlureEffect(play);
EnSt_InitColliders(this, play); EnSt_InitColliders(this, play);
if (thisx->params == 2) { if (thisx->params == 2) {
this->actor.flags |= ACTOR_FLAG_7; this->actor.flags |= ACTOR_FLAG_REACT_TO_LENS;
} }
if (this->actor.params == 1) { if (this->actor.params == 1) {
this->actor.naviEnemyId = NAVI_ENEMY_BIG_SKULLTULA; this->actor.naviEnemyId = NAVI_ENEMY_BIG_SKULLTULA;

View file

@ -306,7 +306,7 @@ void EnTest_Init(Actor* thisx, PlayState* play) {
} }
if (this->actor.params == STALFOS_TYPE_INVISIBLE) { 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 (this->actor.params == STALFOS_TYPE_INVISIBLE) {
if (play->actorCtx.lensActive) { 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; this->actor.shape.shadowDraw = ActorShadow_DrawFeet;
} else { } 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; 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); 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; *dList = NULL;
} }

View file

@ -9,7 +9,7 @@
#include "assets/objects/gameplay_keep/gameplay_keep.h" #include "assets/objects/gameplay_keep/gameplay_keep.h"
#include "terminal.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_Init(Actor* thisx, PlayState* play);
void ObjBean_Destroy(Actor* thisx, PlayState* play); void ObjBean_Destroy(Actor* thisx, PlayState* play);