mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-21 14:31:17 +00:00
Remove many redundant parentheses (eg. in boolean conditions) (#1220)
* Remove many unnecessary parens around boolean conditions * Remove duplicate parens in some expressions * Apply review suggestions * Update src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com>
This commit is contained in:
parent
c799176a30
commit
92aef346f2
36 changed files with 67 additions and 67 deletions
|
@ -350,14 +350,14 @@ void ObjSwitch_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void ObjSwitch_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
ObjSwitch* this = (ObjSwitch*)thisx;
|
||||
|
||||
switch ((this->dyna.actor.params & 7)) {
|
||||
switch (this->dyna.actor.params & 7) {
|
||||
case OBJSWITCH_TYPE_FLOOR:
|
||||
case OBJSWITCH_TYPE_FLOOR_RUSTY:
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
break;
|
||||
}
|
||||
|
||||
switch ((this->dyna.actor.params & 7)) {
|
||||
switch (this->dyna.actor.params & 7) {
|
||||
case OBJSWITCH_TYPE_FLOOR_RUSTY:
|
||||
case OBJSWITCH_TYPE_EYE:
|
||||
Collider_DestroyTris(globalCtx, &this->tris.col);
|
||||
|
@ -384,7 +384,7 @@ void ObjSwitch_FloorUp(ObjSwitch* this, GlobalContext* globalCtx) {
|
|||
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->tris.col.base);
|
||||
}
|
||||
} else {
|
||||
switch ((this->dyna.actor.params >> 4 & 7)) {
|
||||
switch (this->dyna.actor.params >> 4 & 7) {
|
||||
case OBJSWITCH_SUBTYPE_ONCE:
|
||||
if (func_8004356C(&this->dyna)) {
|
||||
ObjSwitch_FloorPressInit(this);
|
||||
|
@ -437,7 +437,7 @@ void ObjSwitch_FloorDownInit(ObjSwitch* this) {
|
|||
}
|
||||
|
||||
void ObjSwitch_FloorDown(ObjSwitch* this, GlobalContext* globalCtx) {
|
||||
switch ((this->dyna.actor.params >> 4 & 7)) {
|
||||
switch (this->dyna.actor.params >> 4 & 7) {
|
||||
case OBJSWITCH_SUBTYPE_ONCE:
|
||||
if (!Flags_GetSwitch(globalCtx, (this->dyna.actor.params >> 8 & 0x3F))) {
|
||||
ObjSwitch_FloorReleaseInit(this);
|
||||
|
@ -550,7 +550,7 @@ void ObjSwitch_EyeClosedInit(ObjSwitch* this) {
|
|||
}
|
||||
|
||||
void ObjSwitch_EyeClosed(ObjSwitch* this, GlobalContext* globalCtx) {
|
||||
switch ((this->dyna.actor.params >> 4 & 7)) {
|
||||
switch (this->dyna.actor.params >> 4 & 7) {
|
||||
case OBJSWITCH_SUBTYPE_ONCE:
|
||||
if (!Flags_GetSwitch(globalCtx, (this->dyna.actor.params >> 8 & 0x3F))) {
|
||||
ObjSwitch_EyeOpeningInit(this);
|
||||
|
@ -592,7 +592,7 @@ void ObjSwitch_CrystalOffInit(ObjSwitch* this) {
|
|||
}
|
||||
|
||||
void ObjSwitch_CrystalOff(ObjSwitch* this, GlobalContext* globalCtx) {
|
||||
switch ((this->dyna.actor.params >> 4 & 7)) {
|
||||
switch (this->dyna.actor.params >> 4 & 7) {
|
||||
case OBJSWITCH_SUBTYPE_ONCE:
|
||||
if ((this->jntSph.col.base.acFlags & AC_HIT) && this->disableAcTimer <= 0) {
|
||||
this->disableAcTimer = 10;
|
||||
|
@ -643,7 +643,7 @@ void ObjSwitch_CrystalOnInit(ObjSwitch* this) {
|
|||
}
|
||||
|
||||
void ObjSwitch_CrystalOn(ObjSwitch* this, GlobalContext* globalCtx) {
|
||||
switch ((this->dyna.actor.params >> 4 & 7)) {
|
||||
switch (this->dyna.actor.params >> 4 & 7) {
|
||||
case OBJSWITCH_SUBTYPE_ONCE:
|
||||
case OBJSWITCH_SUBTYPE_SYNC:
|
||||
if (!Flags_GetSwitch(globalCtx, (this->dyna.actor.params >> 8 & 0x3F))) {
|
||||
|
@ -688,7 +688,7 @@ void ObjSwitch_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
this->actionFunc(this, globalCtx);
|
||||
|
||||
switch ((this->dyna.actor.params & 7)) {
|
||||
switch (this->dyna.actor.params & 7) {
|
||||
case OBJSWITCH_TYPE_FLOOR:
|
||||
case OBJSWITCH_TYPE_FLOOR_RUSTY:
|
||||
this->unk_17F = this->dyna.unk_160;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue