Skip to content

Commit

Permalink
Old cvar to new
Browse files Browse the repository at this point in the history
  • Loading branch information
PurpleHato committed May 3, 2024
1 parent 76fabd2 commit 2cf3089
Show file tree
Hide file tree
Showing 30 changed files with 46 additions and 46 deletions.
2 changes: 1 addition & 1 deletion soh/src/code/z_actor.c
Original file line number Diff line number Diff line change
Expand Up @@ -3475,7 +3475,7 @@ Actor* Actor_Find(ActorContext* actorCtx, s32 actorId, s32 actorCategory) {
* While the screen flashes, the game freezes.
*/
void Enemy_StartFinishingBlow(PlayState* play, Actor* actor) {
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
play->actorCtx.freezeFlashTimer = 5;
}
SoundSource_PlaySfxAtFixedWorldPos(play, &actor->world.pos, 20, NA_SE_EN_LAST_DAMAGE);
Expand Down
2 changes: 1 addition & 1 deletion soh/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ void EnArrow_Fly(EnArrow* this, PlayState* play) {
}

if (this->actor.params == ARROW_NUT) {
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
iREG(50) = -1;
}
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_M_FIRE1, this->actor.world.pos.x,
Expand Down
2 changes: 1 addition & 1 deletion soh/src/overlays/actors/ovl_En_Ba/z_en_ba.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ void func_809B7174(EnBa* this) {
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->actor.speedXZ = 10.0f;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_BALINADE_HAND_DAMAGE);
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 12);
}
EnBa_SetupAction(this, EnBa_RecoilFromDamage);
Expand Down
2 changes: 1 addition & 1 deletion soh/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ void func_809BD5E0(EnBigokuta* this) {
this->unk_196 = 24;
this->unk_19A = 0;
this->cylinder[0].base.atFlags &= ~AT_ON;
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 24);
}
this->actionFunc = func_809BE180;
Expand Down
2 changes: 1 addition & 1 deletion soh/src/overlays/actors/ovl_En_Bom/z_en_bom.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ void EnBom_Update(Actor* thisx, PlayState* play2) {
}

if ((this->timer < 100) && ((this->timer & (this->flashSpeedScale + 1)) != 0)) {
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Math_SmoothStepToF(&this->flashIntensity, 140.0f, 1.0f, 140.0f / this->flashSpeedScale, 0.0f);
} else {
Math_SmoothStepToF(&this->flashIntensity, 40.0f, 1.0f, 40.0f / this->flashSpeedScale, 0.0f);
Expand Down
2 changes: 1 addition & 1 deletion soh/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ void EnBombf_Update(Actor* thisx, PlayState* play) {
}

if ((this->timer < 100) && ((this->timer & (this->flashSpeedScale + 1)) != 0)) {
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Math_SmoothStepToF(&this->flashIntensity, 150.0f, 1.0f, 150.0f / this->flashSpeedScale, 0.0f);
} else {
Math_SmoothStepToF(&this->flashIntensity, 50.0f, 1.0f, 50.0f / this->flashSpeedScale, 0.0f);
Expand Down
6 changes: 3 additions & 3 deletions soh/src/overlays/actors/ovl_En_Crow/z_en_crow.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void EnCrow_SetupDamaged(EnCrow* this, PlayState* play) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_KAICHO_DEAD);

if (this->actor.colChkInfo.damageEffect == 3) { // Ice arrows
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0, 255, 0, 40);
}
for (i = 0; i < 8; i++) {
Expand All @@ -172,15 +172,15 @@ void EnCrow_SetupDamaged(EnCrow* this, PlayState* play) {
((Rand_ZeroOne() * 0.15f) + 0.85f) * scale);
}
} else if (this->actor.colChkInfo.damageEffect == 2) { // Fire arrows and Din's Fire
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 40);
}

for (i = 0; i < 4; i++) {
EffectSsEnFire_SpawnVec3f(play, &this->actor, &this->actor.world.pos, 50.0f * scale, 0, 0, i);
}
} else {
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 40);
}
}
Expand Down
2 changes: 1 addition & 1 deletion soh/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ void EnDekunuts_SetupBeDamaged(EnDekunuts* this) {
this->actor.speedXZ = 10.0f;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_DAMAGE);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_CUTBODY);
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, Animation_GetLastFrame(&gDekuNutsDamageAnim));
} else {
Actor_SetColorFilter(&this->actor, 0, 0, 0, Animation_GetLastFrame(&gDekuNutsDamageAnim));
Expand Down
2 changes: 1 addition & 1 deletion soh/src/overlays/actors/ovl_En_Dh/z_en_dh.c
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ void EnDh_CollisionCheck(EnDh* this, PlayState* play) {
if (player->unk_844 != 0) {
this->unk_258 = player->unk_845;
}
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8);
}
lastHealth = this->actor.colChkInfo.health;
Expand Down
2 changes: 1 addition & 1 deletion soh/src/overlays/actors/ovl_En_Dha/z_en_dha.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ void EnDha_UpdateHealth(EnDha* this, PlayState* play) {
if (this->actor.colChkInfo.damageEffect == 0 || this->actor.colChkInfo.damageEffect == 6) {
return;
} else {
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8);
}
if (Actor_ApplyDamage(&this->actor) == 0) {
Expand Down
2 changes: 1 addition & 1 deletion soh/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ void func_809F7B3C(EnDodojr* this, PlayState* play) {

if (this->unk_1FC != 0) {
if (this->actor.colorFilterTimer == 0) {
if (CVar_GetS32("gPhotosensitiveMode", 0)) {
if (CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 0, 0, 0); // Note: the explosion timer is also related to their blinking...
} else {
Actor_SetColorFilter(&this->actor, 0x4000, 200, 0, this->unk_1FC);
Expand Down
4 changes: 2 additions & 2 deletions soh/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ void EnDodongo_Death(EnDodongo* this, PlayState* play) {
EnDodongo_SpawnBombSmoke(this, play);
}
} else if (this->actor.colorFilterTimer == 0) {
if (CVar_GetS32("gPhotosensitiveMode", 0)) {
if (CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 0, 0, 0); // Note: the explosion timer is also related to their blinking...
} else {
Actor_SetColorFilter(&this->actor, 0x4000, 0x78, 0, 4);
Expand Down Expand Up @@ -734,7 +734,7 @@ void EnDodongo_CollisionCheck(EnDodongo* this, PlayState* play) {
EnDodongo_SetupStunned(this);
}
} else {
if (CVar_GetS32("gPhotosensitiveMode", 0)) {
if (CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 0x78, 0, 8);
}
if (Actor_ApplyDamage(&this->actor) == 0) {
Expand Down
4 changes: 2 additions & 2 deletions soh/src/overlays/actors/ovl_En_Fw/z_en_fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ void EnFw_Run(EnFw* this, PlayState* play) {
Math_SmoothStepToF(&this->actor.scale.x, 0.024999999f, 0.08f, 0.6f, 0.0f);
Actor_SetScale(&this->actor, this->actor.scale.x);
if (this->actor.colorFilterTimer == 0) {
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 0xC8, 0, this->explosionTimer);
} else {
Actor_SetColorFilter(&this->actor, 0, 0, 0, this->explosionTimer); // Note: the explosion timer is also related to their blinking...
Expand All @@ -276,7 +276,7 @@ void EnFw_Run(EnFw* this, PlayState* play) {
}
} else {
if (!(this->actor.bgCheckFlags & 1) || this->actor.velocity.y > 0.0f) {
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 0xC8, 0, this->damageTimer);
} else {
Actor_SetColorFilter(&this->actor, 0, 0, 0, this->damageTimer); // Note: the damage timer is also related to their blinking...
Expand Down
4 changes: 2 additions & 2 deletions soh/src/overlays/actors/ovl_En_Fz/z_en_fz.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ void EnFz_ApplyDamage(EnFz* this, PlayState* play) {
if (this->actor.colChkInfo.damageEffect != 2) {
if (this->actor.colChkInfo.damageEffect == 0xF) {
Actor_ApplyDamage(&this->actor);
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0x2000, 8);
}
if (this->actor.colChkInfo.health) {
Expand All @@ -371,7 +371,7 @@ void EnFz_ApplyDamage(EnFz* this, PlayState* play) {
}
} else {
Actor_ApplyDamage(&this->actor);
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0x2000, 8);
}
if (this->actor.colChkInfo.health == 0) {
Expand Down
2 changes: 1 addition & 1 deletion soh/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1376,7 +1376,7 @@ void EnGeldB_CollisionCheck(EnGeldB* this, PlayState* play) {
EnGeldB_SetupStunned(this);
}
} else {
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8);
}
if (Actor_ApplyDamage(&this->actor) == 0) {
Expand Down
2 changes: 1 addition & 1 deletion soh/src/overlays/actors/ovl_En_Goma/z_en_goma.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ void EnGoma_UpdateHit(EnGoma* this, PlayState* play) {
this->actor.colChkInfo.health -= swordDamage;
EnGoma_SetupHurt(this, play);

if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 5);
}

Expand Down
2 changes: 1 addition & 1 deletion soh/src/overlays/actors/ovl_En_Mb/z_en_mb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,7 @@ void EnMb_CheckColliding(EnMb* this, PlayState* play) {
}
} else {
Actor_ApplyDamage(&this->actor);
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 0xFA, 0, 0xC);
}
if (this->actor.params == ENMB_TYPE_CLUB) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void EnOkarinaEffect_TriggerStorm(EnOkarinaEffect* this, PlayState* play) {
if ((gWeatherMode != 0) || play->envCtx.unk_17 != 0) {
play->envCtx.unk_DE = 1;
}
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
play->envCtx.lightningMode = LIGHTNING_MODE_ON;
}
Environment_PlayStormNatureAmbience(play);
Expand Down
2 changes: 1 addition & 1 deletion soh/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ void EnOkuta_SetupShoot(EnOkuta* this, PlayState* play) {

void EnOkuta_SetupWaitToDie(EnOkuta* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &gOctorokHitAnim, -5.0f);
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 0xB);
}
this->collider.base.acFlags &= ~AC_HIT;
Expand Down
6 changes: 3 additions & 3 deletions soh/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ void EnPeehat_Adult_SetStateDie(EnPeehat* this) {
this->bladeRotVel = 0;
this->isStateDieFirstUpdate = 1;
this->actor.speedXZ = 0.0f;
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 8);
}
this->state = PEAHAT_STATE_DYING;
Expand Down Expand Up @@ -909,7 +909,7 @@ void EnPeehat_Adult_CollisionCheck(EnPeehat* this, PlayState* play) {
return;
} else {
Actor_ApplyDamage(&this->actor);
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 8);
}
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PIHAT_DAMAGE);
Expand All @@ -924,7 +924,7 @@ void EnPeehat_Adult_CollisionCheck(EnPeehat* this, PlayState* play) {
pos.z = Rand_CenteredFloat(20.0f) + this->actor.world.pos.z;
EffectSsEnFire_SpawnVec3f(play, &this->actor, &pos, 70, 0, 0, -1);
}
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 200, 0, 100);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ void func_80AD95D8(EnPoSisters* this) {
this->actor.speedXZ = 10.0f;
}
this->unk_199 &= ~0xB;
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 0x10);
}
this->actionFunc = func_80ADAAA4;
Expand Down
2 changes: 1 addition & 1 deletion soh/src/overlays/actors/ovl_En_Poh/z_en_poh.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ void func_80ADE28C(EnPoh* this) {
}
this->colliderCyl.base.acFlags &= ~AC_ON;
this->actor.speedXZ = 5.0f;
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 0x10);
}
this->actionFunc = func_80ADEECC;
Expand Down
8 changes: 4 additions & 4 deletions soh/src/overlays/actors/ovl_En_Rr/z_en_rr.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ void EnRr_CollisionCheck(EnRr* this, PlayState* play) {
this->stopScroll = false;
Actor_ApplyDamage(&this->actor);
this->invincibilityTimer = 40;
if (CVar_GetS32("gPhotosensitiveMode", 0)) {
if (CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0x2000, this->invincibilityTimer);
} else {
Actor_SetColorFilter(&this->actor, 0, 0, 0, this->invincibilityTimer);
Expand All @@ -472,7 +472,7 @@ void EnRr_CollisionCheck(EnRr* this, PlayState* play) {
if (this->actor.colChkInfo.health == 0) {
this->dropType = RR_DROP_RANDOM_RUPEE;
}
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0x2000, 0x50);
}
this->effectTimer = 20;
Expand All @@ -485,7 +485,7 @@ void EnRr_CollisionCheck(EnRr* this, PlayState* play) {
}
if (this->actor.colorFilterTimer == 0) {
this->effectTimer = 20;
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0, 0xFF, 0x2000, 0x50);
}
}
Expand All @@ -496,7 +496,7 @@ void EnRr_CollisionCheck(EnRr* this, PlayState* play) {
if (this->actor.colChkInfo.health == 0) {
this->dropType = RR_DROP_RUPEE_RED;
}
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, -0x8000, 0xFF, 0x2000, 0x50);
}
EnRr_SetupStunned(this);
Expand Down
4 changes: 2 additions & 2 deletions soh/src/overlays/actors/ovl_En_Skb/z_en_skb.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ void func_80AFD968(EnSkb* this, PlayState* play) {
this->unk_281 = 0;
if (this->actor.colChkInfo.damageEffect == 1) {
if (this->unk_280 != 6) {
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0, 0x78, 0, 0x50);
}
Actor_ApplyDamage(&this->actor);
Expand All @@ -477,7 +477,7 @@ void func_80AFD968(EnSkb* this, PlayState* play) {
}
phi_v1 = 25;
}
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, phi_v1);
}
if (!Actor_ApplyDamage(&this->actor)) {
Expand Down
2 changes: 1 addition & 1 deletion soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ s32 func_80B0C9F0(EnSw* this, PlayState* play) {
if ((this->collider.base.acFlags & 2) || phi_v1) {
this->collider.base.acFlags &= ~2;
this->unk_392 = 0x10;
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 0xC8, 0, this->unk_392);
}

Expand Down
8 changes: 4 additions & 4 deletions soh/src/overlays/actors/ovl_En_Test/z_en_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,7 @@ void func_80862154(EnTest* this) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL_DAMAGE);
this->unk_7C8 = 8;
this->actor.speedXZ = -2.0f;
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8);
}
EnTest_SetupAction(this, func_808621D4);
Expand Down Expand Up @@ -1259,7 +1259,7 @@ void func_80862398(EnTest* this) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL_DAMAGE);
this->unk_7C8 = 9;
this->actor.speedXZ = -2.0f;
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8);
}
EnTest_SetupAction(this, func_80862418);
Expand Down Expand Up @@ -1303,11 +1303,11 @@ void EnTest_SetupStunned(EnTest* this) {
this->actor.speedXZ = -4.0f;

if (this->lastDamageEffect == STALFOS_DMGEFF_LIGHT) {
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, -0x8000, 0x78, 0, 0x50);
}
} else {
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(&this->actor, 0, 0x78, 0, 0x50);
}

Expand Down
2 changes: 1 addition & 1 deletion soh/src/overlays/actors/ovl_En_Tite/z_en_tite.c
Original file line number Diff line number Diff line change
Expand Up @@ -861,7 +861,7 @@ void EnTite_CheckDamage(Actor* thisx, PlayState* play) {
// Otherwise apply damage and handle death where necessary
} else {
if ((thisx->colorFilterTimer == 0) || ((thisx->colorFilterParams & 0x4000) == 0)) {
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
Actor_SetColorFilter(thisx, 0x4000, 0xFF, 0, 8);
}
Actor_ApplyDamage(thisx);
Expand Down
4 changes: 2 additions & 2 deletions soh/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ void EnWeatherTag_EnabledRainLakeHylia(EnWeatherTag* this, PlayState* play) {
void EnWeatherTag_DisabledCloudyRainThunderKakariko(EnWeatherTag* this, PlayState* play) {
if (WeatherTag_CheckEnableWeatherEffect(this, play, 0, 1, 0, 4, 100, 5)) {
Environment_PlayStormNatureAmbience(play);
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
play->envCtx.lightningMode = LIGHTNING_MODE_ON;
}
play->envCtx.unk_EE[0] = 30;
Expand Down Expand Up @@ -305,7 +305,7 @@ void EnWeatherTag_DisabledRainThunder(EnWeatherTag* this, PlayState* play) {

if (Actor_WorldDistXZToActor(&player->actor, &this->actor) < WEATHER_TAG_RANGE100(this->actor.params)) {
Environment_PlayStormNatureAmbience(play);
if (!CVar_GetS32("gPhotosensitiveMode", 0)) {
if (!CVarGetInteger("gPhotosensitiveMode", 0)) {
play->envCtx.lightningMode = LIGHTNING_MODE_ON;
}
play->envCtx.unk_EE[0] = 25;
Expand Down
Loading

0 comments on commit 2cf3089

Please sign in to comment.