summaryrefslogtreecommitdiff
path: root/src/code/z_actor.c
diff options
context:
space:
mode:
authorDerek Hensley <hensley.derek58@gmail.com>2024-06-03 11:33:03 -0700
committerGitHub <noreply@github.com>2024-06-03 14:33:03 -0400
commitf26e77ba4088f20e72e13409f9ad535039abd291 (patch)
treefa39e6c8bb57bfe5729854c8ea2bd3e25ea4155f /src/code/z_actor.c
parent312b65d5e34878df4b70d8b9922e1082213b3662 (diff)
More General Cleanup (#1638)
* LINKER_FILES in makefile * COLPOLY_GET_NORMAL * math header * libc * M_PI for cosf and sinf files * MAXFLOAT * Revert "MAXFLOAT" This reverts commit 96b75ffaa89b1a4ca1c08278b28bc3c70224701a. * Remove SHT_MINV * SHRT_MAX * Add M_PI * Angle macros * f suffix * Format
Diffstat (limited to 'src/code/z_actor.c')
-rw-r--r--src/code/z_actor.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/code/z_actor.c b/src/code/z_actor.c
index d8a4a8072..8f08b3f31 100644
--- a/src/code/z_actor.c
+++ b/src/code/z_actor.c
@@ -4064,7 +4064,7 @@ void Actor_DrawDoorLock(PlayState* play, s32 frame, s32 type) {
if ((i % 2) != 0) {
rotZStep = 2.0f * entry->chainAngle;
} else {
- rotZStep = M_PI - (2.0f * entry->chainAngle);
+ rotZStep = M_PIf - (2.0f * entry->chainAngle);
}
chainRotZ += rotZStep;
@@ -4902,11 +4902,11 @@ void Actor_DrawDamageEffects(PlayState* play, Actor* actor, Vec3f bodyPartsPos[]
Matrix_Scale(frozenScale, frozenScale, frozenScale, MTXMODE_APPLY);
if (bodyPartIndex & 1) {
- Matrix_RotateYF(M_PI, MTXMODE_APPLY);
+ Matrix_RotateYF(M_PIf, MTXMODE_APPLY);
}
if (bodyPartIndex & 2) {
- Matrix_RotateZF(M_PI, MTXMODE_APPLY);
+ Matrix_RotateZF(M_PIf, MTXMODE_APPLY);
}
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx),
@@ -4984,7 +4984,7 @@ void Actor_DrawDamageEffects(PlayState* play, Actor* actor, Vec3f bodyPartsPos[]
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0,
((bodyPartIndex * 10 + gameplayFrames) * -20) & 0x1FF, 32, 128));
- Matrix_RotateYF(M_PI, MTXMODE_APPLY);
+ Matrix_RotateYF(M_PIf, MTXMODE_APPLY);
currentMatrix->mf[3][0] = bodyPartsPos->x;
currentMatrix->mf[3][1] = bodyPartsPos->y;
currentMatrix->mf[3][2] = bodyPartsPos->z;
@@ -5026,7 +5026,7 @@ void Actor_DrawDamageEffects(PlayState* play, Actor* actor, Vec3f bodyPartsPos[]
// Apply and draw a light orb over each body part of frozen actor
for (bodyPartIndex = 0; bodyPartIndex < bodyPartsCount; bodyPartIndex++, bodyPartsPos++) {
- Matrix_RotateZF(Rand_CenteredFloat(2 * M_PI), MTXMODE_APPLY);
+ Matrix_RotateZF(Rand_CenteredFloat(2 * M_PIf), MTXMODE_APPLY);
currentMatrix->mf[3][0] = bodyPartsPos->x;
currentMatrix->mf[3][1] = bodyPartsPos->y;
currentMatrix->mf[3][2] = bodyPartsPos->z;
@@ -5065,8 +5065,8 @@ void Actor_DrawDamageEffects(PlayState* play, Actor* actor, Vec3f bodyPartsPos[]
// Every body part draws two electric sparks at random orientations
for (bodyPartIndex = 0; bodyPartIndex < bodyPartsCount; bodyPartIndex++, bodyPartsPos++) {
// first electric spark
- Matrix_RotateXFApply(Rand_ZeroFloat(2 * M_PI));
- Matrix_RotateZF(Rand_ZeroFloat(2 * M_PI), MTXMODE_APPLY);
+ Matrix_RotateXFApply(Rand_ZeroFloat(2 * M_PIf));
+ Matrix_RotateZF(Rand_ZeroFloat(2 * M_PIf), MTXMODE_APPLY);
currentMatrix->mf[3][0] = Rand_CenteredFloat((f32)sREG(24) + 30.0f) + bodyPartsPos->x;
currentMatrix->mf[3][1] = Rand_CenteredFloat((f32)sREG(24) + 30.0f) + bodyPartsPos->y;
currentMatrix->mf[3][2] = Rand_CenteredFloat((f32)sREG(24) + 30.0f) + bodyPartsPos->z;
@@ -5077,8 +5077,8 @@ void Actor_DrawDamageEffects(PlayState* play, Actor* actor, Vec3f bodyPartsPos[]
gSPDisplayList(POLY_XLU_DISP++, gElectricSparkModelDL);
// second electric spark
- Matrix_RotateXFApply(Rand_ZeroFloat(2 * M_PI));
- Matrix_RotateZF(Rand_ZeroFloat(2 * M_PI), MTXMODE_APPLY);
+ Matrix_RotateXFApply(Rand_ZeroFloat(2 * M_PIf));
+ Matrix_RotateZF(Rand_ZeroFloat(2 * M_PIf), MTXMODE_APPLY);
currentMatrix->mf[3][0] = Rand_CenteredFloat((f32)sREG(24) + 30.0f) + bodyPartsPos->x;
currentMatrix->mf[3][1] = Rand_CenteredFloat((f32)sREG(24) + 30.0f) + bodyPartsPos->y;
currentMatrix->mf[3][2] = Rand_CenteredFloat((f32)sREG(24) + 30.0f) + bodyPartsPos->z;