mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-08 15:30:14 +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:
parent
81c269b417
commit
8fa6cb6ff9
1329 changed files with 8413 additions and 8374 deletions
|
@ -58,7 +58,7 @@ void EnHata_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->invScale = 6;
|
||||
this->maxStep = 1000;
|
||||
this->minStep = 1;
|
||||
this->unk_278 = Math_Rand_ZeroOne() * 65535.0f;
|
||||
this->unk_278 = Rand_ZeroOne() * 65535.0f;
|
||||
}
|
||||
|
||||
void EnHata_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
@ -86,19 +86,19 @@ void EnHata_Update(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
if (globalCtx->envCtx.unk_B0 < 0.0f) {
|
||||
globalCtx->envCtx.unk_B0 = 0.0f;
|
||||
}
|
||||
if (Math_Rand_ZeroOne() > 0.5f) {
|
||||
if (Rand_ZeroOne() > 0.5f) {
|
||||
this->unk_278 += 6000;
|
||||
} else {
|
||||
this->unk_278 += 3000;
|
||||
}
|
||||
sin = Math_Sins(this->unk_278) * 80.0f;
|
||||
sin = Math_SinS(this->unk_278) * 80.0f;
|
||||
pitch = -Math_Vec3f_Pitch(&sp48, &sp3C);
|
||||
pitch = ((s32)((0x3A98 - pitch) * (1.0f - (globalCtx->envCtx.unk_B0 / (255.0f - sin))))) + pitch;
|
||||
Math_SmoothScaleMaxMinS(&this->limbs[4].y, pitch, this->invScale, this->maxStep, this->minStep);
|
||||
Math_SmoothStepToS(&this->limbs[4].y, pitch, this->invScale, this->maxStep, this->minStep);
|
||||
this->limbs[13].y = this->limbs[4].y;
|
||||
this->limbs[4].z = -Math_Vec3f_Yaw(&sp48, &sp3C);
|
||||
this->limbs[13].z = this->limbs[4].z;
|
||||
this->skelAnime.animPlaybackSpeed = (Math_Rand_ZeroFloat(1.25f) + 2.75f) * (globalCtx->envCtx.unk_B0 / 255.0f);
|
||||
this->skelAnime.animPlaybackSpeed = (Rand_ZeroFloat(1.25f) + 2.75f) * (globalCtx->envCtx.unk_B0 / 255.0f);
|
||||
}
|
||||
|
||||
s32 EnHata_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue