mirror of
https://github.com/zeldaret/oot.git
synced 2025-05-09 18:43:45 +00:00
create ACTOR_FLAGS_CHECK_ALL
This commit is contained in:
parent
d4528a0541
commit
d052e79774
19 changed files with 40 additions and 43 deletions
|
@ -32,8 +32,6 @@
|
|||
|
||||
#define RGBA8(r, g, b, a) ((((r) & 0xFF) << 24) | (((g) & 0xFF) << 16) | (((b) & 0xFF) << 8) | (((a) & 0xFF) << 0))
|
||||
|
||||
#define CHECK_FLAG_ALL(flags, mask) (((flags) & (mask)) == (mask))
|
||||
|
||||
#if PLATFORM_N64 || DEBUG_FEATURES
|
||||
#define HUNGUP_AND_CRASH(file, line) Fault_AddHungupAndCrash(file, line)
|
||||
#else
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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))
|
||||
|
||||
|
|
|
@ -595,7 +595,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);
|
||||
|
@ -3467,9 +3467,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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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]);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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]);
|
||||
|
|
|
@ -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]);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -1737,7 +1737,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) {
|
||||
|
@ -2556,7 +2556,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;
|
||||
|
@ -4001,7 +4001,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 {
|
||||
|
@ -6175,7 +6175,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)) {
|
||||
|
@ -6290,7 +6290,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) &&
|
||||
|
@ -11376,7 +11376,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) {
|
||||
|
@ -11998,7 +11998,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;
|
||||
|
@ -12562,7 +12562,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;
|
||||
}
|
||||
|
||||
|
@ -16153,7 +16153,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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue