mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-20 14:01:15 +00:00
Angle cleanup - macros names (#1193)
* Move binang utility macros out of angle conversion macros block
* `BINANG_TO_DEGF` -> `BINANG_TO_DEG_ALT` (it may even be warranted to name it _approx instead of _alt, unsure)
* Add `BINANG_TO_DEG` (unused by oot) (for completeness)
* `DEGF_TO_BINANG` -> `DEG_TO_BINANG_ALT` (again may even be _approx, or maybe _cam)
* Add `DEG_TO_BINANG` (unused by oot) (for completeness)
* `RADF_TO_BINANG` -> `RAD_TO_BINANG`
* `RADF_TO_DEGF` -> `RAD_TO_DEG`
* Cleanup argument names in angle conversion macros
* Format for angle macros changes
* Run formatter
* Move `DEG_TO_BINANG_ALT`, `BINANG_TO_DEG_ALT` to z64camera.h
* Remove `DEG_TO_BINANG`, `BINANG_TO_DEG`
* Remove `_ALT` from `DEG_TO_BINANG`, `BINANG_TO_DEG`
* Add comment about inaccuracy near `DEG_TO_BINANG`, `BINANG_TO_DEG`
* run formatter
* `CAM_` prefix on `DEG_TO_BINANG`, `BINANG_TO_DEG` macros
* Revert "Remove `DEG_TO_BINANG`, `BINANG_TO_DEG`"
This reverts commit 5321647e5b
.
This commit is contained in:
parent
ef870bdd11
commit
fed9ac3e20
52 changed files with 219 additions and 213 deletions
|
@ -694,7 +694,7 @@ void BossDodongo_Walk(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
sp48 = sp4C->x - this->actor.world.pos.x;
|
||||
sp44 = sp4C->z - this->actor.world.pos.z;
|
||||
Math_SmoothStepToF(&this->unk_1E8, 2000.0f, 1.0f, this->unk_1EC * 80.0f, 0.0f);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, RADF_TO_BINANG(Math_FAtan2F(sp48, sp44)), 5,
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, RAD_TO_BINANG(Math_FAtan2F(sp48, sp44)), 5,
|
||||
(this->unk_1EC * this->unk_1E8), 5);
|
||||
Math_SmoothStepToS(&this->unk_1C4, 0, 2, 2000, 0);
|
||||
|
||||
|
@ -771,7 +771,7 @@ void BossDodongo_Roll(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
sp4C = sp5C->x - this->actor.world.pos.x;
|
||||
sp48 = sp5C->z - this->actor.world.pos.z;
|
||||
Math_SmoothStepToF(&this->unk_1E8, 2000.0f, 1.0f, this->unk_1EC * 100.0f, 0.0f);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, RADF_TO_BINANG(Math_FAtan2F(sp4C, sp48)), 5,
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, RAD_TO_BINANG(Math_FAtan2F(sp4C, sp48)), 5,
|
||||
this->unk_1EC * this->unk_1E8, 0);
|
||||
|
||||
if (fabsf(sp4C) <= 15.0f && fabsf(sp48) <= 15.0f) {
|
||||
|
@ -1404,7 +1404,7 @@ void BossDodongo_DeathCutscene(BossDodongo* this, GlobalContext* globalCtx) {
|
|||
tempSin = cornerPos->x - this->actor.world.pos.x;
|
||||
tempCos = cornerPos->z - this->actor.world.pos.z;
|
||||
Math_SmoothStepToF(&this->unk_1E8, 1500.0f, 1.0f, this->unk_1EC * 100.0f, 0.0f);
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, RADF_TO_BINANG(Math_FAtan2F(tempSin, tempCos)), 5,
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, RAD_TO_BINANG(Math_FAtan2F(tempSin, tempCos)), 5,
|
||||
(this->unk_1EC * this->unk_1E8), 0);
|
||||
|
||||
if ((fabsf(tempSin) <= 15.0f) && (fabsf(tempCos) <= 15.0f)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue