From b627ff5423d0bd563b602f4611fb4bdcd5b866b4 Mon Sep 17 00:00:00 2001 From: engineer124 <47598039+engineer124@users.noreply.github.com> Date: Tue, 25 Jun 2024 10:54:14 +1000 Subject: Animation Cleanup: En_T* (#1522) * anim T cleanup * more cleanup * brackets and floats * small thing * more floats * fix name * fix * format --------- Co-authored-by: angie --- mm/src/code/z_actor.c | 4 ++-- mm/src/code/z_collision_check.c | 4 ++-- mm/src/code/z_eventmgr.c | 6 +++--- mm/src/code/z_fireobj.c | 2 +- mm/src/code/z_kankyo.c | 4 ++-- mm/src/code/z_path.c | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) (limited to 'mm/src/code') diff --git a/mm/src/code/z_actor.c b/mm/src/code/z_actor.c index da4402df1..36a856729 100644 --- a/mm/src/code/z_actor.c +++ b/mm/src/code/z_actor.c @@ -4311,7 +4311,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 }, }; @@ -5303,7 +5303,7 @@ void Actor_DrawDamageEffects(PlayState* play, Actor* actor, Vec3f bodyPartsPos[] FrameInterpolation_RecordOpenChild(bodyPartsPos, type); 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/mm/src/code/z_collision_check.c b/mm/src/code/z_collision_check.c index 598c322c0..7963797fe 100644 --- a/mm/src/code/z_collision_check.c +++ b/mm/src/code/z_collision_check.c @@ -1656,7 +1656,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/mm/src/code/z_eventmgr.c b/mm/src/code/z_eventmgr.c index ff380b244..c34b80798 100644 --- a/mm/src/code/z_eventmgr.c +++ b/mm/src/code/z_eventmgr.c @@ -322,7 +322,7 @@ void CutsceneManager_Queue(s16 csId) { if (!GameInteractor_Should(VB_QUEUE_CUTSCENE, true, &csId)) { return; } - if (csId >= 0) { + if (csId >= CS_ID_NONE) { sWaitingCutsceneList[csId >> 3] |= 1 << (csId & 7); } } @@ -347,7 +347,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); @@ -363,7 +363,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/mm/src/code/z_fireobj.c b/mm/src/code/z_fireobj.c index 8f75a4d3e..dd98ef8ea 100644 --- a/mm/src/code/z_fireobj.c +++ b/mm/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/mm/src/code/z_kankyo.c b/mm/src/code/z_kankyo.c index 89692358a..436194751 100644 --- a/mm/src/code/z_kankyo.c +++ b/mm/src/code/z_kankyo.c @@ -1971,8 +1971,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/mm/src/code/z_path.c b/mm/src/code/z_path.c index 76d7ce144..afc27e7f7 100644 --- a/mm/src/code/z_path.c +++ b/mm/src/code/z_path.c @@ -18,7 +18,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); -- cgit v1.2.3