mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-04 23:14:37 +00:00
Angle cleanup - DEG_TO_RAD
(#1157)
* Run formatter * Touch up angle macros (parentheses and hex constants) * Remove `DEGF_TO_RADF`, use `DEG_TO_RAD` instead * Remove `DEGTORAD`, use `DEG_TO_RAD` instead * Use `DEG_TO_RAD` more
This commit is contained in:
parent
c42c172e72
commit
4729ac131a
17 changed files with 37 additions and 41 deletions
|
@ -949,11 +949,11 @@ s32 func_800458D4(Camera* camera, VecSph* eyeAtDir, f32 arg2, f32* arg3, s16 arg
|
|||
deltaY = playerPosRot->pos.y - *arg3;
|
||||
eyeAtAngle = Math_FAtan2F(deltaY, OLib_Vec3fDistXZ(&camera->at, &camera->eye));
|
||||
|
||||
if (eyeAtAngle > DEGF_TO_RADF(OREG(32))) {
|
||||
if (eyeAtAngle > DEG_TO_RAD(OREG(32))) {
|
||||
if (1) {}
|
||||
phi_f2 = 1.0f - sinf(eyeAtAngle - DEGF_TO_RADF(OREG(32)));
|
||||
} else if (eyeAtAngle < DEGF_TO_RADF(OREG(33))) {
|
||||
phi_f2 = 1.0f - sinf(DEGF_TO_RADF(OREG(33)) - eyeAtAngle);
|
||||
phi_f2 = 1.0f - sinf(eyeAtAngle - DEG_TO_RAD(OREG(32)));
|
||||
} else if (eyeAtAngle < DEG_TO_RAD(OREG(33))) {
|
||||
phi_f2 = 1.0f - sinf(DEG_TO_RAD(OREG(33)) - eyeAtAngle);
|
||||
} else {
|
||||
phi_f2 = 1.0f;
|
||||
}
|
||||
|
|
|
@ -1899,8 +1899,8 @@ void Environment_DrawLightning(GlobalContext* globalCtx, s32 unused) {
|
|||
Matrix_Translate(sLightningBolts[i].pos.x + sLightningBolts[i].offset.x,
|
||||
sLightningBolts[i].pos.y + sLightningBolts[i].offset.y,
|
||||
sLightningBolts[i].pos.z + sLightningBolts[i].offset.z, MTXMODE_NEW);
|
||||
Matrix_RotateX(sLightningBolts[i].pitch * (M_PI / 180.0f), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(sLightningBolts[i].roll * (M_PI / 180.0f), MTXMODE_APPLY);
|
||||
Matrix_RotateX(DEG_TO_RAD(sLightningBolts[i].pitch), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(DEG_TO_RAD(sLightningBolts[i].roll), MTXMODE_APPLY);
|
||||
Matrix_Scale(22.0f, 100.0f, 22.0f, MTXMODE_APPLY);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 128);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 0, 255, 255, 128);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue