mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-22 06:52:03 +00:00
matched Math3D_CylVsLineSeg and fixed a Math_ error (#564)
* matched cylvsline * slight name adjustment * format * and asm * comment cleanup * fixed misspelling and added mathfixer tool * formatting Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
This commit is contained in:
parent
b95643b397
commit
3727cc38b8
36 changed files with 382 additions and 1048 deletions
|
@ -268,10 +268,9 @@ s32 EnFirefly_ReturnToPerch(EnFirefly* this, GlobalContext* globalCtx) {
|
|||
this->actor.speedXZ *= distFromHome;
|
||||
}
|
||||
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.y, func_8002DAC0(&this->actor, &this->actor.initPosRot.pos),
|
||||
0x300);
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.x,
|
||||
func_8002DB28(&this->actor, &this->actor.initPosRot.pos) + 0x1554, 0x100);
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.y, func_8002DAC0(&this->actor, &this->actor.initPosRot.pos), 0x300);
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.x, func_8002DB28(&this->actor, &this->actor.initPosRot.pos) + 0x1554,
|
||||
0x100);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -308,8 +307,7 @@ s32 EnFirefly_SeekTorch(EnFirefly* this, GlobalContext* globalCtx) {
|
|||
EnFirefly_Ignite(this);
|
||||
return 1;
|
||||
} else {
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.y, func_8002DA78(&this->actor, &closestTorch->actor),
|
||||
0x300);
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.y, func_8002DA78(&this->actor, &closestTorch->actor), 0x300);
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.x, func_8002DB28(&this->actor, &flamePos) + 0x1554, 0x100);
|
||||
return 1;
|
||||
}
|
||||
|
@ -332,8 +330,8 @@ void EnFirefly_FlyIdle(EnFirefly* this, GlobalContext* globalCtx) {
|
|||
if (skelanimeUpdated) {
|
||||
rand = Rand_ZeroOne();
|
||||
if (rand < 0.5f) {
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.y,
|
||||
func_8002DAC0(&this->actor, &this->actor.initPosRot.pos), 0x300);
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.y, func_8002DAC0(&this->actor, &this->actor.initPosRot.pos),
|
||||
0x300);
|
||||
} else if (rand < 0.8f) {
|
||||
this->actor.shape.rot.y += Rand_CenteredFloat(1536.0f);
|
||||
}
|
||||
|
@ -424,8 +422,7 @@ void EnFirefly_DiveAttack(EnFirefly* this, GlobalContext* globalCtx) {
|
|||
preyPos.x = player->actor.posRot.pos.x;
|
||||
preyPos.y = player->actor.posRot.pos.y + 20.0f;
|
||||
preyPos.z = player->actor.posRot.pos.z;
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.x, func_8002DB28(&this->actor, &preyPos) + 0x1554, 2, 0x400,
|
||||
0x100);
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.x, func_8002DB28(&this->actor, &preyPos) + 0x1554, 2, 0x400, 0x100);
|
||||
} else {
|
||||
this->skelAnime.animPlaybackSpeed = 1.5f;
|
||||
if (this->actor.xzDistFromLink > 80.0f) {
|
||||
|
@ -483,8 +480,7 @@ void EnFirefly_FlyAway(EnFirefly* this, GlobalContext* globalCtx) {
|
|||
if (this->actor.bgCheckFlags & 8) {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.wallPolyRot, 2, 0xC00, 0x300);
|
||||
} else {
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.y, func_8002DAC0(&this->actor, &this->actor.initPosRot.pos),
|
||||
0x300);
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.y, func_8002DAC0(&this->actor, &this->actor.initPosRot.pos), 0x300);
|
||||
}
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.x, this->targetPitch, 0x100);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue