mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-13 11:24:40 +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
|
@ -1014,14 +1014,14 @@ void func_8008F87C(GlobalContext* globalCtx, Player* this, SkelAnime* skelAnime,
|
|||
|
||||
sp50 = Math_FAtan2F(sp58, sp60);
|
||||
|
||||
temp1 = RADF_TO_BINANG(M_PI - (Math_FAtan2F(sp5C, sp58) + ((M_PI / 2) - sp50)));
|
||||
temp1 = RAD_TO_BINANG(M_PI - (Math_FAtan2F(sp5C, sp58) + ((M_PI / 2) - sp50)));
|
||||
temp1 = temp1 - skelAnime->jointTable[shinLimbIndex].z;
|
||||
|
||||
if ((s16)(ABS(skelAnime->jointTable[shinLimbIndex].x) + ABS(skelAnime->jointTable[shinLimbIndex].y)) < 0) {
|
||||
temp1 += 0x8000;
|
||||
}
|
||||
|
||||
temp2 = RADF_TO_BINANG(sp50 - sp54);
|
||||
temp2 = RAD_TO_BINANG(sp50 - sp54);
|
||||
rot->z -= temp2;
|
||||
|
||||
skelAnime->jointTable[thighLimbIndex].z = skelAnime->jointTable[thighLimbIndex].z - temp2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue