1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-02 22:14:33 +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:
Dragorn421 2022-03-21 00:33:29 +01:00 committed by GitHub
parent c42c172e72
commit 4729ac131a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 37 additions and 41 deletions

View file

@ -355,9 +355,9 @@ void EnEncount2_ParticleDraw(Actor* thisx, GlobalContext* globalCtx) {
for (i = 0; i < ARRAY_COUNT(this->particles); particle++, i++) {
if (particle->isAlive) {
Matrix_Translate(particle->pos.x, particle->pos.y, particle->pos.z, MTXMODE_NEW);
Matrix_RotateX(particle->rot.x * (M_PI / 180.0f), MTXMODE_APPLY);
Matrix_RotateY(particle->rot.y * (M_PI / 180.0f), MTXMODE_APPLY);
Matrix_RotateZ(particle->rot.z * (M_PI / 180.0f), MTXMODE_APPLY);
Matrix_RotateX(DEG_TO_RAD(particle->rot.x), MTXMODE_APPLY);
Matrix_RotateY(DEG_TO_RAD(particle->rot.y), MTXMODE_APPLY);
Matrix_RotateZ(DEG_TO_RAD(particle->rot.z), MTXMODE_APPLY);
Matrix_Scale(particle->scale, particle->scale, particle->scale, MTXMODE_APPLY);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 155, 55, 255);
gDPSetEnvColor(POLY_OPA_DISP++, 155, 255, 55, 255);