1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-02-21 22:35:23 +00:00

Clean-up some objectively useless parens

This commit is contained in:
Dragorn421 2021-09-21 11:10:26 +02:00
parent 940942fad4
commit 09529e36f8
No known key found for this signature in database
GPG key ID: C182A3A3996E8201
12 changed files with 23 additions and 25 deletions

View file

@ -2694,7 +2694,7 @@ Actor* Actor_Spawn(ActorContext* actorCtx, GlobalContext* globalCtx, s16 actorId
objBankIndex = Object_GetIndex(&globalCtx->objectCtx, actorInit->objectId);
if ((objBankIndex < 0) ||
((actorInit->category == ACTORCAT_ENEMY) && (Flags_GetClear(globalCtx, globalCtx->roomCtx.curRoom.num)))) {
((actorInit->category == ACTORCAT_ENEMY) && Flags_GetClear(globalCtx, globalCtx->roomCtx.curRoom.num))) {
// "No data bank!! <data bank%d> (profilep->bank=%d)"
osSyncPrintf(VT_COL(RED, WHITE) "データバンク無し!!<データバンク=%d>(profilep->bank=%d)\n" VT_RST,
objBankIndex, actorInit->objectId);

View file

@ -115,9 +115,9 @@ void BgMoriHineri_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void func_808A39FC(BgMoriHineri* this, GlobalContext* globalCtx) {
CollisionHeader* colHeader;
if ((Object_IsLoaded(&globalCtx->objectCtx, this->moriHineriObjIdx)) &&
(Object_IsLoaded(&globalCtx->objectCtx, this->moriTexObjIdx)) &&
((this->boxObjIdx < 0) || (Object_IsLoaded(&globalCtx->objectCtx, this->boxObjIdx)))) {
if (Object_IsLoaded(&globalCtx->objectCtx, this->moriHineriObjIdx) &&
Object_IsLoaded(&globalCtx->objectCtx, this->moriTexObjIdx) &&
((this->boxObjIdx < 0) || Object_IsLoaded(&globalCtx->objectCtx, this->boxObjIdx))) {
this->dyna.actor.objBankIndex = this->moriHineriObjIdx;
if (this->dyna.actor.params >= 4) {
this->dyna.actor.params -= 4;

View file

@ -717,7 +717,7 @@ void func_8098652C(DemoIm* this, GlobalContext* globalCtx) {
}
void func_80986570(DemoIm* this, GlobalContext* globalCtx) {
if ((Animation_OnFrame(&this->skelAnime, 7.0f)) && (this->actor.bgCheckFlags & 1)) {
if (Animation_OnFrame(&this->skelAnime, 7.0f) && (this->actor.bgCheckFlags & 1)) {
u32 sfxId = SFX_FLAG;
sfxId += SurfaceType_GetSfx(&globalCtx->colCtx, this->actor.floorPoly, this->actor.floorBgId);

View file

@ -105,7 +105,7 @@ s32 ElfMsg_KillCheck(ElfMsg* this, GlobalContext* globalCtx) {
}
Actor_Kill(&this->actor);
return 1;
} else if ((this->actor.world.rot.y == -1) && (Flags_GetClear(globalCtx, this->actor.room))) {
} else if ((this->actor.world.rot.y == -1) && Flags_GetClear(globalCtx, this->actor.room)) {
LOG_STRING("共倒れ", "../z_elf_msg.c", 172); // "Mutual destruction"
if (((this->actor.params >> 8) & 0x3F) != 0x3F) {
Flags_SetSwitch(globalCtx, ((this->actor.params >> 8) & 0x3F));

View file

@ -82,7 +82,7 @@ s32 ElfMsg2_KillCheck(ElfMsg2* this, GlobalContext* globalCtx) {
}
Actor_Kill(&this->actor);
return 1;
} else if ((this->actor.world.rot.y == -1) && (Flags_GetClear(globalCtx, this->actor.room))) {
} else if ((this->actor.world.rot.y == -1) && Flags_GetClear(globalCtx, this->actor.room)) {
LOG_STRING("共倒れ2", "../z_elf_msg2.c", 182); // "Mutual destruction 2"
if (((this->actor.params >> 8) & 0x3F) != 0x3F) {
Flags_SetSwitch(globalCtx, ((this->actor.params >> 8) & 0x3F));

View file

@ -506,9 +506,8 @@ void EnFloormas_BigStopWalk(EnFloormas* this, GlobalContext* globalCtx) {
void EnFloormas_Run(EnFloormas* this, GlobalContext* globalCtx) {
SkelAnime_Update(&this->skelAnime);
if ((((Animation_OnFrame(&this->skelAnime, 0.0f)) || (Animation_OnFrame(&this->skelAnime, 12.0f))) ||
(Animation_OnFrame(&this->skelAnime, 24.0f))) ||
(Animation_OnFrame(&this->skelAnime, 36.0f))) {
if (Animation_OnFrame(&this->skelAnime, 0.0f) || Animation_OnFrame(&this->skelAnime, 12.0f) ||
Animation_OnFrame(&this->skelAnime, 24.0f) || Animation_OnFrame(&this->skelAnime, 36.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FALL_WALK);
}
@ -680,7 +679,7 @@ void EnFloormas_SmWalk(EnFloormas* this, GlobalContext* globalCtx) {
SkelAnime_Update(&this->skelAnime);
DECR(this->smActionTimer);
if ((Animation_OnFrame(&this->skelAnime, 0.0f)) || (Animation_OnFrame(&this->skelAnime, 18.0f))) {
if (Animation_OnFrame(&this->skelAnime, 0.0f) || Animation_OnFrame(&this->skelAnime, 18.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FLOORMASTER_SM_WALK);
}
@ -699,7 +698,7 @@ void EnFloormas_SmDecideAction(EnFloormas* this, GlobalContext* globalCtx) {
s32 isAgainstWall;
SkelAnime_Update(&this->skelAnime);
if ((Animation_OnFrame(&this->skelAnime, 0.0f)) || (Animation_OnFrame(&this->skelAnime, 18.0f))) {
if (Animation_OnFrame(&this->skelAnime, 0.0f) || Animation_OnFrame(&this->skelAnime, 18.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FLOORMASTER_SM_WALK);
}
isAgainstWall = this->actor.bgCheckFlags & 8;

View file

@ -181,7 +181,7 @@ void EnHeishi3_CatchStart(EnHeishi3* this, GlobalContext* globalCtx) {
void func_80A55BD4(EnHeishi3* this, GlobalContext* globalCtx) {
SkelAnime_Update(&this->skelAnime);
if ((Animation_OnFrame(&this->skelAnime, 1.0f) != 0) || (Animation_OnFrame(&this->skelAnime, 17.0f) != 0)) {
if (Animation_OnFrame(&this->skelAnime, 1.0f) || Animation_OnFrame(&this->skelAnime, 17.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_KNIGHT_WALK);
}
if (this->caughtTimer == 0) {

View file

@ -403,7 +403,7 @@ void EnHintnuts_Leave(EnHintnuts* this, GlobalContext* globalCtx) {
if (this->animFlagAndTimer != 0) {
this->animFlagAndTimer--;
}
if ((Animation_OnFrame(&this->skelAnime, 0.0f)) || (Animation_OnFrame(&this->skelAnime, 6.0f))) {
if (Animation_OnFrame(&this->skelAnime, 0.0f) || Animation_OnFrame(&this->skelAnime, 6.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_WALK);
}
if (this->actor.bgCheckFlags & 8) {

View file

@ -573,9 +573,8 @@ void func_80AEBB3C(EnRu1* this) {
void func_80AEBB78(EnRu1* this) {
SkelAnime* skelAnime = &this->skelAnime;
if ((((Animation_OnFrame(skelAnime, 4.0f)) || (Animation_OnFrame(skelAnime, 13.0f))) ||
(Animation_OnFrame(skelAnime, 22.0f))) ||
(Animation_OnFrame(skelAnime, 31.0f))) {
if (Animation_OnFrame(skelAnime, 4.0f) || Animation_OnFrame(skelAnime, 13.0f) ||
Animation_OnFrame(skelAnime, 22.0f) || Animation_OnFrame(skelAnime, 31.0f)) {
func_80078914(&this->actor.projectedPos, NA_SE_PL_SWIM);
}
}
@ -832,7 +831,7 @@ void func_80AEC650(EnRu1* this) {
s32 pad[2];
if (this->unk_280 == 0) {
if ((Animation_OnFrame(&this->skelAnime, 2.0f)) || (Animation_OnFrame(&this->skelAnime, 7.0f))) {
if (Animation_OnFrame(&this->skelAnime, 2.0f) || Animation_OnFrame(&this->skelAnime, 7.0f)) {
func_80078914(&this->actor.projectedPos, NA_SE_PL_WALK_DIRT);
}
}
@ -1893,9 +1892,9 @@ void func_80AEF3A8(EnRu1* this, GlobalContext* globalCtx) {
void func_80AEF40C(EnRu1* this) {
SkelAnime* skelAnime = &this->skelAnime;
if ((Animation_OnFrame(skelAnime, 2.0f)) || (Animation_OnFrame(skelAnime, 7.0f)) ||
(Animation_OnFrame(skelAnime, 12.0f)) || (Animation_OnFrame(skelAnime, 18.0f)) ||
(Animation_OnFrame(skelAnime, 25.0f)) || (Animation_OnFrame(skelAnime, 33.0f))) {
if (Animation_OnFrame(skelAnime, 2.0f) || Animation_OnFrame(skelAnime, 7.0f) ||
Animation_OnFrame(skelAnime, 12.0f) || Animation_OnFrame(skelAnime, 18.0f) ||
Animation_OnFrame(skelAnime, 25.0f) || Animation_OnFrame(skelAnime, 33.0f)) {
func_80078914(&this->actor.projectedPos, NA_SE_PL_WALK_DIRT);
}
}

View file

@ -351,8 +351,8 @@ void EnWallmas_Walk(EnWallmas* this, GlobalContext* globalCtx) {
Math_ScaledStepToS(&this->actor.world.rot.y, (s16)((s32)this->actor.yawTowardsPlayer + 0x8000), 0xB6);
if ((Animation_OnFrame(&this->skelAnime, 0.0f) != 0) || (Animation_OnFrame(&this->skelAnime, 12.0f) != 0) ||
(Animation_OnFrame(&this->skelAnime, 24.0f) != 0) || (Animation_OnFrame(&this->skelAnime, 36.0f) != 0)) {
if (Animation_OnFrame(&this->skelAnime, 0.0f) || Animation_OnFrame(&this->skelAnime, 12.0f) ||
Animation_OnFrame(&this->skelAnime, 24.0f) || Animation_OnFrame(&this->skelAnime, 36.0f)) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FALL_WALK);
}
}

View file

@ -370,7 +370,7 @@ void EnXc_SetWalkingSFX(EnXc* this, GlobalContext* globalCtx) {
u32 sfxId;
s32 pad2;
if ((Animation_OnFrame(&this->skelAnime, 11.0f)) || (Animation_OnFrame(&this->skelAnime, 23.0f))) {
if (Animation_OnFrame(&this->skelAnime, 11.0f) || Animation_OnFrame(&this->skelAnime, 23.0f)) {
if (this->actor.bgCheckFlags & 1) {
sfxId = SFX_FLAG;
sfxId += SurfaceType_GetSfx(&globalCtx->colCtx, this->actor.floorPoly, this->actor.floorBgId);

View file

@ -1438,7 +1438,7 @@ void func_80B51D24(EnZl2* this, GlobalContext* globalCtx) {
u32 sfxId;
SkelAnime* skelAnime = &this->skelAnime;
if ((Animation_OnFrame(skelAnime, 6.0f)) || (Animation_OnFrame(skelAnime, 0.0f))) {
if (Animation_OnFrame(skelAnime, 6.0f) || Animation_OnFrame(skelAnime, 0.0f)) {
if (this->actor.bgCheckFlags & 1) {
sfxId = SFX_FLAG;
sfxId += SurfaceType_GetSfx(&globalCtx->colCtx, this->actor.floorPoly, this->actor.floorBgId);