1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-07 14:50: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

@ -125,7 +125,7 @@ void EnNb_UpdatePath(EnNb* this, GlobalContext* globalCtx) {
this->finalPos.y = pointPos[1].y;
this->finalPos.z = pointPos[1].z;
this->pathYaw =
(Math_atan2f(this->finalPos.x - this->initialPos.x, this->finalPos.z - this->initialPos.z) * 10430.378f);
(Math_FAtan2F(this->finalPos.x - this->initialPos.x, this->finalPos.z - this->initialPos.z) * 10430.378f);
// "En_Nb_Get_path_info Rail Data Get! = %d!!!!!!!!!!!!!!"
osSyncPrintf("En_Nb_Get_path_info レールデータをゲットだぜ = %d!!!!!!!!!!!!!!\n", path);
} else {
@ -177,11 +177,11 @@ void func_80AB10C4(EnNb* this) {
Vec3s* tempPtr2;
tempPtr = &this->unk_300.unk_08;
Math_SmoothScaleMaxMinS(&tempPtr->x, 0, 20, 6200, 100);
Math_SmoothScaleMaxMinS(&tempPtr->y, 0, 20, 6200, 100);
Math_SmoothStepToS(&tempPtr->x, 0, 20, 6200, 100);
Math_SmoothStepToS(&tempPtr->y, 0, 20, 6200, 100);
tempPtr2 = &this->unk_300.unk_0E;
Math_SmoothScaleMaxMinS(&tempPtr2->x, 0, 20, 6200, 100);
Math_SmoothScaleMaxMinS(&tempPtr2->y, 0, 20, 6200, 100);
Math_SmoothStepToS(&tempPtr2->x, 0, 20, 6200, 100);
Math_SmoothStepToS(&tempPtr2->y, 0, 20, 6200, 100);
}
void EnNb_UpdateEyes(EnNb* this) {
@ -190,7 +190,7 @@ void EnNb_UpdateEyes(EnNb* this) {
s16* eyeIdx = &this->eyeIdx;
if (DECR(*blinkTimer) == 0) {
*blinkTimer = Math_Rand_S16Offset(60, 60);
*blinkTimer = Rand_S16Offset(60, 60);
}
*eyeIdx = *blinkTimer;
@ -1164,12 +1164,12 @@ void func_80AB36DC(EnNb* this, GlobalContext* globalCtx) {
if ((((u16)((u16)(kREG(17) + 25) - 4))) > moveTime) {
s16 invScale = 4 - moveTime;
if (invScale > 0) {
Math_SmoothScaleMaxMinS(&this->actor.shape.rot.y, this->pathYaw, invScale, 6200, 100);
Math_SmoothStepToS(&this->actor.shape.rot.y, this->pathYaw, invScale, 6200, 100);
}
} else {
s16 invScale = (u16)(kREG(17) + 25) - moveTime;
if (invScale > 0) {
Math_SmoothScaleMaxMinS(&this->actor.shape.rot.y, this->actor.initPosRot.rot.y, invScale, 6200, 100);
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.initPosRot.rot.y, invScale, 6200, 100);
}
}
}