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 <angheloalf95@gmail.com>
This commit is contained in:
engineer124
2024-06-25 10:54:14 +10:00
committed by GitHub
parent bb221b4a0f
commit 0bb57352a5
96 changed files with 811 additions and 627 deletions
+2 -2
View File
@@ -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) {
+2 -2
View File
@@ -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;
}
}
+3 -3
View File
@@ -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);
+1 -1
View File
@@ -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)) {
+2 -2
View File
@@ -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;
}
}
+1 -1
View File
@@ -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);