mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-07 06:40:15 +00:00
Math3D and olib updates (#315)
* wip * Olib updates * wip * wip * rename most Math3D functions, few matches, documentation * wip * document most of math3d * pr updates * pr updates * add missing comment block finalizer
This commit is contained in:
parent
2826421c98
commit
f11a74d41d
110 changed files with 1959 additions and 1787 deletions
|
@ -251,8 +251,8 @@ void func_808B8F08(BgSpot18Obj* this, GlobalContext* globalCtx) {
|
|||
Actor_MoveForward(&this->dyna.actor);
|
||||
func_808B8DDC(this, globalCtx);
|
||||
|
||||
if (func_800CB594(this->dyna.actor.posRot.pos.x, this->dyna.actor.posRot.pos.z, this->dyna.actor.initPosRot.pos.x,
|
||||
this->dyna.actor.initPosRot.pos.z) >= 6400.0f) {
|
||||
if (Math3D_Dist2DSq(this->dyna.actor.posRot.pos.x, this->dyna.actor.posRot.pos.z, this->dyna.actor.initPosRot.pos.x,
|
||||
this->dyna.actor.initPosRot.pos.z) >= 6400.0f) {
|
||||
func_808B9030(this);
|
||||
this->dyna.actor.posRot.pos.x =
|
||||
(Math_Sins(this->dyna.actor.posRot.rot.y) * 80.0f) + this->dyna.actor.initPosRot.pos.x;
|
||||
|
|
|
@ -117,8 +117,8 @@ s32 EnInsect_FoundNearbySoil(EnInsect* this, GlobalContext* globalCtx) {
|
|||
|
||||
while (currentActor != NULL) {
|
||||
if (currentActor->id == ACTOR_OBJ_MAKEKINSUTA) {
|
||||
currentDistance = func_800CB594(this->actor.posRot.pos.x, this->actor.posRot.pos.z,
|
||||
currentActor->posRot.pos.x, currentActor->posRot.pos.z);
|
||||
currentDistance = Math3D_Dist2DSq(this->actor.posRot.pos.x, this->actor.posRot.pos.z,
|
||||
currentActor->posRot.pos.x, currentActor->posRot.pos.z);
|
||||
|
||||
if (currentDistance < bestDistance && currentActor->room == this->actor.room) {
|
||||
ret = 1;
|
||||
|
@ -421,7 +421,7 @@ void func_80A7CC3C(EnInsect* this, GlobalContext* globalCtx) {
|
|||
|
||||
if (this->unk_31A <= 0) {
|
||||
if ((this->unk_314 & 0x10) && this->soilActor != NULL &&
|
||||
func_800CB650(&this->soilActor->actor.posRot.pos, &this->actor.posRot.pos) < 64.0f) {
|
||||
Math3D_Vec3fDistSq(&this->soilActor->actor.posRot.pos, &this->actor.posRot.pos) < 64.0f) {
|
||||
this->soilActor->unk_152 = 1;
|
||||
}
|
||||
Actor_Kill(&this->actor);
|
||||
|
@ -568,7 +568,7 @@ void func_80A7D460(EnInsect* this, GlobalContext* globalCtx) {
|
|||
sp3A = this->actor.params & 3;
|
||||
|
||||
if (this->soilActor != NULL) {
|
||||
sp40 = func_800CB650(&this->actor.posRot.pos, &this->soilActor->actor.posRot.pos);
|
||||
sp40 = Math3D_Vec3fDistSq(&this->actor.posRot.pos, &this->soilActor->actor.posRot.pos);
|
||||
} else {
|
||||
if (this->unk_314 & 0x10) {
|
||||
osSyncPrintf(VT_COL(YELLOW, BLACK));
|
||||
|
|
|
@ -94,7 +94,7 @@ void ObjMakeoshihiki_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 cond2;
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
if (func_800CB650(&thisx->attachedB->posRot.pos, &block->posVecs[i]) < 0.001f) {
|
||||
if (Math3D_Vec3fDistSq(&thisx->attachedB->posRot.pos, &block->posVecs[i]) < 0.001f) {
|
||||
if (block->unk_24[i] & 1) {
|
||||
if ((thisx->params >> 6) & 1) {
|
||||
sfxCond1 = false;
|
||||
|
|
|
@ -112,7 +112,7 @@ void func_80BADF0C(ShotSun* this, GlobalContext* globalCtx) {
|
|||
s32 pad;
|
||||
s32 params = this->actor.params & 0xFF;
|
||||
|
||||
if (func_800CB650(&this->actor.posRot.pos, &player->actor.posRot.pos) > 22500.0f) {
|
||||
if (Math3D_Vec3fDistSq(&this->actor.posRot.pos, &player->actor.posRot.pos) > 22500.0f) {
|
||||
this->unk_1A4 = 0;
|
||||
} else {
|
||||
if (this->unk_1A4 == 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue