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
|
@ -226,8 +226,8 @@ void func_80A01FE0(EnElf* this, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
this->unk_2A8 = 1;
|
||||
this->unk_2AC = 0x80;
|
||||
this->unk_2B8 = Math_Rand_ZeroFloat(1.0f) + 0.5f;
|
||||
this->unk_2B0 = Math_Rand_CenteredFloat(32767.0f);
|
||||
this->unk_2B8 = Rand_ZeroFloat(1.0f) + 0.5f;
|
||||
this->unk_2B0 = Rand_CenteredFloat(32767.0f);
|
||||
this->func_2C8 = func_80A0214C;
|
||||
}
|
||||
}
|
||||
|
@ -241,8 +241,8 @@ void func_80A020A4(EnElf* this, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
this->unk_2A8 = 1;
|
||||
this->unk_2AC = 0x80;
|
||||
this->unk_2B8 = Math_Rand_ZeroFloat(1.0f) + 0.5f;
|
||||
this->unk_2B0 = Math_Rand_CenteredFloat(32767.0f);
|
||||
this->unk_2B8 = Rand_ZeroFloat(1.0f) + 0.5f;
|
||||
this->unk_2B0 = Rand_CenteredFloat(32767.0f);
|
||||
this->func_2C8 = func_80A0214C;
|
||||
}
|
||||
}
|
||||
|
@ -256,13 +256,13 @@ void func_80A0214C(EnElf* this, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
xzDistFromLink = this->actor.xzDistFromLink;
|
||||
if (xzDistFromLink < 50.0f) {
|
||||
if (Math_Rand_ZeroOne() < 0.2f) {
|
||||
if (Rand_ZeroOne() < 0.2f) {
|
||||
this->unk_2A8 = 2;
|
||||
this->unk_2AC = 0x400;
|
||||
this->unk_2B8 = 2.0f;
|
||||
this->func_2C8 = func_80A020A4;
|
||||
this->actor.speedXZ = 1.5f;
|
||||
this->unk_2C0 = (s16)Math_Rand_ZeroFloat(8.0f) + 4;
|
||||
this->unk_2C0 = (s16)Rand_ZeroFloat(8.0f) + 4;
|
||||
} else {
|
||||
this->unk_2C0 = 10;
|
||||
}
|
||||
|
@ -273,23 +273,23 @@ void func_80A0214C(EnElf* this, GlobalContext* globalCtx) {
|
|||
|
||||
xzDistFromLink = ((xzDistFromLink - 50.0f) * 0.95f) + 0.05f;
|
||||
|
||||
if (Math_Rand_ZeroOne() < xzDistFromLink) {
|
||||
if (Rand_ZeroOne() < xzDistFromLink) {
|
||||
this->unk_2A8 = 3;
|
||||
this->unk_2AC = 0x200;
|
||||
this->unk_2B8 = (xzDistFromLink * 2.0f) + 1.0f;
|
||||
this->func_2C8 = func_80A01FE0;
|
||||
this->unk_2C0 = (s16)Math_Rand_ZeroFloat(16.0f) + 0x10;
|
||||
this->unk_2C0 = (s16)Rand_ZeroFloat(16.0f) + 0x10;
|
||||
} else {
|
||||
this->unk_2C0 = 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Math_Rand_ZeroOne() < 0.1f) {
|
||||
if (Rand_ZeroOne() < 0.1f) {
|
||||
this->unk_2A8 = 1;
|
||||
this->unk_2AC = 0x80;
|
||||
this->unk_2B8 = Math_Rand_ZeroFloat(0.5f) + 0.5f;
|
||||
this->unk_2B0 = Math_Rand_CenteredFloat(32767.0f);
|
||||
this->unk_2B8 = Rand_ZeroFloat(0.5f) + 0.5f;
|
||||
this->unk_2B0 = Rand_CenteredFloat(32767.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -307,9 +307,9 @@ void func_80A0232C(EnElf* this, GlobalContext* globalCtx) {
|
|||
f32 EnElf_GetColorValue(s32 colorFlag) {
|
||||
switch (colorFlag) {
|
||||
case 1:
|
||||
return Math_Rand_ZeroFloat(55.0f) + 200.0f;
|
||||
return Rand_ZeroFloat(55.0f) + 200.0f;
|
||||
case 2:
|
||||
return Math_Rand_ZeroFloat(255.0f);
|
||||
return Rand_ZeroFloat(255.0f);
|
||||
default:
|
||||
return 0.0f;
|
||||
}
|
||||
|
@ -383,18 +383,18 @@ void EnElf_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
case FAIRY_HEAL:
|
||||
colorConfig = -1;
|
||||
EnElf_SetupAction(this, func_80A0329C);
|
||||
this->unk_2B4 = Math_Rand_ZeroFloat(10.0f) + 10.0f;
|
||||
this->unk_2B4 = Rand_ZeroFloat(10.0f) + 10.0f;
|
||||
this->unk_2AA = 0;
|
||||
this->unk_2AE = (s16)(Math_Rand_ZeroFloat(1048.0f)) + 0x200;
|
||||
this->unk_2AE = (s16)(Rand_ZeroFloat(1048.0f)) + 0x200;
|
||||
this->unk_28C = thisx->posRot.pos;
|
||||
this->unk_2BC = Math_Rand_CenteredFloat(32767.0f);
|
||||
this->unk_2BC = Rand_CenteredFloat(32767.0f);
|
||||
this->func_2C8 = func_80A0214C;
|
||||
func_80A0232C(this, globalCtx);
|
||||
this->unk_2C0 = 0;
|
||||
this->disappearTimer = 240;
|
||||
break;
|
||||
case FAIRY_KOKIRI:
|
||||
colorConfig = Math_Rand_ZeroFloat(11.99f) + 1.0f;
|
||||
colorConfig = Rand_ZeroFloat(11.99f) + 1.0f;
|
||||
EnElf_SetupAction(this, func_80A0353C);
|
||||
func_80A01C38(this, 0);
|
||||
break;
|
||||
|
@ -444,9 +444,9 @@ void EnElf_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A02A20(EnElf* this, GlobalContext* globalCtx) {
|
||||
this->unk_28C.x = Math_Sins(this->unk_2AC) * this->unk_2B8;
|
||||
this->unk_28C.y = Math_Sins(this->unk_2AA) * this->unk_2B4;
|
||||
this->unk_28C.z = Math_Coss(this->unk_2AC) * this->unk_2B8;
|
||||
this->unk_28C.x = Math_SinS(this->unk_2AC) * this->unk_2B8;
|
||||
this->unk_28C.y = Math_SinS(this->unk_2AA) * this->unk_2B4;
|
||||
this->unk_28C.z = Math_CosS(this->unk_2AC) * this->unk_2B8;
|
||||
this->unk_2AC += this->unk_2B0;
|
||||
this->unk_2AA += this->unk_2AE;
|
||||
}
|
||||
|
@ -454,11 +454,11 @@ void func_80A02A20(EnElf* this, GlobalContext* globalCtx) {
|
|||
void func_80A02AA4(EnElf* this, GlobalContext* globalCtx) {
|
||||
f32 xzScale;
|
||||
|
||||
xzScale = (Math_Coss(this->unk_2AA) * this->unk_2B4) + this->unk_2B8;
|
||||
xzScale = (Math_CosS(this->unk_2AA) * this->unk_2B4) + this->unk_2B8;
|
||||
|
||||
this->unk_28C.x = Math_Sins(this->unk_2AC) * xzScale;
|
||||
this->unk_28C.x = Math_SinS(this->unk_2AC) * xzScale;
|
||||
this->unk_28C.y = 0.0f;
|
||||
this->unk_28C.z = Math_Coss(this->unk_2AC) * xzScale;
|
||||
this->unk_28C.z = Math_CosS(this->unk_2AC) * xzScale;
|
||||
|
||||
this->unk_2AC += this->unk_2B0;
|
||||
this->unk_2AA += this->unk_2AE;
|
||||
|
@ -468,10 +468,10 @@ void func_80A02B38(EnElf* this, GlobalContext* globalCtx) {
|
|||
Player* player = PLAYER;
|
||||
|
||||
this->unk_2AA = (this->unk_2AC * 2) & 0xFFFF;
|
||||
this->unk_28C.x = Math_Sins(this->unk_2AC) * this->unk_2B8;
|
||||
this->unk_28C.y = Math_Sins(this->unk_2AA) * this->unk_2B4;
|
||||
this->unk_28C.z = -Math_Sins(player->actor.shape.rot.y) * this->unk_28C.x;
|
||||
this->unk_28C.x = Math_Coss(player->actor.shape.rot.y) * this->unk_28C.x;
|
||||
this->unk_28C.x = Math_SinS(this->unk_2AC) * this->unk_2B8;
|
||||
this->unk_28C.y = Math_SinS(this->unk_2AA) * this->unk_2B4;
|
||||
this->unk_28C.z = -Math_SinS(player->actor.shape.rot.y) * this->unk_28C.x;
|
||||
this->unk_28C.x = Math_CosS(player->actor.shape.rot.y) * this->unk_28C.x;
|
||||
this->unk_2AC += this->unk_2B0;
|
||||
}
|
||||
|
||||
|
@ -483,7 +483,7 @@ void func_80A02BD8(EnElf* this, Vec3f* targetPos, f32 arg2) {
|
|||
yVelDirection = (yVelTarget >= 0.0f) ? 1.0f : -1.0f;
|
||||
yVelTarget = fabsf(yVelTarget);
|
||||
yVelTarget = CLAMP(yVelTarget, 0.0f, 20.0f) * yVelDirection;
|
||||
Math_ApproxF(&this->actor.velocity.y, yVelTarget, 32.0f);
|
||||
Math_StepToF(&this->actor.velocity.y, yVelTarget, 32.0f);
|
||||
}
|
||||
|
||||
void func_80A02C98(EnElf* this, Vec3f* targetPos, f32 arg2) {
|
||||
|
@ -505,8 +505,8 @@ void func_80A02C98(EnElf* this, Vec3f* targetPos, f32 arg2) {
|
|||
zVelTarget = CLAMP(zVelTarget, 0.0f, 20.0f) * zVelDirection;
|
||||
|
||||
func_80A02BD8(this, targetPos, arg2);
|
||||
Math_ApproxF(&this->actor.velocity.x, xVelTarget, 1.5f);
|
||||
Math_ApproxF(&this->actor.velocity.z, zVelTarget, 1.5f);
|
||||
Math_StepToF(&this->actor.velocity.x, xVelTarget, 1.5f);
|
||||
Math_StepToF(&this->actor.velocity.z, zVelTarget, 1.5f);
|
||||
func_8002D7EC(&this->actor);
|
||||
}
|
||||
|
||||
|
@ -531,12 +531,12 @@ void func_80A02F2C(EnElf* this, Vec3f* targetPos) {
|
|||
f32 yVelTarget;
|
||||
f32 yVelDirection;
|
||||
|
||||
yVelTarget = (((Math_Sins(this->unk_2AA) * this->unk_2B4) + targetPos->y) - this->actor.posRot.pos.y) * 0.2f;
|
||||
yVelTarget = (((Math_SinS(this->unk_2AA) * this->unk_2B4) + targetPos->y) - this->actor.posRot.pos.y) * 0.2f;
|
||||
yVelDirection = (yVelTarget >= 0.0f) ? 1.0f : -1.0f;
|
||||
this->unk_2AA += this->unk_2AE;
|
||||
yVelTarget = fabsf(yVelTarget);
|
||||
yVelTarget = CLAMP(yVelTarget, 0.0f, 20.0f) * yVelDirection;
|
||||
Math_ApproxF(&this->actor.velocity.y, yVelTarget, 1.5f);
|
||||
Math_StepToF(&this->actor.velocity.y, yVelTarget, 1.5f);
|
||||
}
|
||||
|
||||
void func_80A03018(EnElf* this, GlobalContext* globalCtx) {
|
||||
|
@ -545,21 +545,21 @@ void func_80A03018(EnElf* this, GlobalContext* globalCtx) {
|
|||
s16 targetYaw;
|
||||
Vec3f* unk_28C = &this->unk_28C;
|
||||
|
||||
Math_SmoothScaleMaxMinF(&this->actor.speedXZ, this->unk_2B8, 0.2f, 0.5f, 0.01f);
|
||||
Math_SmoothStepToF(&this->actor.speedXZ, this->unk_2B8, 0.2f, 0.5f, 0.01f);
|
||||
|
||||
switch (this->unk_2A8) {
|
||||
case 0:
|
||||
targetYaw = atan2s(-(this->actor.posRot.pos.z - unk_28C->z), -(this->actor.posRot.pos.x - unk_28C->x));
|
||||
targetYaw = Math_Atan2S(-(this->actor.posRot.pos.z - unk_28C->z), -(this->actor.posRot.pos.x - unk_28C->x));
|
||||
break;
|
||||
|
||||
case 3:
|
||||
targetYaw = atan2s(-(this->actor.posRot.pos.z - player->actor.posRot.pos.z),
|
||||
-(this->actor.posRot.pos.x - player->actor.posRot.pos.x));
|
||||
targetYaw = Math_Atan2S(-(this->actor.posRot.pos.z - player->actor.posRot.pos.z),
|
||||
-(this->actor.posRot.pos.x - player->actor.posRot.pos.x));
|
||||
break;
|
||||
|
||||
case 2:
|
||||
targetYaw = atan2s(this->actor.posRot.pos.z - player->actor.posRot.pos.z,
|
||||
this->actor.posRot.pos.x - player->actor.posRot.pos.x);
|
||||
targetYaw = Math_Atan2S(this->actor.posRot.pos.z - player->actor.posRot.pos.z,
|
||||
this->actor.posRot.pos.x - player->actor.posRot.pos.x);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -567,7 +567,7 @@ void func_80A03018(EnElf* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
}
|
||||
|
||||
Math_SmoothScaleMaxMinS(&this->unk_2BC, targetYaw, 10, this->unk_2AC, 0x20);
|
||||
Math_SmoothStepToS(&this->unk_2BC, targetYaw, 10, this->unk_2AC, 0x20);
|
||||
this->actor.posRot.rot.y = this->unk_2BC;
|
||||
Actor_MoveForward(&this->actor);
|
||||
}
|
||||
|
@ -595,8 +595,8 @@ void func_80A03148(EnElf* this, Vec3f* arg1, f32 arg2, f32 arg3, f32 arg4) {
|
|||
zVelTarget *= xzVelocity;
|
||||
}
|
||||
|
||||
Math_ApproxF(&this->actor.velocity.x, xVelTarget, 5.0f);
|
||||
Math_ApproxF(&this->actor.velocity.z, zVelTarget, 5.0f);
|
||||
Math_StepToF(&this->actor.velocity.x, xVelTarget, 5.0f);
|
||||
Math_StepToF(&this->actor.velocity.z, zVelTarget, 5.0f);
|
||||
func_8002D7EC(&this->actor);
|
||||
}
|
||||
|
||||
|
@ -608,9 +608,9 @@ void func_80A0329C(EnElf* this, GlobalContext* globalCtx) {
|
|||
|
||||
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||
|
||||
if (Math_Rand_ZeroOne() < 0.05f) {
|
||||
this->unk_2B4 = Math_Rand_ZeroFloat(10.0f) + 10.0f;
|
||||
this->unk_2AE = (s16)(Math_Rand_ZeroFloat(1024.0f)) + 0x200;
|
||||
if (Rand_ZeroOne() < 0.05f) {
|
||||
this->unk_2B4 = Rand_ZeroFloat(10.0f) + 10.0f;
|
||||
this->unk_2AE = (s16)(Rand_ZeroFloat(1024.0f)) + 0x200;
|
||||
}
|
||||
|
||||
func_80A0232C(this, globalCtx);
|
||||
|
@ -684,7 +684,7 @@ void func_80A0353C(EnElf* this, GlobalContext* globalCtx) {
|
|||
Actor_Kill(&this->actor);
|
||||
}
|
||||
|
||||
this->unk_2BC = atan2s(this->actor.velocity.z, this->actor.velocity.x);
|
||||
this->unk_2BC = Math_Atan2S(this->actor.velocity.z, this->actor.velocity.x);
|
||||
}
|
||||
|
||||
void func_80A03604(EnElf* this, GlobalContext* globalCtx) {
|
||||
|
@ -694,9 +694,9 @@ void func_80A03610(EnElf* this, GlobalContext* globalCtx) {
|
|||
Player* player = PLAYER;
|
||||
|
||||
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||
Math_SmoothScaleMaxMinF(&this->unk_2B8, 30.0f, 0.1f, 4.0f, 1.0f);
|
||||
Math_SmoothStepToF(&this->unk_2B8, 30.0f, 0.1f, 4.0f, 1.0f);
|
||||
|
||||
this->unk_28C.x = Math_Coss(this->unk_2AC) * this->unk_2B8;
|
||||
this->unk_28C.x = Math_CosS(this->unk_2AC) * this->unk_2B8;
|
||||
this->unk_28C.y = this->unk_28C.y + this->unk_2B4;
|
||||
|
||||
switch (this->unk_2AA) {
|
||||
|
@ -713,7 +713,7 @@ void func_80A03610(EnElf* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
this->unk_28C.z = Math_Sins(this->unk_2AC) * -this->unk_2B8;
|
||||
this->unk_28C.z = Math_SinS(this->unk_2AC) * -this->unk_2B8;
|
||||
this->unk_2AC += this->unk_2B0;
|
||||
func_80A02C98(this, &player->actor.posRot.pos, 0.2f);
|
||||
|
||||
|
@ -728,7 +728,7 @@ void func_80A03610(EnElf* this, GlobalContext* globalCtx) {
|
|||
return;
|
||||
}
|
||||
|
||||
this->unk_2BC = atan2s(this->actor.velocity.z, this->actor.velocity.x);
|
||||
this->unk_2BC = Math_Atan2S(this->actor.velocity.z, this->actor.velocity.x);
|
||||
EnElf_SpawnSparkles(this, globalCtx, 32);
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_FIATY_HEAL - SFX_FLAG);
|
||||
}
|
||||
|
@ -759,11 +759,11 @@ void func_80A03814(EnElf* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
this->unk_28C.x = Math_Coss(this->unk_2AC) * this->unk_2B8;
|
||||
this->unk_28C.z = Math_Sins(this->unk_2AC) * -this->unk_2B8;
|
||||
this->unk_28C.x = Math_CosS(this->unk_2AC) * this->unk_2B8;
|
||||
this->unk_28C.z = Math_SinS(this->unk_2AC) * -this->unk_2B8;
|
||||
this->unk_2AC += this->unk_2B0;
|
||||
func_80A02E30(this, &player->bodyPartsPos[0]);
|
||||
this->unk_2BC = atan2s(this->actor.velocity.z, this->actor.velocity.x);
|
||||
this->unk_2BC = Math_Atan2S(this->actor.velocity.z, this->actor.velocity.x);
|
||||
EnElf_SpawnSparkles(this, globalCtx, 32);
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_FIATY_HEAL - SFX_FLAG);
|
||||
}
|
||||
|
@ -788,7 +788,7 @@ void func_80A03990(EnElf* this, GlobalContext* globalCtx) {
|
|||
|
||||
func_80A02E30(this, &player->bodyPartsPos[0]);
|
||||
Actor_SetScale(&this->actor, (1.0f - (SQ(this->unk_2B4) * 0.012345679f)) * 0.008f);
|
||||
this->unk_2BC = atan2s(this->actor.velocity.z, this->actor.velocity.x);
|
||||
this->unk_2BC = Math_Atan2S(this->actor.velocity.z, this->actor.velocity.x);
|
||||
EnElf_SpawnSparkles(this, globalCtx, 32);
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_FIATY_HEAL - SFX_FLAG);
|
||||
}
|
||||
|
@ -830,7 +830,7 @@ void EnElf_UpdateLights(EnElf* this, GlobalContext* globalCtx) {
|
|||
Lights_PointGlowSetInfo(&this->lightInfoGlow, this->actor.posRot.pos.x, this->actor.posRot.pos.y,
|
||||
this->actor.posRot.pos.z, 255, 255, 255, glowLightRadius);
|
||||
|
||||
this->unk_2BC = atan2s(this->actor.velocity.z, this->actor.velocity.x);
|
||||
this->unk_2BC = Math_Atan2S(this->actor.velocity.z, this->actor.velocity.x);
|
||||
|
||||
Actor_SetScale(&this->actor, this->actor.scale.x);
|
||||
}
|
||||
|
@ -948,7 +948,7 @@ void func_80A03CF8(EnElf* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
} else {
|
||||
if ((this->timer % 32) == 0) {
|
||||
this->unk_2A0 = Math_Rand_ZeroFloat(7.0f) + 3.0f;
|
||||
this->unk_2A0 = Rand_ZeroFloat(7.0f) + 3.0f;
|
||||
}
|
||||
|
||||
if (this->fairyFlags & 2) {
|
||||
|
@ -980,7 +980,7 @@ void func_80A03CF8(EnElf* this, GlobalContext* globalCtx) {
|
|||
} else if (this->unk_2A8 == 8) {
|
||||
this->actor.scale.x = 0.0f;
|
||||
} else {
|
||||
Math_SmoothScaleMaxMinF(&this->actor.scale.x, 0.008f, 0.3f, 0.00080000004f, 0.000080000005f);
|
||||
Math_SmoothStepToF(&this->actor.scale.x, 0.008f, 0.3f, 0.00080000004f, 0.000080000005f);
|
||||
}
|
||||
|
||||
EnElf_UpdateLights(this, globalCtx);
|
||||
|
@ -1021,7 +1021,7 @@ void func_80A04414(EnElf* this, GlobalContext* globalCtx) {
|
|||
this->unk_2C6 = 1;
|
||||
}
|
||||
} else if (this->unk_29C != 0.0f) {
|
||||
if (Math_ApproxF(&this->unk_29C, 0.0f, 0.25f) != 0) {
|
||||
if (Math_StepToF(&this->unk_29C, 0.0f, 0.25f) != 0) {
|
||||
this->innerColor = globalCtx->actorCtx.targetCtx.naviInner;
|
||||
this->outerColor = globalCtx->actorCtx.targetCtx.naviOuter;
|
||||
} else {
|
||||
|
@ -1188,9 +1188,9 @@ void EnElf_SpawnSparkles(EnElf* this, GlobalContext* globalCtx, s32 sparkleLife)
|
|||
Color_RGBA8 primColor;
|
||||
Color_RGBA8 envColor;
|
||||
|
||||
sparklePos.x = Math_Rand_CenteredFloat(6.0f) + this->actor.posRot.pos.x;
|
||||
sparklePos.y = (Math_Rand_ZeroOne() * 6.0f) + this->actor.posRot.pos.y;
|
||||
sparklePos.z = Math_Rand_CenteredFloat(6.0f) + this->actor.posRot.pos.z;
|
||||
sparklePos.x = Rand_CenteredFloat(6.0f) + this->actor.posRot.pos.x;
|
||||
sparklePos.y = (Rand_ZeroOne() * 6.0f) + this->actor.posRot.pos.y;
|
||||
sparklePos.z = Rand_CenteredFloat(6.0f) + this->actor.posRot.pos.z;
|
||||
|
||||
primColor.r = this->innerColor.r;
|
||||
primColor.g = this->innerColor.g;
|
||||
|
@ -1223,9 +1223,9 @@ void func_80A04DE4(EnElf* this, GlobalContext* globalCtx) {
|
|||
naviRefPos = globalCtx->actorCtx.targetCtx.naviRefPos;
|
||||
|
||||
if ((player->unk_664 == NULL) || (&player->actor == player->unk_664) || (&this->actor == player->unk_664)) {
|
||||
naviRefPos.x = player->bodyPartsPos[7].x + (Math_Sins(player->actor.shape.rot.y) * 20.0f);
|
||||
naviRefPos.x = player->bodyPartsPos[7].x + (Math_SinS(player->actor.shape.rot.y) * 20.0f);
|
||||
naviRefPos.y = player->bodyPartsPos[7].y + 5.0f;
|
||||
naviRefPos.z = player->bodyPartsPos[7].z + (Math_Coss(player->actor.shape.rot.y) * 20.0f);
|
||||
naviRefPos.z = player->bodyPartsPos[7].z + (Math_CosS(player->actor.shape.rot.y) * 20.0f);
|
||||
}
|
||||
|
||||
this->actor.posRot2.pos = naviRefPos;
|
||||
|
@ -1241,7 +1241,7 @@ void func_80A04DE4(EnElf* this, GlobalContext* globalCtx) {
|
|||
EnElf_SpawnSparkles(this, globalCtx, 16);
|
||||
}
|
||||
|
||||
Math_SmoothScaleMaxMinF(&this->actor.scale.x, 0.008f, 0.3f, 0.00080000004f, 0.000080000005f);
|
||||
Math_SmoothStepToF(&this->actor.scale.x, 0.008f, 0.3f, 0.00080000004f, 0.000080000005f);
|
||||
EnElf_UpdateLights(this, globalCtx);
|
||||
}
|
||||
|
||||
|
@ -1249,9 +1249,9 @@ void func_80A04DE4(EnElf* this, GlobalContext* globalCtx) {
|
|||
void func_80A04F94(EnElf* this, GlobalContext* globalCtx) {
|
||||
Player* player = PLAYER;
|
||||
|
||||
Math_SmoothScaleMaxMinS(&this->actor.shape.rot.y, this->unk_2BC, 5, 0x1000, 0x400);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->unk_2BC, 5, 0x1000, 0x400);
|
||||
this->timer++;
|
||||
Math_ApproxF(&this->unk_2A4, 1.0f, 0.05f);
|
||||
Math_StepToF(&this->unk_2A4, 1.0f, 0.05f);
|
||||
func_800773A8(globalCtx, SQ(this->unk_2A4), player->actor.projectedPos.z + 780.0f, 0.2f, 0.5f);
|
||||
}
|
||||
|
||||
|
@ -1432,7 +1432,7 @@ void func_80A053F0(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->timer++;
|
||||
|
||||
if (this->unk_2A4 > 0.0f) {
|
||||
Math_ApproxF(&this->unk_2A4, 0.0f, 0.05f);
|
||||
Math_StepToF(&this->unk_2A4, 0.0f, 0.05f);
|
||||
func_800773A8(globalCtx, SQ(this->unk_2A4) * this->unk_2A4, player->actor.projectedPos.z + 780.0f, 0.2f, 0.5f);
|
||||
}
|
||||
|
||||
|
@ -1471,7 +1471,7 @@ s32 EnElf_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
|||
EnElf* this = THIS;
|
||||
|
||||
if (limbIndex == 8) {
|
||||
scale = ((Math_Sins(this->timer * 4096) * 0.1f) + 1.0f) * 0.012f;
|
||||
scale = ((Math_SinS(this->timer * 4096) * 0.1f) + 1.0f) * 0.012f;
|
||||
|
||||
if (this->fairyFlags & FAIRY_FLAG_BIG) {
|
||||
scale *= 2.0f;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue