1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-07 06:40:15 +00:00

Consistent naming for Math_ functions (#542)

* Darkmeiro decompilation

Bg_Gnd_Darkmeiro decompiled, matched, and documented.

* give this a shot

* fix conflict

* one more try

* could be useful

* whoops

* ZAP2 stuff

* ZAP why

* ZAP again

* maths

* Factoriali -> Factorial

* soon, soon

* renames

* rand

* docs

* merged

* formatting

* little more cleanup

* asm crept back in

* changes to MathF

* smooth criminal

* functions.h
This commit is contained in:
petrie911 2020-12-26 04:44:53 -06:00 committed by GitHub
parent 81c269b417
commit 8fa6cb6ff9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1329 changed files with 8413 additions and 8374 deletions

View file

@ -165,7 +165,7 @@ void EnKz_UpdateEyes(EnKz* this) {
if (DECR(this->blinkTimer) == 0) {
this->eyeIdx += 1;
if (this->eyeIdx >= 3) {
this->blinkTimer = Math_Rand_S16Offset(30, 30);
this->blinkTimer = Rand_S16Offset(30, 30);
this->eyeIdx = 0;
}
}
@ -268,7 +268,7 @@ s32 EnKz_FollowPath(EnKz* this, GlobalContext* globalCtx) {
pathDiffX = pointPos->x - this->actor.posRot.pos.x;
pathDiffZ = pointPos->z - this->actor.posRot.pos.z;
Math_SmoothScaleMaxMinS(&this->actor.posRot.rot.y, (Math_atan2f(pathDiffX, pathDiffZ) * 10430.3779296875f), 0xA,
Math_SmoothStepToS(&this->actor.posRot.rot.y, (Math_FAtan2F(pathDiffX, pathDiffZ) * 10430.3779296875f), 0xA,
0x3E8, 1);
if ((SQ(pathDiffX) + SQ(pathDiffZ)) < 10.0f) {
@ -457,8 +457,8 @@ s32 EnKz_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
EnKz* this = THIS;
if (limbIndex == 8 || limbIndex == 9 || limbIndex == 10) {
rot->y += Math_Sins(this->unk_2A6[limbIndex]) * 200.0f;
rot->z += Math_Coss(this->unk_2BE[limbIndex]) * 200.0f;
rot->y += Math_SinS(this->unk_2A6[limbIndex]) * 200.0f;
rot->z += Math_CosS(this->unk_2BE[limbIndex]) * 200.0f;
}
if (limbIndex) {}
return 0;