diff --git a/include/macros.h b/include/macros.h index 98efe590c5..9cb702f0b4 100644 --- a/include/macros.h +++ b/include/macros.h @@ -1,6 +1,4 @@ #ifndef MACROS_H #define MACROS_H -#define CHECK_FLAG_ALL(flags, mask) (((flags) & (mask)) == (mask)) - #endif diff --git a/include/z64actor.h b/include/z64actor.h index 2709356b99..1a8b503297 100644 --- a/include/z64actor.h +++ b/include/z64actor.h @@ -160,6 +160,8 @@ typedef struct ActorShape { // Flag controlling the use of `Actor.sfx`. Do not use directly. See Actor_PlaySfx_FlaggedTimer #define ACTOR_FLAG_SFX_TIMER (1 << 28) +#define ACTOR_FLAGS_CHECK_ALL(thisx, mask) (((thisx)->flags & (mask)) == (mask)) + #define COLORFILTER_GET_COLORINTENSITY(colorFilterParams) (((colorFilterParams) & 0x1F00) >> 5) #define COLORFILTER_GET_DURATION(colorFilterParams) ((colorFilterParams) & 0xFF) diff --git a/include/z64save.h b/include/z64save.h index af03e8ca6f..71b1414052 100644 --- a/include/z64save.h +++ b/include/z64save.h @@ -592,14 +592,11 @@ typedef enum LinkAge { (EVENTCHKINF_MASK(EVENTCHKINF_CARPENTER_0_RESCUED) | EVENTCHKINF_MASK(EVENTCHKINF_CARPENTER_1_RESCUED) | \ EVENTCHKINF_MASK(EVENTCHKINF_CARPENTER_2_RESCUED) | EVENTCHKINF_MASK(EVENTCHKINF_CARPENTER_3_RESCUED)) -#define GET_EVENTCHKINF_CARPENTERS_ALL_RESCUED() \ - CHECK_FLAG_ALL(gSaveContext.save.info.eventChkInf[EVENTCHKINF_INDEX_CARPENTERS_RESCUED], \ - EVENTCHKINF_CARPENTERS_ALL_RESCUED_MASK) +#define GET_EVENTCHKINF_CARPENTERS_ALL_RESCUED() \ + ((gSaveContext.save.info.eventChkInf[EVENTCHKINF_INDEX_CARPENTERS_RESCUED] & EVENTCHKINF_CARPENTERS_ALL_RESCUED_MASK) == (EVENTCHKINF_CARPENTERS_ALL_RESCUED_MASK)) -#define GET_EVENTCHKINF_CARPENTERS_ALL_RESCUED2() \ - CHECK_FLAG_ALL(gSaveContext.save.info.eventChkInf[EVENTCHKINF_INDEX_CARPENTERS_RESCUED] & \ - (EVENTCHKINF_CARPENTERS_ALL_RESCUED_MASK | 0xF0), \ - EVENTCHKINF_CARPENTERS_ALL_RESCUED_MASK) +#define GET_EVENTCHKINF_CARPENTERS_ALL_RESCUED2() \ + ((gSaveContext.save.info.eventChkInf[EVENTCHKINF_INDEX_CARPENTERS_RESCUED] & (EVENTCHKINF_CARPENTERS_ALL_RESCUED_MASK | 0xF0) & EVENTCHKINF_CARPENTERS_ALL_RESCUED_MASK) == (EVENTCHKINF_CARPENTERS_ALL_RESCUED_MASK)) #define ENDAIKU_CARPENTER_RESCUED_MASK(carpenterType) (1 << (carpenterType)) diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 8ea0eb113f..202b2e2327 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -596,7 +596,7 @@ void Attention_Update(Attention* attention, Player* player, Actor* playerFocusAc attention->reticleFadeAlphaControl = 0; } - lockOnSfxId = CHECK_FLAG_ALL(playerFocusActor->flags, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) + lockOnSfxId = ACTOR_FLAGS_CHECK_ALL(playerFocusActor, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) ? NA_SE_SY_LOCK_ON : NA_SE_SY_LOCK_ON_HUMAN; Sfx_PlaySfxCentered(lockOnSfxId); @@ -3468,9 +3468,9 @@ void Attention_FindActorInCategory(PlayState* play, ActorContext* actorCtx, Play while (actor != NULL) { if ((actor->update != NULL) && ((Player*)actor != player) && - CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_ATTENTION_ENABLED)) { + ACTOR_FLAGS_CHECK_ALL(actor, ACTOR_FLAG_ATTENTION_ENABLED)) { if ((actorCategory == ACTORCAT_ENEMY) && - CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) && + ACTOR_FLAGS_CHECK_ALL(actor, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE) && (actor->xyzDistToPlayerSq < SQ(500.0f)) && (actor->xyzDistToPlayerSq < sBgmEnemyDistSq)) { actorCtx->attention.bgmEnemy = actor; sBgmEnemyDistSq = actor->xyzDistToPlayerSq; diff --git a/src/code/z_bg_collect.c b/src/code/z_bg_collect.c index f4d63087b7..68966b74fc 100644 --- a/src/code/z_bg_collect.c +++ b/src/code/z_bg_collect.c @@ -82,7 +82,7 @@ void func_80043334(CollisionContext* colCtx, Actor* actor, s32 bgId) { if (dynaActor != NULL) { DynaPolyActor_SetActorOnTop(dynaActor); - if (CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_CAN_PRESS_SWITCHES)) { + if (ACTOR_FLAGS_CHECK_ALL(actor, ACTOR_FLAG_CAN_PRESS_SWITCHES)) { DynaPolyActor_SetSwitchPressed(dynaActor); } } diff --git a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c index f9c6f71d25..9ca642d4e9 100644 --- a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c +++ b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c @@ -176,7 +176,7 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) { if (this->collider.elem.atHitElem->acElemFlags & ACELEM_HOOKABLE) { ArmsHook_AttachToActor(this, touchedActor); - if (CHECK_FLAG_ALL(touchedActor->flags, ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER)) { + if (ACTOR_FLAGS_CHECK_ALL(touchedActor, ACTOR_FLAG_HOOKSHOT_PULLS_PLAYER)) { ArmsHook_PullPlayer(this); } } @@ -202,7 +202,7 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) { if (attachedActor != NULL) { if ((attachedActor->update == NULL) || - !CHECK_FLAG_ALL(attachedActor->flags, ACTOR_FLAG_HOOKSHOT_ATTACHED)) { + !ACTOR_FLAGS_CHECK_ALL(attachedActor, ACTOR_FLAG_HOOKSHOT_ATTACHED)) { attachedActor = NULL; this->attachedActor = NULL; } else if (this->actor.child != NULL) { 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 ab2b0ce919..98824a94e0 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 @@ -58,7 +58,7 @@ void BgGndNisekabe_Draw(Actor* thisx, PlayState* play) { BgGndNisekabe* this = (BgGndNisekabe*)thisx; u32 index = PARAMS_GET_U(this->actor.params, 0, 8); - if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) { + if (ACTOR_FLAGS_CHECK_ALL(&this->actor, 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 9ef689694f..a209637949 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 @@ -355,7 +355,7 @@ void BgHakaGate_Draw(Actor* thisx, PlayState* play) { BgHakaGate* this = (BgHakaGate*)thisx; MtxF currentMtxF; - if (CHECK_FLAG_ALL(thisx->flags, ACTOR_FLAG_REACT_TO_LENS)) { + if (ACTOR_FLAGS_CHECK_ALL(thisx, 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 3d67136b73..a09195d6fe 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 @@ -133,7 +133,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_REACT_TO_LENS)) { + if (ACTOR_FLAGS_CHECK_ALL(thisx, 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_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.c b/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.c index 0bc0649065..ff13454557 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 @@ -54,7 +54,7 @@ void BgMenkuriNisekabe_Draw(Actor* thisx, PlayState* play) { BgMenkuriNisekabe* this = (BgMenkuriNisekabe*)thisx; u32 index = PARAMS_GET_U(this->actor.params, 0, 8); - if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) { + if (ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_REACT_TO_LENS)) { Gfx_DrawDListXlu(play, sDLists[index]); } else { Gfx_DrawDListOpa(play, sDLists[index]); 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 75b72adde9..89ba5fab34 100644 --- a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c +++ b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c @@ -917,7 +917,7 @@ void BossSst_HeadVulnerable(BossSst* this, PlayState* play) { Math_StepToF(&sHandOffsets[RIGHT].z, 600.0f, 20.0f); Math_StepToF(&sHandOffsets[LEFT].x, 200.0f, 20.0f); Math_StepToF(&sHandOffsets[RIGHT].x, -200.0f, 20.0f); - if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_HOOKSHOT_ATTACHED)) { + if (ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_HOOKSHOT_ATTACHED)) { this->timer += 2; this->timer = CLAMP_MAX(this->timer, 50); } else { @@ -2713,7 +2713,7 @@ void BossSst_UpdateHead(Actor* thisx, PlayState* play2) { } BossSst_MoveAround(this); - if ((!this->vVanish || CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) && + if ((!this->vVanish || ACTOR_FLAGS_CHECK_ALL(&this->actor, 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))) { @@ -2818,7 +2818,7 @@ s32 BossSst_OverrideHeadDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* Gfx** gfx) { BossSst* this = (BossSst*)thisx; - if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS) && this->vVanish) { + if (!ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_REACT_TO_LENS) && this->vVanish) { *dList = NULL; } else if (this->actionFunc == BossSst_HeadThrash) { // Animation modifications for death cutscene s32 shakeAmp = (this->timer / 10) + 1; @@ -2897,7 +2897,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_REACT_TO_LENS)) { + if (!ACTOR_FLAGS_CHECK_ALL(&this->actor, 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) { @@ -2924,7 +2924,7 @@ void BossSst_DrawHead(Actor* thisx, PlayState* play) { Matrix_RotateY(-randYaw, MTXMODE_APPLY); } - if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) { + if (!ACTOR_FLAGS_CHECK_ALL(&this->actor, 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 d45fd27314..c4ef15919a 100644 --- a/src/overlays/actors/ovl_En_Box/z_en_box.c +++ b/src/overlays/actors/ovl_En_Box/z_en_box.c @@ -640,7 +640,7 @@ void EnBox_Draw(Actor* thisx, PlayState* play) { 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_REACT_TO_LENS) && + (!ACTOR_FLAGS_CHECK_ALL(&this->dyna.actor, 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_Fd/z_en_fd.c b/src/overlays/actors/ovl_En_Fd/z_en_fd.c index 26848dd956..475c476bb5 100644 --- a/src/overlays/actors/ovl_En_Fd/z_en_fd.c +++ b/src/overlays/actors/ovl_En_Fd/z_en_fd.c @@ -244,7 +244,7 @@ s32 EnFd_SpawnCore(EnFd* this, PlayState* play) { this->actor.child->colChkInfo.health = 8; } - if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_HOOKSHOT_ATTACHED)) { + if (ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_HOOKSHOT_ATTACHED)) { Actor_SwapHookshotAttachment(play, &this->actor, this->actor.child); } @@ -684,7 +684,7 @@ void EnFd_Update(Actor* thisx, PlayState* play) { EnFd_SpawnDot(this, play); } - if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_HOOKSHOT_ATTACHED)) { + if (ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_HOOKSHOT_ATTACHED)) { if (EnFd_SpawnCore(this, play)) { this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED; this->invincibilityTimer = 30; 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 d365822f59..a9d9036e9f 100644 --- a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c +++ b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c @@ -293,7 +293,7 @@ void EnFloormas_SetupLand(EnFloormas* this) { void EnFloormas_SetupSplit(EnFloormas* this) { Actor_SetScale(&this->actor, 0.004f); this->actor.flags |= ACTOR_FLAG_UPDATE_CULLING_DISABLED; - if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) { + if (ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_REACT_TO_LENS)) { this->actor.draw = EnFloormas_DrawHighlighted; } else { this->actor.draw = EnFloormas_Draw; diff --git a/src/overlays/actors/ovl_En_Fw/z_en_fw.c b/src/overlays/actors/ovl_En_Fw/z_en_fw.c index b9a678d699..ba002aefbe 100644 --- a/src/overlays/actors/ovl_En_Fw/z_en_fw.c +++ b/src/overlays/actors/ovl_En_Fw/z_en_fw.c @@ -376,7 +376,7 @@ void EnFw_Update(Actor* thisx, PlayState* play) { EnFw* this = (EnFw*)thisx; SkelAnime_Update(&this->skelAnime); - if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_HOOKSHOT_ATTACHED)) { + if (!ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_HOOKSHOT_ATTACHED)) { Actor_MoveXZGravity(&this->actor); Actor_UpdateBgCheckInfo(play, &this->actor, 10.0f, 20.0f, 0.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2); this->actionFunc(this, play); 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 57ef9a85b6..282d6249f1 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 @@ -226,7 +226,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_REACT_TO_LENS)) { + if (!ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_REACT_TO_LENS)) { *dList = NULL; } return false; @@ -246,7 +246,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_REACT_TO_LENS)) { + if (ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_REACT_TO_LENS)) { gDPPipeSync((*gfxP)++); gDPSetEnvColor((*gfxP)++, color.r, color.g, color.b, 255); MATRIX_FINALIZE_AND_LOAD((*gfxP)++, play->state.gfxCtx, "../z_en_po_desert.c", 523); diff --git a/src/overlays/actors/ovl_En_Si/z_en_si.c b/src/overlays/actors/ovl_En_Si/z_en_si.c index d1597d0827..b5bf27be16 100644 --- a/src/overlays/actors/ovl_En_Si/z_en_si.c +++ b/src/overlays/actors/ovl_En_Si/z_en_si.c @@ -88,7 +88,7 @@ s32 func_80AFB748(EnSi* this, PlayState* play) { void func_80AFB768(EnSi* this, PlayState* play) { Player* player = GET_PLAYER(play); - if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_HOOKSHOT_ATTACHED)) { + if (ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_HOOKSHOT_ATTACHED)) { this->actionFunc = func_80AFB89C; } else { Math_SmoothStepToF(&this->actor.scale.x, 0.25f, 0.4f, 1.0f, 0.0f); @@ -121,7 +121,7 @@ void func_80AFB89C(EnSi* this, PlayState* play) { Actor_SetScale(&this->actor, this->actor.scale.x); this->actor.shape.rot.y += 0x400; - if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_HOOKSHOT_ATTACHED)) { + if (!ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_HOOKSHOT_ATTACHED)) { Item_Give(play, ITEM_SKULL_TOKEN); player->actor.freezeTimer = 10; Message_StartTextbox(play, 0xB4, NULL); 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 0f9a9aa228..61628f342c 100644 --- a/src/overlays/actors/ovl_En_Test/z_en_test.c +++ b/src/overlays/actors/ovl_En_Test/z_en_test.c @@ -1853,7 +1853,7 @@ s32 EnTest_OverrideLimbDraw(PlayState* play2, s32 limbIndex, Gfx** dList, Vec3f* } if ((this->actor.params == STALFOS_TYPE_INVISIBLE) && - !CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_REACT_TO_LENS)) { + !ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_REACT_TO_LENS)) { *dList = NULL; } diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 258e237e05..5f93be1107 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -1739,7 +1739,7 @@ BAD_RETURN(s32) func_80832224(Player* this) { s32 Player_IsTalking(PlayState* play) { Player* this = GET_PLAYER(play); - return CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_TALK); + return ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_TALK); } void Player_AnimPlayOnce(PlayState* play, Player* this, LinkAnimationHeader* anim) { @@ -2558,7 +2558,7 @@ s32 Player_FriendlyLockOnOrParallel(Player* this) { */ s32 Player_UpdateHostileLockOn(Player* this) { if ((this->focusActor != NULL) && - CHECK_FLAG_ALL(this->focusActor->flags, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)) { + ACTOR_FLAGS_CHECK_ALL(this->focusActor, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)) { this->stateFlags1 |= PLAYER_STATE1_HOSTILE_LOCK_ON; return true; @@ -4003,7 +4003,7 @@ void Player_UpdateZTargeting(Player* this, PlayState* play) { // is hostile. This is a special case to allow Player to have more freedom of movement and be able // to throw a carried actor at the lock-on actor, even if it is hostile. if ((this->stateFlags1 & PLAYER_STATE1_CARRYING_ACTOR) || - !CHECK_FLAG_ALL(this->focusActor->flags, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)) { + !ACTOR_FLAGS_CHECK_ALL(this->focusActor, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)) { this->stateFlags1 |= PLAYER_STATE1_FRIENDLY_ACTOR_FOCUS; } } else { @@ -6177,7 +6177,7 @@ s32 Player_ActionHandler_Talk(Player* this, PlayState* play) { canTalkToLockOnWithCUp = (lockOnActor != NULL) && - (CHECK_FLAG_ALL(lockOnActor->flags, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_TALK_WITH_C_UP) || + (ACTOR_FLAGS_CHECK_ALL(lockOnActor, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_TALK_WITH_C_UP) || (lockOnActor->naviEnemyId != NAVI_ENEMY_NONE)); if (canTalkToLockOnWithCUp || (this->naviTextId != 0)) { @@ -6292,7 +6292,7 @@ s32 Player_ActionHandler_0(Player* this, PlayState* play) { } if ((this->focusActor != NULL) && - (CHECK_FLAG_ALL(this->focusActor->flags, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_TALK_WITH_C_UP) || + (ACTOR_FLAGS_CHECK_ALL(this->focusActor, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_TALK_WITH_C_UP) || (this->focusActor->naviEnemyId != NAVI_ENEMY_NONE))) { this->stateFlags2 |= PLAYER_STATE2_21; } else if ((this->naviTextId == 0) && !Player_CheckHostileLockOn(this) && @@ -11378,7 +11378,7 @@ void Player_UpdateCamAndSeqModes(PlayState* play, Player* this) { } else if (this->stateFlags2 & PLAYER_STATE2_8) { camMode = CAM_MODE_PUSH_PULL; } else if ((focusActor = this->focusActor) != NULL) { - if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_TALK)) { + if (ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_TALK)) { camMode = CAM_MODE_TALK; } else if (this->stateFlags1 & PLAYER_STATE1_FRIENDLY_ACTOR_FOCUS) { if (this->stateFlags1 & PLAYER_STATE1_BOOMERANG_THROWN) { @@ -12000,7 +12000,7 @@ void Player_UpdateCommon(Player* this, PlayState* play, Input* input) { Player_UpdateShapeYaw(this, play); - if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_TALK)) { + if (ACTOR_FLAGS_CHECK_ALL(&this->actor, ACTOR_FLAG_TALK)) { this->talkActorDistance = 0.0f; } else { this->talkActor = NULL; @@ -12564,7 +12564,7 @@ void Player_Action_Talk(Player* this, PlayState* play) { if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) { this->actor.flags &= ~ACTOR_FLAG_TALK; - if (!CHECK_FLAG_ALL(this->talkActor->flags, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)) { + if (!ACTOR_FLAGS_CHECK_ALL(this->talkActor, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE)) { this->stateFlags2 &= ~PLAYER_STATE2_LOCK_ON_WITH_SWITCH; } @@ -16155,7 +16155,7 @@ void Player_StartTalking(PlayState* play, Actor* actor) { s32 pad; if ((this->talkActor != NULL) || (actor == this->naviActor) || - CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_TALK_WITH_C_UP)) { + ACTOR_FLAGS_CHECK_ALL(actor, ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_TALK_WITH_C_UP)) { actor->flags |= ACTOR_FLAG_TALK; }