diff options
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/z_actor.c | 4 | ||||
| -rw-r--r-- | src/code/z_collision_check.c | 4 | ||||
| -rw-r--r-- | src/code/z_eventmgr.c | 6 | ||||
| -rw-r--r-- | src/code/z_fireobj.c | 2 | ||||
| -rw-r--r-- | src/code/z_kankyo.c | 4 | ||||
| -rw-r--r-- | src/code/z_path.c | 2 |
6 files changed, 11 insertions, 11 deletions
diff --git a/src/code/z_actor.c b/src/code/z_actor.c index f47b5146e..d4fe8a9da 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -4023,7 +4023,7 @@ typedef struct { } DoorLockInfo; // size = 0x1C DoorLockInfo sDoorLocksInfo[DOORLOCK_MAX] = { - /* DOORLOCK_NORMAL */ { 0.54f, 6000.0f, 5000.0, 1.0f, 0.0f, gDoorChainDL, gDoorLockDL }, + /* DOORLOCK_NORMAL */ { 0.54f, 6000.0f, 5000.0f, 1.0f, 0.0f, gDoorChainDL, gDoorLockDL }, /* DOORLOCK_BOSS */ { 0.644f, 12000.0f, 8000.0f, 1.0f, 0.0f, gBossDoorChainDL, gBossDoorLockDL }, /* DOORLOCK_2 */ { 0.6400000453f, 8500.0f, 8000.0f, 1.75f, 0.1f, gDoorChainDL, gDoorLockDL }, }; @@ -4968,7 +4968,7 @@ void Actor_DrawDamageEffects(PlayState* play, Actor* actor, Vec3f bodyPartsPos[] for (bodyPartIndex = 0; bodyPartIndex < bodyPartsCount; bodyPartIndex++, bodyPartsPos++) { alpha = bodyPartIndex & 3; alpha = effectAlphaScaled - 30.0f * alpha; - if (effectAlphaScaled < 30.0f * (bodyPartIndex & 3)) { + if (effectAlphaScaled < (30.0f * (bodyPartIndex & 3))) { alpha = 0.0f; } if (alpha > 255.0f) { diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c index c3ac08936..aa36a4ac7 100644 --- a/src/code/z_collision_check.c +++ b/src/code/z_collision_check.c @@ -1660,7 +1660,7 @@ s32 CollisionCheck_SetATvsAC(PlayState* play, Collider* at, ColliderInfo* atInfo if (effect == 0) { return 0; } - } else if (CollisionCheck_ApplyBumperDefense(damage, acInfo) < 1.0f && effect == 0) { + } else if ((CollisionCheck_ApplyBumperDefense(damage, acInfo) < 1.0f) && (effect == 0)) { return 0; } } @@ -3374,7 +3374,7 @@ void CollisionCheck_ApplyDamage(PlayState* play, CollisionCheckContext* colCtxt, } } else { finalDamage = CollisionCheck_ApplyBumperDefense(damage, info); - if (finalDamage < 1.0f && effect == 0) { + if ((finalDamage < 1.0f) && (effect == 0)) { return; } } diff --git a/src/code/z_eventmgr.c b/src/code/z_eventmgr.c index 35e2f1fef..6c629cf5e 100644 --- a/src/code/z_eventmgr.c +++ b/src/code/z_eventmgr.c @@ -318,7 +318,7 @@ s16 CutsceneManager_Update(void) { } void CutsceneManager_Queue(s16 csId) { - if (csId >= 0) { + if (csId > CS_ID_NONE) { sWaitingCutsceneList[csId >> 3] |= 1 << (csId & 7); } } @@ -343,7 +343,7 @@ s16 CutsceneManager_IsNext(s16 csId) { s16 CutsceneManager_StartWithPlayerCs(s16 csId, Actor* actor) { s16 startCsId = CutsceneManager_Start(csId, actor); - if (startCsId >= 0) { + if (startCsId > CS_ID_NONE) { Player_SetCsActionWithHaltedActors(sCutsceneMgr.play, NULL, PLAYER_CSACTION_WAIT); if (sCutsceneMgr.length == 0) { CutsceneManager_Stop(sCutsceneMgr.csId); @@ -359,7 +359,7 @@ s16 CutsceneManager_StartWithPlayerCs(s16 csId, Actor* actor) { s16 CutsceneManager_StartWithPlayerCsAndSetFlag(s16 csId, Actor* actor) { s16 startCsId = CutsceneManager_Start(csId, actor); - if (startCsId >= 0) { + if (startCsId > CS_ID_NONE) { Player_SetCsActionWithHaltedActors(sCutsceneMgr.play, NULL, PLAYER_CSACTION_WAIT); if (sCutsceneMgr.length == 0) { CutsceneManager_Stop(sCutsceneMgr.csId); diff --git a/src/code/z_fireobj.c b/src/code/z_fireobj.c index 8f75a4d3e..dd98ef8ea 100644 --- a/src/code/z_fireobj.c +++ b/src/code/z_fireobj.c @@ -109,7 +109,7 @@ void FireObj_UpdateStateTransitions(PlayState* play, FireObj* fire) { if ((fire->flags & FIRE_FLAG_WATER_EXTINGUISHABLE) && (fire->state != FIRE_STATE_NOT_LIT) && WaterBox_GetSurface1_2(play, &play->colCtx, fire->position.x, fire->position.z, &waterY, &waterBox) && - (waterY - fire->position.y > 6500.0f * fire->yScale)) { + ((waterY - fire->position.y) > (6500.0f * fire->yScale))) { FireObj_SetState(fire, fire->dynamicSizeStep, FIRE_STATE_NOT_LIT); } if ((fire->flags & FIRE_FLAG_INTERACT_STICK) && (player->heldItemAction == PLAYER_IA_DEKU_STICK)) { diff --git a/src/code/z_kankyo.c b/src/code/z_kankyo.c index 7e88e81d0..586ac8c76 100644 --- a/src/code/z_kankyo.c +++ b/src/code/z_kankyo.c @@ -1930,8 +1930,8 @@ void Environment_DrawLensFlare(PlayState* play, EnvironmentContext* envCtx, View if (sSunDepthTestY < 0) { sSunDepthTestY = 0; } - if (sSunScreenDepth != GPACK_ZDZ(G_MAXFBZ, 0) || screenPos.x < 0.0f || screenPos.y < 0.0f || - screenPos.x > SCREEN_WIDTH || screenPos.y > SCREEN_HEIGHT) { + if ((sSunScreenDepth != GPACK_ZDZ(G_MAXFBZ, 0)) || (screenPos.x < 0.0f) || (screenPos.y < 0.0f) || + (screenPos.x > SCREEN_WIDTH) || (screenPos.y > SCREEN_HEIGHT)) { isOffScreen = true; } } diff --git a/src/code/z_path.c b/src/code/z_path.c index 7b33c1f83..2694d9b1c 100644 --- a/src/code/z_path.c +++ b/src/code/z_path.c @@ -21,7 +21,7 @@ f32 Path_OrientAndGetDistSq(Actor* actor, Path* path, s16 waypoint, s16* yaw) { Vec3s* pointPos; if (path == NULL) { - return -1.0; + return -1.0f; } pointPos = Lib_SegmentedToVirtual(path->points); |
