sys_math3d.c Decompiled and Mostly Documented (#1450)

* Use matched sys_math3d functions by Tharo

Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>

* kinda match some unattempted functions

* move sys_math3d function declarations to z64math.h

* Rename some simple functions

* Take matched Math3D_LineVsLineClosestTwoPoints from OoT

* minor fixes to make stuff actually equivalent

* func_8017FB1C

* format

* minor cleanup

* Math3D_PointOnDirectedLine

* func_8017FB1C documentation

Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>

* Remove actorfixer

* fix merge

* Apply renames

* more cleanup

* bss cleanup

* match Math3D_CylVsLineSeg

* WIP

* OK

* small cleanup

* Remove macros.h from sys_math3d

* Small cleanup

* Some more small clean up

* cleanup and docs

* cleanup

* PR Review

* cleanup

* fix merge

* fix merge

* merge main

* fix bss

* bss

* fix

* PR Review

* bss fix

* Merge main

* Fix bss

* Fix merge

* Add zero vecs to sys_math3d

* Format

* namefixer run

---------

Co-authored-by: angie <angheloalf95@gmail.com>
Co-authored-by: Tharo <17233964+Thar0@users.noreply.github.com>
Co-authored-by: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com>
Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
This commit is contained in:
engineer124 2024-06-15 15:39:31 +10:00 committed by GitHub
parent 3705eaedac
commit b55f8ffe6e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
84 changed files with 3226 additions and 949 deletions

View File

@ -439,101 +439,6 @@ Gfx* Gfx_Open(Gfx* gfx);
Gfx* Gfx_Close(Gfx* gfx, Gfx* dst);
void* Gfx_Alloc(Gfx** gfxP, size_t size);
f32 Math3D_Normalize(Vec3f* vec);
s32 Math3D_PlaneVsLineSegClosestPoint(f32 planeAA, f32 planeAB, f32 planeAC, f32 planeADist, f32 planeBA, f32 planeBB, f32 planeBC, f32 planeBDist, Vec3f* linePointA, Vec3f* linePointB, Vec3f* closestPoint);
s32 func_80179798(Vec3f* param_1, Vec3f* param_2, Vec3f* param_3, Vec3f* param_4, Vec3f* param_5, Vec3f* param_6);
f32 func_80179A44(Vec3f* arg0, PosRot* arg1, Vec3f* arg2);
void func_80179B34(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32* arg7, f32* arg8);
// UNK_TYPE4 func_80179B94(f32 fParm1, f32 fParm2, f32 fParm5, f32 param_4, f32 param_5, f32 param_6, f32 param_7, f32 param_8, Vec3f* param_9);
// void func_80179D74(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10);
void Math3D_ScaleAndAdd(Vec3f* a, Vec3f* b, f32 scale, Vec3f* dst);
void Math3D_Lerp(Vec3f* a, Vec3f* b, f32 t, Vec3f* dst);
f32 Math3D_Parallel(Vec3f* a, Vec3f* b);
s32 Math3D_AngleBetweenVectors(Vec3f* a, Vec3f* b, f32* angle);
void func_80179F64(Vec3f* param_1, Vec3f* param_2, Vec3f* param_3);
s32 Math3D_XZBoundCheck(f32 xMin, f32 xMax, f32 zMin, f32 zMax, f32 x, f32 z);
// void func_8017A09C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
// void func_8017A1D0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
s32 func_8017A304(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 z, f32 x, f32 chkDist);
// UNK_TYPE4 func_8017A438(Vec3f* pfParm1, Vec3f* pfParm2, Vec3f* pfParm3, Vec3f* pfParm4, f32 param_5);
f32 Math3D_XZLengthSquared(f32 x, f32 z);
f32 Math3D_XZLength(f32 x, f32 z);
f32 Math3D_XZDistanceSquared(f32 x1, f32 x2, f32 z1, f32 z2);
f32 Math3D_XZDistance(f32 x1, f32 x2, f32 z1, f32 z2);
f32 Math3D_LengthSquared(Vec3f* vec);
f32 Math3D_Vec3fMagnitude(Vec3f* vec);
f32 Math3D_Vec3fDistSq(Vec3f* a, Vec3f* b);
f32 Math3D_Distance(Vec3f* a, Vec3f* b);
f32 Math3D_DistanceS(Vec3s* s, Vec3f* f);
f32 func_8017A7B8(f32* param_1, f32* param_2, f32 param_3, f32 param_4);
f32 func_8017A7F8(f32* param_1, f32* param_2, f32 param_3, f32 param_4);
f32 func_8017A838(f32* param_1, f32* param_2, f32 param_3, f32 param_4);
void Math3D_CrossProduct(Vec3f* a, Vec3f* b, Vec3f* res);
void Math3D_SurfaceNorm(Vec3f* a, Vec3f* b, Vec3f* c, Vec3f* res);
u32 Math3D_PointRelativeToCubeFaces(Vec3f* param_1, Vec3f* param_2, Vec3f* param_3);
u32 Math3D_PointRelativeToCubeEdges(Vec3f* param_1, Vec3f* param_2, Vec3f* param_3);
u32 Math3D_PointRelativeToCubeVertices(Vec3f* param_1, Vec3f* param_2, Vec3f* param_3);
s32 Math3D_LineVsCube(Vec3f* min, Vec3f* max, Vec3f* a, Vec3f* b);
// void func_8017B68C(void);
void func_8017B7F8(Vec3f* arg0, s16 arg1, f32* arg2, f32* arg3, f32* arg4);
void Math3D_UnitNormalVector(Vec3f* a, Vec3f* b, Vec3f* c, f32* normX, f32* normY, f32* normZ, f32* param_7);
f32 Math3D_SignedDistanceFromPlane(f32 normX, f32 normY, f32 normZ, f32 d, Vec3f* position);
// void func_8017B9D8(void);
f32 Math3D_UDistPlaneToPos(f32 normX, f32 normY, f32 normZ, f32 d, Vec3f* position);
f32 Math3D_DistPlaneToPos(f32 normX, f32 normY, f32 normZ, f32 d, Vec3f* position);
s32 Math3D_TriChkPointParaYDist(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 y, f32 z, f32 unk, f32 chkDist, f32 ny);
// void func_8017BD98(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
// void func_8017BDE0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
s32 Math3D_TriChkPointParaYIntersectDist(Vec3f* a, Vec3f* b, Vec3f* c, f32 nx, f32 ny, f32 nz, f32 dist, f32 z, f32 x, f32* yIntersect, f32 chkDist);
s32 Math3D_TriChkPointParaYIntersectInsideTri(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 z, f32 x, f32* yIntersect, f32 chkDist);
// void func_8017BF8C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
s32 Math3D_TriChkLineSegParaYIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 z, f32 x, f32* yIntersect, f32 y0, f32 y1);
// void func_8017C17C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
// void func_8017C1F0(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8);
s32 Math3D_TriChkPointParaYIntersectInsideTri2(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 z, f32 x, f32* yIntersect, f32 chkDist);
s32 Math3D_TriChkPointParaXDist(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 y, f32 z, f32 unk, f32 chkDist, f32 nx);
// void func_8017C808(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
s32 Math3D_TriChkPointParaXIntersect(Vec3f* a, Vec3f* b, Vec3f* c, f32 nx, f32 ny, f32 nz, f32 dist, f32 y, f32 z, f32* xIntersect);
// void func_8017C904(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
s32 Math3D_TriChkLineSegParaXIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 y, f32 z, f32* xIntersect, f32 x0, f32 x1);
// void func_8017CB08(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
s32 Math3D_TriChkLineSegParaZDist(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 y, f32 z, f32 unk, f32 chkDist, f32 nz);
// void func_8017CEA8(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
s32 Math3D_TriChkPointParaZIntersect(Vec3f* a, Vec3f* b, Vec3f* c, f32 nx, f32 ny, f32 nz, f32 dist, f32 x, f32 y, f32* zIntersect);
// void func_8017CFA4(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6);
s32 Math3D_TriChkLineSegParaZIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 x, f32 y, f32* zIntersect, f32 z0, f32 z1);
// void func_8017D1AC(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7);
// void func_8017D220(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
s32 Math3D_LineSegVsPlane(f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* linePointA, Vec3f* linePointB, Vec3f* intersect, s32 fromFront);
// void func_8017D404(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10, UNK_TYPE4 param_11);
void Math3D_TriSetCoords(TriNorm* tri, Vec3f* pointA, Vec3f* pointB, Vec3f* pointC);
u32 Math3D_IsPointInSphere(Sphere16* sphere, Vec3f* point);
s32 Math3D_PointDistToLine2D(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32* arg6, f32* arg7, f32* arg8); // returns boolean
s32 func_8017D7C0(f32 x0, f32 y0, f32 x1, f32 y1, f32 x2, f32 y2, f32* lineLenSq);
// void func_8017D814(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
// void func_8017D91C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
// void func_8017DA24(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5);
s32 Math3D_LineVsSph(Sphere16* sphere, LineSegment* line);
void func_8017DD34(Sphere16* sphere, TriNorm* tri, Vec3f* pfParm3);
s32 Math3D_ColSphereTri(Sphere16* sphere, TriNorm* tri, Vec3f* uParm3);
// void func_8017E294(void);
UNK_TYPE func_8017E350(UNK_PTR, Vec3f*, Vec3f*, Vec3f*, Vec3f*);
s32 Math3D_ColCylinderTri(Cylinder16* cylinder, TriNorm* tri, Vec3f* pzParm3);
// void func_8017F1A0(void);
s32 Math3D_SphVsSph(Sphere16* sphere1, Sphere16* sphere2);
s32 Math3D_ColSphereSphereIntersect(Sphere16* sphere1, Sphere16* sphere2, f32* intersectAmount);
s32 Math3D_ColSphereSphereIntersectAndDistance(Sphere16* sphere1, Sphere16* sphere2, f32* intersectAmount, f32* dist);
s32 Math3D_ColSphereCylinderDistance(Sphere16* sphere, Cylinder16* cylinder, f32* dist);
s32 Math3D_ColSphereCylinderDistanceAndAmount(Sphere16* sphere, Cylinder16* cylinder, f32* dist, f32* intersectAmount);
s32 Math3D_ColCylinderCylinderAmount(Cylinder16* cylinder1, Cylinder16* cylinder2, f32* intersectAmount);
s32 Math3D_ColCylinderCylinderAmountAndDistance(Cylinder16* cylinder1, Cylinder16* cylinder2, f32* intersectAmount, f32* dist);
s32 Math3d_ColTriTri(TriNorm* tri1, TriNorm* tri2, Vec3f* uParm3);
s32 Math3D_XZInSphere(Sphere16* sphere, f32 x, f32 z);
s32 Math3D_XYInSphere(Sphere16* sphere, f32 x, f32 y);
s32 Math3D_YZInSphere(Sphere16* sphere, f32 y, f32 z);
// void func_8017FB1C(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5, UNK_TYPE4 param_6, UNK_TYPE4 param_7, UNK_TYPE4 param_8, UNK_TYPE4 param_9, UNK_TYPE4 param_10, UNK_TYPE4 param_11);
// void func_8017FD44(void);
void func_80183070(void);
AudioTask* AudioThread_Update(void);

View File

@ -64,10 +64,6 @@
(flag & 0x1) ? 0 : \
0)
#define SQ(x) ((x) * (x))
#define CB(x) ((x) * (x) * (x))
#define ABS(x) ((x) >= 0 ? (x) : -(x))
#define ABS_ALT(x) ((x) < 0 ? -(x) : (x))
#define DECR(x) ((x) == 0 ? 0 : --(x))
//! checks min first

View File

@ -25,9 +25,6 @@ extern u8 gPlayerFormItemRestrictions[PLAYER_FORM_MAX][114];
extern s32 gDbgCamEnabled;
extern Vec3f gZeroVec3f;
extern Vec3s gZeroVec3s;
extern s16 gLowPassFilterData[];
extern s16 gHighPassFilterData[];
extern s16 gBandStopFilterData[];

View File

@ -2,6 +2,7 @@
#define Z64CAMERA_H
#include "ultra64.h"
#include "z64math.h"
#include "z64actor.h"
#include "z64save.h"
#include "unk.h"
@ -1196,8 +1197,7 @@ typedef struct {
/* 0x00 */ Vec3f unk_00;
/* 0x0C */ Vec3f unk_0C;
/* 0x18 */ f32 unk_18;
/* 0x1C */ Vec3f unk_1C;
/* 0x28 */ Vec3f unk_28;
/* 0x1C */ InfiniteLine unk_1C;
/* 0x34 */ Vec3s unk_34;
/* 0x3A */ s16 unk_3A;
/* 0x3C */ s16 timer;

View File

@ -10,100 +10,100 @@ struct PlayState;
typedef struct {
/* 0x00 */ struct Actor* actor; // Attached actor
/* 0x04 */ struct Actor* at; // Actor attached to what it collided with as an AT collider.
/* 0x08 */ struct Actor* ac; // Actor attached to what it collided with as an AC collider.
/* 0x0C */ struct Actor* oc; // Actor attached to what it collided with as an OC collider.
/* 0x10 */ u8 atFlags; // Information flags for AT collisions.
/* 0x11 */ u8 acFlags; // Information flags for AC collisions.
/* 0x12 */ u8 ocFlags1; // Information flags for OC collisions.
/* 0x13 */ u8 ocFlags2; // Flags related to which colliders it can OC collide with.
/* 0x14 */ u8 colType; // Determines hitmarks and sound effects during AC collisions.
/* 0x15 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
/* 0x04 */ struct Actor* at; // Actor attached to what it collided with as an AT collider.
/* 0x08 */ struct Actor* ac; // Actor attached to what it collided with as an AC collider.
/* 0x0C */ struct Actor* oc; // Actor attached to what it collided with as an OC collider.
/* 0x10 */ u8 atFlags; // Information flags for AT collisions.
/* 0x11 */ u8 acFlags; // Information flags for AC collisions.
/* 0x12 */ u8 ocFlags1; // Information flags for OC collisions.
/* 0x13 */ u8 ocFlags2; // Flags related to which colliders it can OC collide with.
/* 0x14 */ u8 colType; // Determines hitmarks and sound effects during AC collisions.
/* 0x15 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
} Collider; // size = 0x18
typedef struct {
/* 0x0 */ u8 colType; // Determines hitmarks and sound effects during AC collisions.
/* 0x1 */ u8 atFlags; // Information flags for AT collisions.
/* 0x2 */ u8 acFlags; // Information flags for OC collisions.
/* 0x0 */ u8 colType; // Determines hitmarks and sound effects during AC collisions.
/* 0x1 */ u8 atFlags; // Information flags for AT collisions.
/* 0x2 */ u8 acFlags; // Information flags for OC collisions.
/* 0x3 */ u8 ocFlags1; // Information flags for OC collisions.
/* 0x4 */ u8 ocFlags2; // Flags related to which colliders it can OC collide with.
/* 0x5 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
/* 0x5 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
} ColliderInit; // size = 0x6
typedef struct {
/* 0x0 */ u8 colType; // Determines hitmarks and sound effects during AC collisions.
/* 0x1 */ u8 atFlags; // Information flags for AT collisions.
/* 0x2 */ u8 acFlags; // Information flags for AC collisions.
/* 0x0 */ u8 colType; // Determines hitmarks and sound effects during AC collisions.
/* 0x1 */ u8 atFlags; // Information flags for AT collisions.
/* 0x2 */ u8 acFlags; // Information flags for AC collisions.
/* 0x3 */ u8 ocFlags1; // Information flags for OC collisions.
/* 0x4 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
/* 0x4 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
} ColliderInitType1; // size = 0x5
typedef struct {
/* 0x0 */ struct Actor* actor; // Attached actor
/* 0x4 */ u8 atFlags; // Information flags for AT collisions.
/* 0x5 */ u8 acFlags; // Information flags for AC collisions.
/* 0x6 */ u8 ocFlags1; // Information flags for OC collisions.
/* 0x7 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
/* 0x4 */ u8 atFlags; // Information flags for AT collisions.
/* 0x5 */ u8 acFlags; // Information flags for AC collisions.
/* 0x6 */ u8 ocFlags1; // Information flags for OC collisions.
/* 0x7 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
} ColliderInitToActor; // size = 0x8
typedef struct {
/* 0x0 */ u32 dmgFlags; // Toucher damage type flags.
/* 0x4 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
/* 0x5 */ u8 damage; // Damage or Stun Timer
/* 0x0 */ u32 dmgFlags; // Toucher damage type flags.
/* 0x4 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
/* 0x5 */ u8 damage; // Damage or Stun Timer
} ColliderTouch; // size = 0x8
typedef struct {
/* 0x0 */ u32 dmgFlags; // Toucher damage type flags.
/* 0x4 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
/* 0x5 */ u8 damage; // Damage or Stun Timer
/* 0x0 */ u32 dmgFlags; // Toucher damage type flags.
/* 0x4 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
/* 0x5 */ u8 damage; // Damage or Stun Timer
} ColliderTouchInit; // size = 0x8
typedef struct {
/* 0x0 */ u32 dmgFlags; // Bumper damage type flags.
/* 0x4 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
/* 0x5 */ u8 defense; // Damage Resistance
/* 0x6 */ Vec3s hitPos; // Point of contact
/* 0x0 */ u32 dmgFlags; // Bumper damage type flags.
/* 0x4 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
/* 0x5 */ u8 defense; // Damage Resistance
/* 0x6 */ Vec3s hitPos; // Point of contact
} ColliderBump; // size = 0xC
typedef struct {
/* 0x0 */ u32 dmgFlags; // Bumper exclusion mask
/* 0x4 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
/* 0x5 */ u8 defense; // Damage Resistance
/* 0x0 */ u32 dmgFlags; // Bumper exclusion mask
/* 0x4 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
/* 0x5 */ u8 defense; // Damage Resistance
} ColliderBumpInit; // size = 0x8
typedef struct ColliderInfo {
/* 0x00 */ ColliderTouch toucher; // Damage properties when acting as an AT collider
/* 0x08 */ ColliderBump bumper; // Damage properties when acting as an AC collider
/* 0x14 */ u8 elemType; // Affects sfx reaction when attacked by Link and hookability. Full purpose unknown.
/* 0x15 */ u8 toucherFlags; // Information flags for AT collisions
/* 0x16 */ u8 bumperFlags; // Information flags for AC collisions
/* 0x17 */ u8 ocElemFlags; // Information flags for OC collisions
/* 0x18 */ Collider* atHit; // object touching this element's AT collider
/* 0x1C */ Collider* acHit; // object touching this element's AC collider
/* 0x20 */ struct ColliderInfo* atHitInfo; // element that hit the AT collider
/* 0x24 */ struct ColliderInfo* acHitInfo; // element that hit the AC collider
/* 0x00 */ ColliderTouch toucher; // Damage properties when acting as an AT collider
/* 0x08 */ ColliderBump bumper; // Damage properties when acting as an AC collider
/* 0x14 */ u8 elemType; // Affects sfx reaction when attacked by Link and hookability. Full purpose unknown.
/* 0x15 */ u8 toucherFlags; // Information flags for AT collisions
/* 0x16 */ u8 bumperFlags; // Information flags for AC collisions
/* 0x17 */ u8 ocElemFlags; // Information flags for OC collisions
/* 0x18 */ Collider* atHit; // object touching this element's AT collider
/* 0x1C */ Collider* acHit; // object touching this element's AC collider
/* 0x20 */ struct ColliderInfo* atHitInfo; // element that hit the AT collider
/* 0x24 */ struct ColliderInfo* acHitInfo; // element that hit the AC collider
} ColliderInfo; // size = 0x28
typedef struct {
/* 0x00 */ u8 elemType; // Affects sfx reaction when attacked by Link and hookability. Full purpose unknown.
/* 0x04 */ ColliderTouchInit toucher; // Damage properties when acting as an AT collider
/* 0x0C */ ColliderBumpInit bumper; // Damage properties when acting as an AC collider
/* 0x14 */ u8 toucherFlags; // Information flags for AT collisions
/* 0x15 */ u8 bumperFlags; // Information flags for AC collisions
/* 0x16 */ u8 ocElemFlags; // Information flags for OC collisions
/* 0x00 */ u8 elemType; // Affects sfx reaction when attacked by Link and hookability. Full purpose unknown.
/* 0x04 */ ColliderTouchInit toucher; // Damage properties when acting as an AT collider
/* 0x0C */ ColliderBumpInit bumper; // Damage properties when acting as an AC collider
/* 0x14 */ u8 toucherFlags; // Information flags for AT collisions
/* 0x15 */ u8 bumperFlags; // Information flags for AC collisions
/* 0x16 */ u8 ocElemFlags; // Information flags for OC collisions
} ColliderInfoInit; // size = 0x18
typedef struct {
/* 0x00 */ Sphere16 modelSphere; // model space sphere
/* 0x08 */ Sphere16 worldSphere; // world space sphere
/* 0x10 */ f32 scale; // worldsphere = modelsphere * scale * 0.01
/* 0x14 */ u8 limb; // attached limb
/* 0x00 */ Sphere16 modelSphere; // model space sphere
/* 0x08 */ Sphere16 worldSphere; // world space sphere
/* 0x10 */ f32 scale; // worldsphere = modelsphere * scale * 0.01
/* 0x14 */ u8 limb; // attached limb
} ColliderJntSphElementDim; // size = 0x18
typedef struct {
/* 0x0 */ u8 limb; // attached limb
/* 0x2 */ Sphere16 modelSphere; // model space sphere
/* 0xA */ s16 scale; // world space sphere = model * scale * 0.01
/* 0x0 */ u8 limb; // attached limb
/* 0x2 */ Sphere16 modelSphere; // model space sphere
/* 0xA */ s16 scale; // world space sphere = model * scale * 0.01
} ColliderJntSphElementDimInit; // size = 0xC
typedef struct {
@ -141,27 +141,27 @@ typedef struct {
} ColliderJntSphInitToActor; // size = 0x10
typedef struct {
/* 0x00 */ Collider base;
/* 0x00 */ Collider base;
/* 0x18 */ ColliderInfo info;
/* 0x40 */ Cylinder16 dim;
/* 0x40 */ Cylinder16 dim;
} ColliderCylinder; // size = 0x4C
typedef struct {
/* 0x00 */ ColliderInit base;
/* 0x00 */ ColliderInit base;
/* 0x08 */ ColliderInfoInit info;
/* 0x20 */ Cylinder16 dim;
/* 0x20 */ Cylinder16 dim;
} ColliderCylinderInit; // size = 0x2C
typedef struct {
/* 0x00 */ ColliderInitType1 base;
/* 0x08 */ ColliderInfoInit info;
/* 0x20 */ Cylinder16 dim;
/* 0x08 */ ColliderInfoInit info;
/* 0x20 */ Cylinder16 dim;
} ColliderCylinderInitType1; // size = 0x2C
typedef struct {
/* 0x00 */ ColliderInitToActor base;
/* 0x08 */ ColliderInfoInit info;
/* 0x20 */ Cylinder16 dim;
/* 0x08 */ ColliderInfoInit info;
/* 0x20 */ Cylinder16 dim;
} ColliderCylinderInitToActor; // size = 0x2C
typedef struct {
@ -170,7 +170,7 @@ typedef struct {
typedef struct {
/* 0x00 */ ColliderInfo info;
/* 0x28 */ TriNorm dim;
/* 0x28 */ TriNorm dim;
} ColliderTrisElement; // size = 0x5C
typedef struct {
@ -198,9 +198,9 @@ typedef struct {
typedef struct {
/* 0x00 */ Vec3f quad[4];
/* 0x30 */ Vec3s dcMid; // midpoint of vectors d, c
/* 0x36 */ Vec3s baMid; // midpoint of vectors b, a
/* 0x3C */ f32 acDist; // distance to nearest AC collision this frame.
/* 0x30 */ Vec3s dcMid; // midpoint of vectors d, c
/* 0x36 */ Vec3s baMid; // midpoint of vectors b, a
/* 0x3C */ f32 acDist; // distance to nearest AC collision this frame.
} ColliderQuadDim; // size = 0x40
typedef struct {
@ -208,50 +208,50 @@ typedef struct {
} ColliderQuadDimInit; // size = 0x30
typedef struct {
/* 0x00 */ Collider base;
/* 0x18 */ ColliderInfo info;
/* 0x00 */ Collider base;
/* 0x18 */ ColliderInfo info;
/* 0x40 */ ColliderQuadDim dim;
} ColliderQuad; // size = 0x80
typedef struct {
/* 0x00 */ ColliderInit base;
/* 0x08 */ ColliderInfoInit info;
/* 0x00 */ ColliderInit base;
/* 0x08 */ ColliderInfoInit info;
/* 0x20 */ ColliderQuadDimInit dim;
} ColliderQuadInit; // size = 0x50
typedef struct {
/* 0x00 */ ColliderInitType1 base;
/* 0x08 */ ColliderInfoInit info;
/* 0x00 */ ColliderInitType1 base;
/* 0x08 */ ColliderInfoInit info;
/* 0x20 */ ColliderQuadDimInit dim;
} ColliderQuadInitType1; // size = 0x50
typedef struct {
/* 0x00 */ Collider base;
/* 0x00 */ Collider base;
/* 0x18 */ ColliderInfo info;
/* 0x40 */ ColliderJntSphElementDim dim;
} ColliderSphere; // size = 0x58
typedef struct {
/* 0x00 */ ColliderInit base;
/* 0x00 */ ColliderInit base;
/* 0x08 */ ColliderInfoInit info;
/* 0x20 */ ColliderJntSphElementDimInit dim;
} ColliderSphereInit; // size = 0x2C
typedef struct {
/* 0x00 */ LineSegment line;
/* 0x18 */ u16 ocFlags;
/* 0x00 */ Linef line;
/* 0x18 */ u16 ocFlags;
} OcLine; // size = 0x1C
typedef struct {
/* 0x000 */ s16 colATCount;
/* 0x002 */ u16 sacFlags; // Controls whether new collidors can be added or removed, or only swapped
/* 0x000 */ s16 colATCount;
/* 0x002 */ u16 sacFlags; // Controls whether new collidors can be added or removed, or only swapped
/* 0x004 */ Collider* colAT[50];
/* 0x0CC */ s32 colACCount;
/* 0x0CC */ s32 colACCount;
/* 0x0D0 */ Collider* colAC[60];
/* 0x1C0 */ s32 colOCCount;
/* 0x1C0 */ s32 colOCCount;
/* 0x1C4 */ Collider* colOC[50];
/* 0x28C */ s32 colLineCount;
/* 0x290 */ OcLine* colLine[3];
/* 0x28C */ s32 colLineCount;
/* 0x290 */ OcLine* colLine[3];
} CollisionCheckContext; // size = 0x29C
typedef struct {
@ -626,7 +626,7 @@ void CollisionCheck_SetHitEffects(struct PlayState* play, CollisionCheckContext*
void CollisionCheck_AC(struct PlayState* play, CollisionCheckContext* colCtxt, Collider* colAT);
void CollisionCheck_AT(struct PlayState* play, CollisionCheckContext* colCtxt);
s32 CollisionCheck_GetMassType(u8 mass);
void CollisionCheck_SetOCvsOC(struct PlayState* play, Collider* left, ColliderInfo* leftInfo, Vec3f* leftPos, Collider* right, ColliderInfo* rightInfo, Vec3f* rightPos, f32 overlap);
void CollisionCheck_SetOCvsOC(struct PlayState* play, Collider* left, ColliderInfo* leftInfo, Vec3f* leftPos, Collider* right, ColliderInfo* rightInfo, Vec3f* rightPos, f32 overlapSize);
void CollisionCheck_OC_JntSphVsJntSph(struct PlayState* play, CollisionCheckContext* colCtxt, Collider* l, Collider* r);
void CollisionCheck_OC_JntSphVsCyl(struct PlayState* play, CollisionCheckContext* colCtxt, Collider* l, Collider* r);
void CollisionCheck_OC_JntSphVsSphere(struct PlayState* play, CollisionCheckContext* colCtxt, Collider* l, Collider* r);

View File

@ -1,7 +1,7 @@
#ifndef Z64CURVE_H
#define Z64CURVE_H
#include "PR/ultratypes.h"
#include "ultra64.h"
#include "z64math.h"
struct Actor;

View File

@ -98,7 +98,7 @@ typedef struct {
typedef struct {
/* 0x00 */ Vec3f a;
/* 0x0C */ Vec3f b;
} LineSegment; // size = 0x18
} Linef; // size = 0x18
typedef struct {
/* 0x0 */ f32 r; // radius
@ -138,6 +138,9 @@ typedef union {
};
} MtxF; // size = 0x40
extern Vec3f gZeroVec3f;
extern Vec3s gZeroVec3s;
#define LERPIMP(v0, v1, t) ((v0) + (((v1) - (v0)) * (t)))
#define LERPIMP_ALT(v0, v1, t) (((v1) - (v0)) * (t) + (v0))
#define S16_LERP(v0, v1, t) ((s16)(((v1) - (v0)) * (t)) + (v0))
@ -161,6 +164,11 @@ typedef union {
#define IS_ZERO(f) (fabsf(f) < 0.008f)
#define SQ(x) ((x) * (x))
#define CB(x) ((x) * (x) * (x))
#define ABS(x) ((x) >= 0 ? (x) : -(x))
#define ABS_ALT(x) ((x) < 0 ? -(x) : (x))
// Casting a float to an integer, when the float value is larger than what the integer type can hold,
// leads to undefined behavior. For example (f32)0x8000 doesn't fit in a s16, so it cannot be cast to s16.
// This isn't an issue with IDO, but is one with for example GCC.
@ -252,4 +260,99 @@ f32 Math_Atan2F(f32 y, f32 x);
s16 Math_Atan2S_XY(f32 x, f32 y);
f32 Math_Atan2F_XY(f32 x, f32 y);
f32 Math3D_Normalize(Vec3f* vec);
s32 Math3D_PlaneVsLineSegClosestPoint(f32 planeAA, f32 planeAB, f32 planeAC, f32 planeADist, f32 planeBA, f32 planeBB, f32 planeBC, f32 planeBDist, Vec3f* linePointA, Vec3f* linePointB, Vec3f* closestPoint);
s32 Math3D_LineSegMakePerpLineSeg(Vec3f* lineAPointA, Vec3f* lineAPointB, Vec3f* lineBPointA, Vec3f* lineBPointB, Vec3f* lineAClosestToB, Vec3f* lineBClosestToA);
f32 Math3D_LineClosestToPoint(InfiniteLine* line, Vec3f* pos, Vec3f* closestPoint);
void Math3D_FindPointOnPlaneIntersect(float planeAAxis1Norm, f32 planeAAxis2Norm, f32 planeBAxis1Norm, f32 planeBAxis2Norm, f32 axis3Direction, f32 planeADist, f32 planeBDist, float* axis1Point, float* axis2Point);
s32 Math3D_PlaneVsPlaneNewLine(f32 planeAA, f32 planeAB, f32 planeAC, f32 planeADist, f32 planeBA, f32 planeBB, f32 planeBC, f32 planeBDist, InfiniteLine* intersect);
s32 Math3D_PlaneVsPlaneVsLineClosestPoint(f32 planeAA, f32 planeAB, f32 planeAC, f32 planeADist, f32 planeBA, f32 planeBB, f32 planeBC, f32 planeBDist, Vec3f* point, Vec3f* closestPoint);
void Math3D_PointOnDirectedLine(Vec3f* v0, Vec3f* dir, f32 scale, Vec3f* ret);
void Math3D_LineSplitRatio(Vec3f* v0, Vec3f* v1, f32 ratio, Vec3f* ret);
f32 Math3D_Cos(Vec3f* a, Vec3f* b);
s32 Math3D_CosOut(Vec3f* a, Vec3f* b, f32* dst);
void Math3D_Vec3fReflect(Vec3f* vec, Vec3f* normal, Vec3f* reflVec);
s32 Math3D_PointInSquare2D(f32 upperLeftX, f32 lowerRightX, f32 upperLeftY, f32 lowerRightY, f32 x, f32 y);
s32 Math3D_CirSquareVsTriSquareXY(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 centerX, f32 centerY, f32 radius);
s32 Math3D_CirSquareVsTriSquareYZ(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 centerY, f32 centerZ, f32 radius);
s32 Math3D_CirSquareVsTriSquareZX(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 centerZ, f32 centerX, f32 radius);
s32 Math3D_SphCubeVsTriCube(Vec3f* v0, Vec3f* v1, Vec3f* v2, Vec3f* center, f32 radius);
f32 Math3D_Dist1DSq(f32 a, f32 b);
f32 Math3D_Dist1D(f32 a, f32 b);
f32 Math3D_Dist2DSq(f32 x0, f32 y0, f32 x1, f32 y1);
f32 Math3D_Dist2D(f32 x0, f32 y0, f32 x1, f32 y1);
f32 Math3D_Vec3fMagnitudeSq(Vec3f* vec);
f32 Math3D_Vec3fMagnitude(Vec3f* vec);
f32 Math3D_Vec3fDistSq(Vec3f* a, Vec3f* b);
f32 Math3D_Vec3f_DistXYZ(Vec3f* a, Vec3f* b);
f32 Math3D_DistXYZ16toF(Vec3s* a, Vec3f* b);
f32 Math3D_Vec3fDiff_CrossZ(Vec3f* a, Vec3f* b, f32 dx, f32 dy);
f32 Math3D_Vec3fDiff_CrossX(Vec3f* a, Vec3f* b, f32 dy, f32 dz);
f32 Math3D_Vec3fDiff_CrossY(Vec3f* a, Vec3f* b, f32 dz, f32 dx);
void Math3D_Vec3f_Cross(Vec3f* a, Vec3f* b, Vec3f* ret);
void Math3D_SurfaceNorm(Vec3f* va, Vec3f* vb, Vec3f* vc, Vec3f* normal);
s32 Math3D_PointRelativeToCubeFaces(Vec3f* point, Vec3f* min, Vec3f* max);
s32 Math3D_PointRelativeToCubeEdges(Vec3f* point, Vec3f* min, Vec3f* max);
s32 Math3D_PointRelativeToCubeVertices(Vec3f* point, Vec3f* min, Vec3f* max);
s32 Math3D_LineVsCube(Vec3f* min, Vec3f* max, Vec3f* a, Vec3f* b);
s32 Math3D_LineVsCubeShort(Vec3s* min, Vec3s* max, Vec3s* a, Vec3s* b);
void Math3D_RotateXZPlane(Vec3f* pointOnPlane, s16 angle, f32* a, f32* c, f32* d);
void Math3D_DefPlane(Vec3f* va, Vec3f* vb, Vec3f* vc, f32* nx, f32* ny, f32* nz, f32* originDist);
f32 Math3D_PlaneF(f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* pointOnPlane);
f32 Math3D_Plane(Plane* plane, Vec3f* pointOnPlane);
f32 Math3D_UDistPlaneToPos(f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* p);
f32 Math3D_DistPlaneToPos(f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* p);
s32 Math3D_TriChkPointParaYImpl(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 z, f32 x, f32 detMax, f32 chkDist, f32 ny);
s32 Math3D_TriChkPointParaYDeterminate(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 z, f32 x, f32 detMax, f32 ny);
s32 Math3D_TriChkPointParaYSlopedY(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 z, f32 x);
s32 Math3D_TriChkPointParaYIntersectDist(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 z, f32 x, f32* yIntersect, f32 chkDist);
s32 Math3D_TriChkPointParaYIntersectInsideTri(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 z, f32 x, f32* yIntersect, f32 chkDist);
s32 Math3D_TriChkPointParaY(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 ny, f32 z, f32 x);
s32 Math3D_TriChkLineSegParaYIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 z, f32 x, f32* yIntersect, f32 y0, f32 y1);
s32 Math3D_TriChkPointParaYDist(Vec3f* v0, Vec3f* v1, Vec3f* v2, Plane* plane, f32 z, f32 x, f32 chkDist);
s32 Math3D_TriChkPointParaYImplNoCheckRange(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 z, f32 x, f32 detMax, f32 chkDist, f32 ny);
s32 Math3D_TriChkPointParaYNoRangeCheckIntersectInsideTri(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 z, f32 x, f32* yIntersect, f32 chkDist);
s32 Math3D_TriChkPointParaXImpl(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 y, f32 z, f32 detMax, f32 chkDist, f32 ny);
s32 Math3D_TriChkPointParaXDeterminate(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 y, f32 z, f32 detMax, f32 nx);
s32 Math3D_TriChkPointParaXIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 y, f32 z, f32* xIntersect);
s32 Math3D_TriChkPointParaX(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 y, f32 z);
s32 Math3D_TriChkLineSegParaXIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 y, f32 z, f32* xIntersect, f32 x0, f32 x1);
s32 Math3D_TriChkLineSegParaXDist(Vec3f* v0, Vec3f* v1, Vec3f* v2, Plane* plane, f32 y, f32 z, f32 chkDist);
s32 Math3D_TriChkPointParaZImpl(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 x, f32 y, f32 detMax, f32 chkDist, f32 nz);
s32 Math3D_TriChkPointParaZDeterminate(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 y, f32 z, f32 detMax, f32 nx);
s32 Math3D_TriChkPointParaZIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 x, f32 y, f32* zIntersect);
s32 Math3D_TriChkPointParaZ(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 y, f32 z);
s32 Math3D_TriChkLineSegParaZIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, f32 x, f32 y, f32* zIntersect, f32 z0, f32 z1);
s32 Math3D_TriChkLineSegParaZDist(Vec3f* v0, Vec3f* v1, Vec3f* v2, Plane* plane, f32 x, f32 y, f32 chkDist);
s32 Math3D_LineSegFindPlaneIntersect(f32 pointADist, f32 pointBDist, Vec3f* pointA, Vec3f* pointB, Vec3f* intersect);
s32 Math3D_LineSegVsPlane(f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* linePointA, Vec3f* linePointB, Vec3f* intersect, s32 fromFront);
s32 Math3D_TriLineIntersect(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* linePointA, Vec3f* linePointB, Vec3f* intersect, s32 fromFront) ;
void Math3D_TriNorm(TriNorm* tri, Vec3f* va, Vec3f* vb, Vec3f* vc);
s32 Math3D_PointInSph(Sphere16* sphere, Vec3f* point);
s32 Math3D_PointDistSqToLine2DImpl(f32 x0, f32 y0, f32 x1, f32 y1, f32 x2, f32 y2, f32* perpXOut, f32* perpYOut, f32* lineLenSq); // returns boolean
s32 Math3D_PointDistSqToLine2D(f32 x0, f32 y0, f32 x1, f32 y1, f32 x2, f32 y2, f32* lineLenSq);
s32 Math3D_PointDistSqToLineXY(f32 x0, f32 y0, Vec3f* p1, Vec3f* p2, f32* lineLenSq);
s32 Math3D_PointDistSqToLineYZ(f32 y0, f32 z0, Vec3f* p1, Vec3f* p2, f32* lineLenSq);
s32 Math3D_PointDistSqToLineZX(f32 z0, f32 x0, Vec3f* p1, Vec3f* p2, f32* lineLenSq);
s32 Math3D_LineVsSph(Sphere16* sphere, Linef* line);
void Math3D_GetSphVsTriIntersectPoint(Sphere16* sphere, TriNorm* tri, Vec3f* intersectPoint);
s32 Math3D_TriVsSphIntersect(Sphere16* sphere, TriNorm* tri, Vec3f* intersectPoint);
s32 Math3D_PointInCyl(Cylinder16* cyl, Vec3f* point);
s32 Math3D_CylVsLineSeg(Cylinder16* cyl, Vec3f* linePointA, Vec3f* linePointB, Vec3f* intersectA, Vec3f* intersectB);
s32 Math3D_CylTriVsIntersect(Cylinder16* cyl, TriNorm* tri, Vec3f* intersect);
s32 Math3D_CylVsTri(Cylinder16* cyl, TriNorm* tri);
s32 Math3D_SphVsSph(Sphere16* sphereA, Sphere16* sphereB);
s32 Math3D_SphVsSphOverlap(Sphere16* sphereA, Sphere16* sphereB, f32* overlapSize);
s32 Math3D_SphVsSphOverlapCenterDist(Sphere16* sphereA, Sphere16* sphereB, f32* overlapSize, f32* centerDist);
s32 Math3D_SphVsCylOverlap(Sphere16* sph, Cylinder16* cyl, f32* overlapSize);
s32 Math3D_SphVsCylOverlapCenterDist(Sphere16* sph, Cylinder16* cyl, f32* overlapSize, f32* centerDist);
s32 Math3D_CylVsCylOverlap(Cylinder16* ca, Cylinder16* cb, f32* overlapSize);
s32 Math3D_CylVsCylOverlapCenterDist(Cylinder16* ca, Cylinder16* cb, f32* overlapSize, f32* centerDist);
s32 Math3D_TriVsTriIntersect(TriNorm* ta, TriNorm* tb, Vec3f* intersect);
s32 Math3D_XZInSphere(Sphere16* sphere, f32 x, f32 z);
s32 Math3D_XYInSphere(Sphere16* sphere, f32 x, f32 y);
s32 Math3D_YZInSphere(Sphere16* sphere, f32 y, f32 z);
s32 Math3D_CircleLineIntersections(f32 centreX, f32 centerY, f32 radius, f32 pointX, f32 pointY, f32 dirX, f32 dirY, f32* intersectAX, f32* intersectAY, f32* intersectBX, f32* intersectBY);
void func_8017FD44(Vec3f* arg0, Vec3f* arg1, Vec3f* dst, f32 arg3);
#endif

2
spec
View File

@ -573,8 +573,6 @@ beginseg
include "$(BUILD_DIR)/src/code/sys_initial_check.o"
include "$(BUILD_DIR)/src/code/sys_math.o"
include "$(BUILD_DIR)/src/code/sys_math3d.o"
include "$(BUILD_DIR)/data/code/sys_math3d.data.o"
include "$(BUILD_DIR)/data/code/sys_math3d.bss.o"
include "$(BUILD_DIR)/src/code/sys_math_atan.o"
include "$(BUILD_DIR)/src/code/sys_matrix.o"
include "$(BUILD_DIR)/src/code/sys_ucode.o"

File diff suppressed because it is too large Load Diff

View File

@ -4141,7 +4141,7 @@ void Actor_GetClosestPosOnPath(Vec3s* points, s32 numPoints, Vec3f* srcPos, Vec3
// Find the point closest to srcPos
for (pointIndex = 0; pointIndex < numPoints; pointIndex++) {
distSq = Math3D_XZDistanceSquared(srcPos->x, srcPos->z, points[pointIndex].x, points[pointIndex].z);
distSq = Math3D_Dist2DSq(srcPos->x, srcPos->z, points[pointIndex].x, points[pointIndex].z);
if (distSq < closestPointDistSq) {
closestPointDistSq = distSq;
closestPointIndex = pointIndex;
@ -4166,8 +4166,8 @@ void Actor_GetClosestPosOnPath(Vec3s* points, s32 numPoints, Vec3f* srcPos, Vec3
if ((closestPointIndex != 0) || isPathLoop) {
// Use the adjacent line
useAdjacentLines[0] =
Math3D_PointDistToLine2D(srcPos->x, srcPos->z, closestPointPrev.x, closestPointPrev.z, closestPoint.x,
closestPoint.z, &closestPos[0].x, &closestPos[0].z, &distSq);
Math3D_PointDistSqToLine2DImpl(srcPos->x, srcPos->z, closestPointPrev.x, closestPointPrev.z, closestPoint.x,
closestPoint.z, &closestPos[0].x, &closestPos[0].z, &distSq);
}
// Analyze point on path immediately next to the closest point
@ -4183,8 +4183,8 @@ void Actor_GetClosestPosOnPath(Vec3s* points, s32 numPoints, Vec3f* srcPos, Vec3
}
if ((closestPointIndex + 1 != numPoints) || isPathLoop) {
useAdjacentLines[1] =
Math3D_PointDistToLine2D(srcPos->x, srcPos->z, closestPoint.x, closestPoint.z, closestPointNext.x,
closestPointNext.z, &closestPos[1].x, &closestPos[1].z, &distSq);
Math3D_PointDistSqToLine2DImpl(srcPos->x, srcPos->z, closestPoint.x, closestPoint.z, closestPointNext.x,
closestPointNext.z, &closestPos[1].x, &closestPos[1].z, &distSq);
}
/**
@ -4202,7 +4202,7 @@ void Actor_GetClosestPosOnPath(Vec3s* points, s32 numPoints, Vec3f* srcPos, Vec3
for (i = 0; i < ARRAY_COUNT(loopDistSq); i++) {
if (useAdjacentLines[i]) {
// Get distSq from srcPos to closestPos
loopDistSq[i] = Math3D_XZDistanceSquared(srcPos->x, srcPos->z, closestPos[i].x, closestPos[i].z);
loopDistSq[i] = Math3D_Dist2DSq(srcPos->x, srcPos->z, closestPos[i].x, closestPos[i].z);
} else {
// The closest Pos is not contained within the line-segment
loopDistSq[i] = SQ(40000.0f);
@ -4221,9 +4221,9 @@ void Actor_GetClosestPosOnPath(Vec3s* points, s32 numPoints, Vec3f* srcPos, Vec3
// srcPos is somewhere withing the bend of the path
if (!isRightSideOfAdjacentLines[0] && !isRightSideOfAdjacentLines[1]) {
// srcPos is not inside a loop
if (!Math3D_PointDistToLine2D(srcPos->x, srcPos->z, closestPos[0].x, closestPos[0].z, closestPos[1].x,
closestPos[1].z, &dstPos->x, &dstPos->z, &distSq)) {
// The dstPos calculated in Math3D_PointDistToLine2D was not valid.
if (!Math3D_PointDistSqToLine2DImpl(srcPos->x, srcPos->z, closestPos[0].x, closestPos[0].z, closestPos[1].x,
closestPos[1].z, &dstPos->x, &dstPos->z, &distSq)) {
// The dstPos calculated in Math3D_PointDistSqToLine2DImpl was not valid.
// Take the midpoint of the two closest ponits instead
dstPos->x = (closestPos[1].x + closestPos[0].x) * 0.5f;
dstPos->z = (closestPos[1].z + closestPos[0].z) * 0.5f;

View File

@ -355,14 +355,14 @@ s32 CollisionPoly_CheckYIntersect(CollisionPoly* poly, Vec3s* vtxList, f32 x, f3
D_801EDA18[2].y = sVerts->y;
D_801EDA18[2].z = sVerts->z;
if (!func_8017A304(&D_801EDA18[0], &D_801EDA18[1], &D_801EDA18[2], z, x, checkDist)) {
if (!Math3D_CirSquareVsTriSquareZX(&D_801EDA18[0], &D_801EDA18[1], &D_801EDA18[2], z, x, checkDist)) {
return 0;
}
nx = COLPOLY_GET_NORMAL(poly->normal.x);
ny = COLPOLY_GET_NORMAL(poly->normal.y);
nz = COLPOLY_GET_NORMAL(poly->normal.z);
return Math3D_TriChkPointParaYIntersectInsideTri2(&D_801EDA18[0], &D_801EDA18[1], &D_801EDA18[2], nx, ny, nz,
poly->dist, z, x, yIntersect, checkDist);
return Math3D_TriChkPointParaYNoRangeCheckIntersectInsideTri(&D_801EDA18[0], &D_801EDA18[1], &D_801EDA18[2], nx, ny,
nz, poly->dist, z, x, yIntersect, checkDist);
}
s32 CollisionPoly_CheckYIntersectApprox2(CollisionPoly* poly, Vec3s* vtxList, f32 x, f32 z, f32* yIntersect) {
@ -425,17 +425,17 @@ s32 CollisionPoly_LineVsPoly(BgLineVsPolyTest* a0) {
CollisionPoly_GetNormalF(a0->poly, &sPlane.normal.x, &sPlane.normal.y, &sPlane.normal.z);
CollisionPoly_GetVertices(a0->poly, a0->vtxList, sPolyVerts);
Math3D_Lerp(a0->posA, a0->posB, planeDistA / (planeDistA - planeDistB), a0->planeIntersect);
Math3D_LineSplitRatio(a0->posA, a0->posB, planeDistA / (planeDistA - planeDistB), a0->planeIntersect);
if (((fabsf(sPlane.normal.x) > 0.5f) &&
Math3D_TriChkPointParaXDist(&sPolyVerts[0], &sPolyVerts[1], &sPolyVerts[2], a0->planeIntersect->y,
Math3D_TriChkPointParaXImpl(&sPolyVerts[0], &sPolyVerts[1], &sPolyVerts[2], a0->planeIntersect->y,
a0->planeIntersect->z, 0.0f, a0->checkDist, sPlane.normal.x)) ||
((fabsf(sPlane.normal.y) > 0.5f) &&
Math3D_TriChkPointParaYDist(&sPolyVerts[0], &sPolyVerts[1], &sPolyVerts[2], a0->planeIntersect->z,
Math3D_TriChkPointParaYImpl(&sPolyVerts[0], &sPolyVerts[1], &sPolyVerts[2], a0->planeIntersect->z,
a0->planeIntersect->x, 0.0f, a0->checkDist, sPlane.normal.y)) ||
((fabsf(sPlane.normal.z) > 0.5f) &&
Math3D_TriChkLineSegParaZDist(&sPolyVerts[0], &sPolyVerts[1], &sPolyVerts[2], a0->planeIntersect->x,
a0->planeIntersect->y, 0.0f, a0->checkDist, sPlane.normal.z))) {
Math3D_TriChkPointParaZImpl(&sPolyVerts[0], &sPolyVerts[1], &sPolyVerts[2], a0->planeIntersect->x,
a0->planeIntersect->y, 0.0f, a0->checkDist, sPlane.normal.z))) {
return true;
}
return false;
@ -453,7 +453,7 @@ s32 CollisionPoly_SphVsPoly(CollisionPoly* poly, Vec3s* vtxList, Vec3f* center,
sSphere.center.y = center->y;
sSphere.center.z = center->z;
sSphere.radius = radius;
return Math3D_ColSphereTri(&sSphere, &sTri, &intersect);
return Math3D_TriVsSphIntersect(&sSphere, &sTri, &intersect);
}
/**
@ -3825,7 +3825,7 @@ s32 BgCheck_CheckLineAgainstDyna(CollisionContext* colCtx, u16 xpFlags, Vec3f* p
s32 pad;
s32 i;
s32 result = false;
LineSegment line;
Linef line;
f32 ay;
f32 by;

View File

@ -1240,7 +1240,7 @@ s32 func_800CD44C(Camera* camera, VecGeo* diffGeo, CameraCollision* camEyeCollis
// different bgIds for at->eye[Next] and eye[Next]->at
ret = 3;
} else {
cosEyeAt = Math3D_Parallel(&camEyeCollision->norm, &camAtCollision->norm);
cosEyeAt = Math3D_Cos(&camEyeCollision->norm, &camAtCollision->norm);
if (cosEyeAt < -0.5f) {
ret = 6;
} else if ((cosEyeAt > 0.5f) || (checkEye & 2)) {
@ -1822,20 +1822,18 @@ void Camera_CalcDefaultSwing(Camera* camera, VecGeo* arg1, VecGeo* arg2, f32 arg
if (swing->unk_64 == 1) {
if (arg3 < (sp88 = OLib_Vec3fDist(at, &swing->collisionClosePoint))) {
swing->unk_64 = 0;
} else if ((sp88 = Math3D_SignedDistanceFromPlane(swing->eyeAtColChk.norm.x, swing->eyeAtColChk.norm.y,
swing->eyeAtColChk.norm.z, swing->eyeAtColChk.poly->dist,
at)) > 0.0f) {
} else if ((sp88 = Math3D_PlaneF(swing->eyeAtColChk.norm.x, swing->eyeAtColChk.norm.y,
swing->eyeAtColChk.norm.z, swing->eyeAtColChk.poly->dist, at)) > 0.0f) {
swing->unk_64 = 0;
} else if ((sp88 = OLib_Vec3fDist(eye, &swing->eyeAtColChk.pos)) < 10.0f) {
swing->unk_64 = 0;
} else if ((sp88 = Math3D_SignedDistanceFromPlane(swing->atEyeColChk.norm.x, swing->atEyeColChk.norm.y,
swing->atEyeColChk.norm.z, swing->atEyeColChk.poly->dist,
eye)) > 0.0f) {
} else if ((sp88 = Math3D_PlaneF(swing->atEyeColChk.norm.x, swing->atEyeColChk.norm.y,
swing->atEyeColChk.norm.z, swing->atEyeColChk.poly->dist, eye)) > 0.0f) {
swing->unk_64 = 0;
} else if (swing->atEyeColChk.norm.y > 0.50f) {
swing->unk_64 = 0;
} else {
Math3D_AngleBetweenVectors(&camera->unk_0F0, &swing->eyeAtColChk.norm, &sp88);
Math3D_CosOut(&camera->unk_0F0, &swing->eyeAtColChk.norm, &sp88);
if (sp88 > 0.0f) {
swing->unk_64 = 0;
}
@ -5415,8 +5413,8 @@ s32 Camera_Unique0(Camera* camera) {
switch (camera->animState) {
case 0:
bgCamFuncData = (BgCamFuncData*)Camera_GetBgCamOrActorCsCamFuncData(camera, camera->bgCamIndex);
rwData->unk_1C = Camera_Vec3sToVec3f(&bgCamFuncData->pos);
camera->eye = camera->eyeNext = rwData->unk_1C;
rwData->unk_1C.point = Camera_Vec3sToVec3f(&bgCamFuncData->pos);
camera->eye = camera->eyeNext = rwData->unk_1C.point;
rwData->unk_34 = bgCamFuncData->rot;
temp_v1 = bgCamFuncData->fov;
@ -5447,7 +5445,7 @@ s32 Camera_Unique0(Camera* camera) {
}
rwData->unk_3A = camera->focalActor->world.rot.y;
rwData->unk_3E = 0;
camera->eye = camera->eyeNext = rwData->unk_1C;
camera->eye = camera->eyeNext = rwData->unk_1C.point;
Camera_UnsetStateFlag(camera, CAM_STATE_2);
camera->animState++;
// fallthrough
@ -5455,8 +5453,8 @@ s32 Camera_Unique0(Camera* camera) {
sp84.r = OLib_Vec3fDist(&sp8C, &camera->eye);
sp84.yaw = rwData->unk_34.y;
sp84.pitch = -rwData->unk_34.x;
rwData->unk_28 = OLib_VecGeoToVec3f(&sp84);
func_80179A44(&rwData->unk_1C, focalActorPosRot, &rwData->unk_0C);
rwData->unk_1C.dir = OLib_VecGeoToVec3f(&sp84);
Math3D_LineClosestToPoint(&rwData->unk_1C, &focalActorPosRot->pos, &rwData->unk_0C);
camera->at = rwData->unk_0C;
if (player->stateFlags1 & PLAYER_STATE1_20000000) {

View File

@ -17,14 +17,14 @@ Vec3f D_801EDE20;
Vec3f D_801EDE30;
TriNorm D_801EDE40;
TriNorm D_801EDE78;
LineSegment D_801EDEB0;
Linef D_801EDEB0;
TriNorm D_801EDEC8;
TriNorm D_801EDF00;
Vec3f D_801EDF38;
Vec3f D_801EDF48;
TriNorm D_801EDF58;
TriNorm D_801EDF90;
LineSegment D_801EDFC8;
Linef D_801EDFC8;
Vec3f D_801EDFE0;
Vec3f D_801EDFF0;
TriNorm D_801EE000;
@ -631,7 +631,7 @@ s32 Collider_SetTrisElementDim(PlayState* play, TriNorm* dim, ColliderTrisElemen
*destVtx = *srcVtx;
}
Math3D_UnitNormalVector(&src->vtx[0], &src->vtx[1], &src->vtx[2], &nx, &ny, &nz, &originDist);
Math3D_DefPlane(&src->vtx[0], &src->vtx[1], &src->vtx[2], &nx, &ny, &nz, &originDist);
dim->plane.normal.x = nx;
dim->plane.normal.y = ny;
@ -1745,8 +1745,8 @@ void CollisionCheck_AC_JntSphVsJntSph(PlayState* play, CollisionCheckContext* co
continue;
}
if (Math3D_ColSphereSphereIntersectAndDistance(&atElem->dim.worldSphere, &acElem->dim.worldSphere,
&overlapSize, &centerDist) != 0) {
if (Math3D_SphVsSphOverlapCenterDist(&atElem->dim.worldSphere, &acElem->dim.worldSphere, &overlapSize,
&centerDist) != 0) {
f32 acToHit;
Vec3f hitPos;
Vec3f atPos;
@ -1796,8 +1796,7 @@ void CollisionCheck_AC_JntSphVsCyl(PlayState* play, CollisionCheckContext* colCt
if (CollisionCheck_NoSharedFlags(&atElem->info, &ac->info)) {
continue;
}
if (Math3D_ColSphereCylinderDistanceAndAmount(&atElem->dim.worldSphere, &ac->dim, &overlapSize,
&centerDist)) {
if (Math3D_SphVsCylOverlapCenterDist(&atElem->dim.worldSphere, &ac->dim, &overlapSize, &centerDist)) {
Vec3f hitPos;
Vec3f atPos;
Vec3f acPos;
@ -1846,7 +1845,7 @@ void CollisionCheck_AC_JntSphVsTris(PlayState* play, CollisionCheckContext* colC
if (CollisionCheck_NoSharedFlags(&atElem->info, &acElem->info)) {
continue;
}
if (Math3D_ColSphereTri(&atElem->dim.worldSphere, &acElem->dim, &hitPos) != 0) {
if (Math3D_TriVsSphIntersect(&atElem->dim.worldSphere, &acElem->dim, &hitPos) != 0) {
Vec3f atPos;
Vec3f acPos;
@ -1874,8 +1873,8 @@ void CollisionCheck_AC_JntSphVsQuad(PlayState* play, CollisionCheckContext* colC
if (CollisionCheck_SkipBump(&ac->info)) {
return;
}
Math3D_TriSetCoords(&D_801EF590, &ac->dim.quad[2], &ac->dim.quad[3], &ac->dim.quad[1]);
Math3D_TriSetCoords(&D_801EF5C8, &ac->dim.quad[1], &ac->dim.quad[0], &ac->dim.quad[2]);
Math3D_TriNorm(&D_801EF590, &ac->dim.quad[2], &ac->dim.quad[3], &ac->dim.quad[1]);
Math3D_TriNorm(&D_801EF5C8, &ac->dim.quad[1], &ac->dim.quad[0], &ac->dim.quad[2]);
for (sphElem = at->elements; sphElem < &at->elements[at->count]; sphElem++) {
if (CollisionCheck_SkipTouch(&sphElem->info)) {
@ -1884,8 +1883,8 @@ void CollisionCheck_AC_JntSphVsQuad(PlayState* play, CollisionCheckContext* colC
if (CollisionCheck_NoSharedFlags(&sphElem->info, &ac->info)) {
continue;
}
if (Math3D_ColSphereTri(&sphElem->dim.worldSphere, &D_801EF590, &hitPos) != 0 ||
Math3D_ColSphereTri(&sphElem->dim.worldSphere, &D_801EF5C8, &hitPos) != 0) {
if (Math3D_TriVsSphIntersect(&sphElem->dim.worldSphere, &D_801EF590, &hitPos) != 0 ||
Math3D_TriVsSphIntersect(&sphElem->dim.worldSphere, &D_801EF5C8, &hitPos) != 0) {
Vec3f atPos;
Vec3f acPos;
@ -1921,8 +1920,8 @@ void CollisionCheck_AC_JntSphVsSphere(PlayState* play, CollisionCheckContext* co
if (CollisionCheck_NoSharedFlags(&sphElem->info, &ac->info)) {
continue;
}
if (Math3D_ColSphereSphereIntersectAndDistance(&sphElem->dim.worldSphere, &ac->dim.worldSphere,
&overlapSize, &centerDist) != 0) {
if (Math3D_SphVsSphOverlapCenterDist(&sphElem->dim.worldSphere, &ac->dim.worldSphere, &overlapSize,
&centerDist) != 0) {
f32 acToHit;
Vec3f hitPos;
Vec3f atPos;
@ -1966,8 +1965,7 @@ void CollisionCheck_AC_CylVsJntSph(PlayState* play, CollisionCheckContext* colCt
if (CollisionCheck_NoSharedFlags(&at->info, &sphElem->info)) {
continue;
}
if (Math3D_ColSphereCylinderDistanceAndAmount(&sphElem->dim.worldSphere, &at->dim, &overlapSize,
&centerDist) != 0) {
if (Math3D_SphVsCylOverlapCenterDist(&sphElem->dim.worldSphere, &at->dim, &overlapSize, &centerDist) != 0) {
Vec3f hitPos;
Vec3f atPos;
Vec3f acPos;
@ -2017,7 +2015,7 @@ void CollisionCheck_AC_CylVsCyl(PlayState* play, CollisionCheckContext* colCtxt,
return;
}
if (Math3D_ColCylinderCylinderAmountAndDistance(&at->dim, &ac->dim, &overlapSize, &centerDist) != 0) {
if (Math3D_CylVsCylOverlapCenterDist(&at->dim, &ac->dim, &overlapSize, &centerDist) != 0) {
Vec3f hitPos;
Vec3f atPos;
Vec3f acPos;
@ -2071,7 +2069,7 @@ void CollisionCheck_AC_CylVsTris(PlayState* play, CollisionCheckContext* colCtxt
continue;
}
if (Math3D_ColCylinderTri(&at->dim, &acElem->dim, &hitPos) != 0) {
if (Math3D_CylTriVsIntersect(&at->dim, &acElem->dim, &hitPos) != 0) {
Vec3f atPos;
Vec3f acPos;
@ -2101,17 +2099,17 @@ void CollisionCheck_AC_CylVsQuad(PlayState* play, CollisionCheckContext* colCtxt
if (CollisionCheck_NoSharedFlags(&at->info, &ac->info)) {
return;
}
Math3D_TriSetCoords(&D_801EF600, &ac->dim.quad[2], &ac->dim.quad[3], &ac->dim.quad[1]);
Math3D_TriSetCoords(&D_801EF638, &ac->dim.quad[1], &ac->dim.quad[0], &ac->dim.quad[2]);
Math3D_TriNorm(&D_801EF600, &ac->dim.quad[2], &ac->dim.quad[3], &ac->dim.quad[1]);
Math3D_TriNorm(&D_801EF638, &ac->dim.quad[1], &ac->dim.quad[0], &ac->dim.quad[2]);
if (Math3D_ColCylinderTri(&at->dim, &D_801EF600, &D_801EDE00) != 0) {
if (Math3D_CylTriVsIntersect(&at->dim, &D_801EF600, &D_801EDE00) != 0) {
Vec3f atPos;
Vec3f acPos;
Math_Vec3s_ToVec3f(&atPos, &at->dim.pos);
CollisionCheck_QuadAvgPoint(ac, &acPos);
CollisionCheck_SetATvsAC(play, &at->base, &at->info, &atPos, &ac->base, &ac->info, &acPos, &D_801EDE00);
} else if (Math3D_ColCylinderTri(&at->dim, &D_801EF638, &D_801EDE00) != 0) {
} else if (Math3D_CylTriVsIntersect(&at->dim, &D_801EF638, &D_801EDE00) != 0) {
Vec3f atPos;
Vec3f acPos;
@ -2142,7 +2140,7 @@ void CollisionCheck_AC_CylVsSphere(PlayState* play, CollisionCheckContext* colCt
return;
}
if (Math3D_ColSphereCylinderDistanceAndAmount(&ac->dim.worldSphere, &at->dim, &overlapSize, &centerDist) != 0) {
if (Math3D_SphVsCylOverlapCenterDist(&ac->dim.worldSphere, &at->dim, &overlapSize, &centerDist) != 0) {
Vec3f hitPos;
Vec3f atPos;
Vec3f acPos;
@ -2190,7 +2188,7 @@ void CollisionCheck_AC_TrisVsJntSph(PlayState* play, CollisionCheckContext* colC
if (CollisionCheck_NoSharedFlags(&atElem->info, &acElem->info)) {
continue;
}
if (Math3D_ColSphereTri(&acElem->dim.worldSphere, &atElem->dim, &hitPos)) {
if (Math3D_TriVsSphIntersect(&acElem->dim.worldSphere, &atElem->dim, &hitPos)) {
Vec3f atPos;
Vec3f acPos;
@ -2227,7 +2225,7 @@ void CollisionCheck_AC_TrisVsCyl(PlayState* play, CollisionCheckContext* colCtxt
if (CollisionCheck_NoSharedFlags(&atElem->info, &ac->info)) {
continue;
}
if (Math3D_ColCylinderTri(&ac->dim, &atElem->dim, &D_801EDE10) != 0) {
if (Math3D_CylTriVsIntersect(&ac->dim, &atElem->dim, &D_801EDE10) != 0) {
Vec3f atPos;
Vec3f acPos;
@ -2262,7 +2260,7 @@ void CollisionCheck_AC_TrisVsTris(PlayState* play, CollisionCheckContext* colCtx
if (CollisionCheck_NoSharedFlags(&atElem->info, &acElem->info)) {
continue;
}
if (Math3d_ColTriTri(&atElem->dim, &acElem->dim, &D_801EDE20) != 0) {
if (Math3D_TriVsTriIntersect(&atElem->dim, &acElem->dim, &D_801EDE20) != 0) {
Vec3f atPos;
Vec3f acPos;
@ -2290,8 +2288,8 @@ void CollisionCheck_AC_TrisVsQuad(PlayState* play, CollisionCheckContext* colCtx
return;
}
Math3D_TriSetCoords(&D_801EDE40, &ac->dim.quad[2], &ac->dim.quad[3], &ac->dim.quad[1]);
Math3D_TriSetCoords(&D_801EDE78, &ac->dim.quad[1], &ac->dim.quad[0], &ac->dim.quad[2]);
Math3D_TriNorm(&D_801EDE40, &ac->dim.quad[2], &ac->dim.quad[3], &ac->dim.quad[1]);
Math3D_TriNorm(&D_801EDE78, &ac->dim.quad[1], &ac->dim.quad[0], &ac->dim.quad[2]);
for (atElem = at->elements; atElem < &at->elements[at->count]; atElem++) {
if (CollisionCheck_SkipTouch(&atElem->info)) {
@ -2300,8 +2298,8 @@ void CollisionCheck_AC_TrisVsQuad(PlayState* play, CollisionCheckContext* colCtx
if (CollisionCheck_NoSharedFlags(&atElem->info, &ac->info)) {
continue;
}
if (Math3d_ColTriTri(&D_801EDE40, &atElem->dim, &D_801EDE30) != 0 ||
Math3d_ColTriTri(&D_801EDE78, &atElem->dim, &D_801EDE30) != 0) {
if (Math3D_TriVsTriIntersect(&D_801EDE40, &atElem->dim, &D_801EDE30) != 0 ||
Math3D_TriVsTriIntersect(&D_801EDE78, &atElem->dim, &D_801EDE30) != 0) {
Vec3f atPos;
Vec3f acPos;
@ -2335,7 +2333,7 @@ void CollisionCheck_AC_TrisVsSphere(PlayState* play, CollisionCheckContext* colC
if (CollisionCheck_NoSharedFlags(&atElem->info, &ac->info)) {
continue;
}
if (Math3D_ColSphereTri(&ac->dim.worldSphere, &atElem->dim, &hitPos) != 0) {
if (Math3D_TriVsSphIntersect(&ac->dim.worldSphere, &atElem->dim, &hitPos) != 0) {
Vec3f atPos;
Vec3f acPos;
@ -2360,8 +2358,8 @@ void CollisionCheck_AC_QuadVsJntSph(PlayState* play, CollisionCheckContext* colC
if (CollisionCheck_SkipTouch(&at->info)) {
return;
}
Math3D_TriSetCoords(&D_801EDEC8, &at->dim.quad[2], &at->dim.quad[3], &at->dim.quad[1]);
Math3D_TriSetCoords(&D_801EDF00, &at->dim.quad[2], &at->dim.quad[1], &at->dim.quad[0]);
Math3D_TriNorm(&D_801EDEC8, &at->dim.quad[2], &at->dim.quad[3], &at->dim.quad[1]);
Math3D_TriNorm(&D_801EDF00, &at->dim.quad[2], &at->dim.quad[1], &at->dim.quad[0]);
for (acElem = ac->elements; acElem < &ac->elements[ac->count]; acElem++) {
if (CollisionCheck_SkipBump(&acElem->info)) {
@ -2370,8 +2368,8 @@ void CollisionCheck_AC_QuadVsJntSph(PlayState* play, CollisionCheckContext* colC
if (CollisionCheck_NoSharedFlags(&at->info, &acElem->info)) {
continue;
}
if (Math3D_ColSphereTri(&acElem->dim.worldSphere, &D_801EDEC8, &hitPos) != 0 ||
Math3D_ColSphereTri(&acElem->dim.worldSphere, &D_801EDF00, &hitPos) != 0) {
if (Math3D_TriVsSphIntersect(&acElem->dim.worldSphere, &D_801EDEC8, &hitPos) != 0 ||
Math3D_TriVsSphIntersect(&acElem->dim.worldSphere, &D_801EDF00, &hitPos) != 0) {
Vec3f atPos;
Vec3f acPos;
@ -2408,10 +2406,10 @@ void CollisionCheck_AC_QuadVsCyl(PlayState* play, CollisionCheckContext* colCtxt
return;
}
Math3D_TriSetCoords(&D_801EDF58, &at->dim.quad[2], &at->dim.quad[3], &at->dim.quad[1]);
Math3D_TriSetCoords(&D_801EDF90, &at->dim.quad[2], &at->dim.quad[1], &at->dim.quad[0]);
Math3D_TriNorm(&D_801EDF58, &at->dim.quad[2], &at->dim.quad[3], &at->dim.quad[1]);
Math3D_TriNorm(&D_801EDF90, &at->dim.quad[2], &at->dim.quad[1], &at->dim.quad[0]);
if (Math3D_ColCylinderTri(&ac->dim, &D_801EDF58, &D_801EDFE0) != 0) {
if (Math3D_CylTriVsIntersect(&ac->dim, &D_801EDF58, &D_801EDFE0) != 0) {
if (Collider_QuadSetNearestAC(play, at, &D_801EDFE0)) {
Vec3f atPos;
Vec3f acPos;
@ -2422,7 +2420,7 @@ void CollisionCheck_AC_QuadVsCyl(PlayState* play, CollisionCheckContext* colCtxt
return;
}
}
if (Math3D_ColCylinderTri(&ac->dim, &D_801EDF90, &D_801EDFE0) != 0) {
if (Math3D_CylTriVsIntersect(&ac->dim, &D_801EDF90, &D_801EDFE0) != 0) {
if (Collider_QuadSetNearestAC(play, at, &D_801EDFE0)) {
Vec3f atPos;
Vec3f acPos;
@ -2448,8 +2446,8 @@ void CollisionCheck_AC_QuadVsTris(PlayState* play, CollisionCheckContext* colCtx
return;
}
Math3D_TriSetCoords(&D_801EE000, &at->dim.quad[2], &at->dim.quad[3], &at->dim.quad[1]);
Math3D_TriSetCoords(&D_801EE038, &at->dim.quad[1], &at->dim.quad[0], &at->dim.quad[2]);
Math3D_TriNorm(&D_801EE000, &at->dim.quad[2], &at->dim.quad[3], &at->dim.quad[1]);
Math3D_TriNorm(&D_801EE038, &at->dim.quad[1], &at->dim.quad[0], &at->dim.quad[2]);
for (acElem = ac->elements; acElem < &ac->elements[ac->count]; acElem++) {
if (CollisionCheck_SkipBump(&acElem->info)) {
@ -2459,8 +2457,8 @@ void CollisionCheck_AC_QuadVsTris(PlayState* play, CollisionCheckContext* colCtx
continue;
}
if ((Math3d_ColTriTri(&D_801EE000, &acElem->dim, &D_801EDFF0) != 0) ||
(Math3d_ColTriTri(&D_801EE038, &acElem->dim, &D_801EDFF0) != 0)) {
if ((Math3D_TriVsTriIntersect(&D_801EE000, &acElem->dim, &D_801EDFF0) != 0) ||
(Math3D_TriVsTriIntersect(&D_801EE038, &acElem->dim, &D_801EDFF0) != 0)) {
if (Collider_QuadSetNearestAC(play, at, &D_801EDFF0)) {
Vec3f atPos;
Vec3f acPos;
@ -2495,14 +2493,14 @@ void CollisionCheck_AC_QuadVsQuad(PlayState* play, CollisionCheckContext* colCtx
return;
}
Math3D_TriSetCoords(&D_801EE0E8[0], &at->dim.quad[2], &at->dim.quad[3], &at->dim.quad[1]);
Math3D_TriSetCoords(&D_801EE0E8[1], &at->dim.quad[2], &at->dim.quad[1], &at->dim.quad[0]);
Math3D_TriSetCoords(&D_801EE070[0], &ac->dim.quad[2], &ac->dim.quad[3], &ac->dim.quad[1]);
Math3D_TriSetCoords(&D_801EE070[1], &ac->dim.quad[2], &ac->dim.quad[1], &ac->dim.quad[0]);
Math3D_TriNorm(&D_801EE0E8[0], &at->dim.quad[2], &at->dim.quad[3], &at->dim.quad[1]);
Math3D_TriNorm(&D_801EE0E8[1], &at->dim.quad[2], &at->dim.quad[1], &at->dim.quad[0]);
Math3D_TriNorm(&D_801EE070[0], &ac->dim.quad[2], &ac->dim.quad[3], &ac->dim.quad[1]);
Math3D_TriNorm(&D_801EE070[1], &ac->dim.quad[2], &ac->dim.quad[1], &ac->dim.quad[0]);
for (i = 0; i < 2; i++) {
for (j = 0; j < 2; j++) {
if (Math3d_ColTriTri(&D_801EE0E8[j], &D_801EE070[i], &D_801EE0D8) != 0 &&
if (Math3D_TriVsTriIntersect(&D_801EE0E8[j], &D_801EE070[i], &D_801EE0D8) != 0 &&
Collider_QuadSetNearestAC(play, at, &D_801EE0D8) != 0) {
Vec3f atPos;
Vec3f acPos;
@ -2531,11 +2529,11 @@ void CollisionCheck_AC_QuadVsSphere(PlayState* play, CollisionCheckContext* colC
return;
}
Math3D_TriSetCoords(&D_801EE150, &at->dim.quad[2], &at->dim.quad[3], &at->dim.quad[1]);
Math3D_TriSetCoords(&D_801EE188, &at->dim.quad[2], &at->dim.quad[1], &at->dim.quad[0]);
Math3D_TriNorm(&D_801EE150, &at->dim.quad[2], &at->dim.quad[3], &at->dim.quad[1]);
Math3D_TriNorm(&D_801EE188, &at->dim.quad[2], &at->dim.quad[1], &at->dim.quad[0]);
if ((Math3D_ColSphereTri(&ac->dim.worldSphere, &D_801EE150, &hitPos) != 0) ||
(Math3D_ColSphereTri(&ac->dim.worldSphere, &D_801EE188, &hitPos) != 0)) {
if ((Math3D_TriVsSphIntersect(&ac->dim.worldSphere, &D_801EE150, &hitPos) != 0) ||
(Math3D_TriVsSphIntersect(&ac->dim.worldSphere, &D_801EE188, &hitPos) != 0)) {
if (Collider_QuadSetNearestAC(play, at, &hitPos)) {
Vec3f atPos;
Vec3f acPos;
@ -2571,8 +2569,8 @@ void CollisionCheck_AC_SphereVsJntSph(PlayState* play, CollisionCheckContext* co
continue;
}
if (Math3D_ColSphereSphereIntersectAndDistance(&at->dim.worldSphere, &acElem->dim.worldSphere, &overlapSize,
&centerDist) != 0) {
if (Math3D_SphVsSphOverlapCenterDist(&at->dim.worldSphere, &acElem->dim.worldSphere, &overlapSize,
&centerDist) != 0) {
f32 acToHit;
Vec3f hitPos;
Vec3f atPos;
@ -2614,7 +2612,7 @@ void CollisionCheck_AC_SphereVsCylinder(PlayState* play, CollisionCheckContext*
return;
}
if (Math3D_ColSphereCylinderDistanceAndAmount(&at->dim.worldSphere, &ac->dim, &overlapSize, &centerDist) != 0) {
if (Math3D_SphVsCylOverlapCenterDist(&at->dim.worldSphere, &ac->dim, &overlapSize, &centerDist) != 0) {
Vec3f hitPos;
Vec3f atPos;
Vec3f acPos;
@ -2661,7 +2659,7 @@ void CollisionCheck_AC_SphereVsTris(PlayState* play, CollisionCheckContext* colC
if (CollisionCheck_NoSharedFlags(&at->info, &acElem->info)) {
continue;
}
if (Math3D_ColSphereTri(&at->dim.worldSphere, &acElem->dim, &hitPos) != 0) {
if (Math3D_TriVsSphIntersect(&at->dim.worldSphere, &acElem->dim, &hitPos) != 0) {
Vec3f atPos;
Vec3f acPos;
@ -2688,11 +2686,11 @@ void CollisionCheck_AC_SphereVsQuad(PlayState* play, CollisionCheckContext* colC
return;
}
Math3D_TriSetCoords(&D_801EE6C8, &ac->dim.quad[2], &ac->dim.quad[3], &ac->dim.quad[1]);
Math3D_TriSetCoords(&D_801EE700, &ac->dim.quad[1], &ac->dim.quad[0], &ac->dim.quad[2]);
Math3D_TriNorm(&D_801EE6C8, &ac->dim.quad[2], &ac->dim.quad[3], &ac->dim.quad[1]);
Math3D_TriNorm(&D_801EE700, &ac->dim.quad[1], &ac->dim.quad[0], &ac->dim.quad[2]);
if (Math3D_ColSphereTri(&at->dim.worldSphere, &D_801EE6C8, &hitPos) != 0 ||
Math3D_ColSphereTri(&at->dim.worldSphere, &D_801EE700, &hitPos) != 0) {
if (Math3D_TriVsSphIntersect(&at->dim.worldSphere, &D_801EE6C8, &hitPos) != 0 ||
Math3D_TriVsSphIntersect(&at->dim.worldSphere, &D_801EE700, &hitPos) != 0) {
Vec3f atPos;
Vec3f acPos;
@ -2722,8 +2720,7 @@ void CollisionCheck_AC_SphereVsSphere(PlayState* play, CollisionCheckContext* co
return;
}
if (Math3D_ColSphereSphereIntersectAndDistance(&at->dim.worldSphere, &ac->dim.worldSphere, &overlapSize,
&centerDist) != 0) {
if (Math3D_SphVsSphOverlapCenterDist(&at->dim.worldSphere, &ac->dim.worldSphere, &overlapSize, &centerDist) != 0) {
f32 acToHit;
Vec3f hitPos;
Vec3f atPos;
@ -2940,8 +2937,8 @@ s32 CollisionCheck_GetMassType(u8 mass) {
* also performs an elastic collision where both colliders are moved apart in proportion to their masses.
*/
void CollisionCheck_SetOCvsOC(PlayState* play, Collider* left, ColliderInfo* leftInfo, Vec3f* leftPos, Collider* right,
ColliderInfo* rightInfo, Vec3f* rightPos, f32 overlap) {
s32 pad;
ColliderInfo* rightInfo, Vec3f* rightPos, f32 overlapSize) {
f32 pad;
f32 leftDispRatio;
f32 rightDispRatio;
f32 xzDist;
@ -3020,15 +3017,15 @@ void CollisionCheck_SetOCvsOC(PlayState* play, Collider* left, ColliderInfo* lef
}
if (!IS_ZERO(xzDist)) {
xDelta *= overlap / xzDist;
zDelta *= overlap / xzDist;
xDelta *= overlapSize / xzDist;
zDelta *= overlapSize / xzDist;
leftActor->colChkInfo.displacement.x += -xDelta * leftDispRatio;
leftActor->colChkInfo.displacement.z += -zDelta * leftDispRatio;
rightActor->colChkInfo.displacement.x += xDelta * rightDispRatio;
rightActor->colChkInfo.displacement.z += zDelta * rightDispRatio;
} else if (overlap != 0.0f) {
leftActor->colChkInfo.displacement.x += -overlap * leftDispRatio;
rightActor->colChkInfo.displacement.x += overlap * rightDispRatio;
} else if (overlapSize != 0.0f) {
leftActor->colChkInfo.displacement.x += -overlapSize * leftDispRatio;
rightActor->colChkInfo.displacement.x += overlapSize * rightDispRatio;
} else {
leftActor->colChkInfo.displacement.x += -leftDispRatio;
rightActor->colChkInfo.displacement.x += rightDispRatio;
@ -3043,7 +3040,7 @@ void CollisionCheck_OC_JntSphVsJntSph(PlayState* play, CollisionCheckContext* co
ColliderJntSph* right = (ColliderJntSph*)r;
ColliderJntSphElement* leftElem;
ColliderJntSphElement* rightElem;
f32 overlap;
f32 overlapSize;
if ((left->count > 0) && (left->elements != NULL) && (right->count > 0) && (right->elements != NULL) &&
(left->base.ocFlags1 & OCELEM_ON) && (right->base.ocFlags1 & OCELEM_ON)) {
@ -3056,15 +3053,15 @@ void CollisionCheck_OC_JntSphVsJntSph(PlayState* play, CollisionCheckContext* co
if (!(rightElem->info.ocElemFlags & OCELEM_ON)) {
continue;
}
if (Math3D_ColSphereSphereIntersect(&leftElem->dim.worldSphere, &rightElem->dim.worldSphere,
&overlap) != 0) {
if (Math3D_SphVsSphOverlap(&leftElem->dim.worldSphere, &rightElem->dim.worldSphere, &overlapSize) !=
0) {
Vec3f leftPos;
Vec3f rightPos;
Math_Vec3s_ToVec3f(&leftPos, &leftElem->dim.worldSphere.center);
Math_Vec3s_ToVec3f(&rightPos, &rightElem->dim.worldSphere.center);
CollisionCheck_SetOCvsOC(play, &left->base, &leftElem->info, &leftPos, &right->base,
&rightElem->info, &rightPos, overlap);
&rightElem->info, &rightPos, overlapSize);
}
}
}
@ -3078,7 +3075,7 @@ void CollisionCheck_OC_JntSphVsCyl(PlayState* play, CollisionCheckContext* colCt
ColliderJntSph* left = (ColliderJntSph*)l;
ColliderCylinder* right = (ColliderCylinder*)r;
ColliderJntSphElement* leftElem;
f32 overlap;
f32 overlapSize;
if ((left->count > 0) && (left->elements != NULL) && (left->base.ocFlags1 & OCELEM_ON) &&
(right->base.ocFlags1 & OCELEM_ON) && (right->info.ocElemFlags & OCELEM_ON)) {
@ -3087,14 +3084,14 @@ void CollisionCheck_OC_JntSphVsCyl(PlayState* play, CollisionCheckContext* colCt
if (!(leftElem->info.ocElemFlags & OCELEM_ON)) {
continue;
}
if (Math3D_ColSphereCylinderDistance(&leftElem->dim.worldSphere, &right->dim, &overlap) != 0) {
if (Math3D_SphVsCylOverlap(&leftElem->dim.worldSphere, &right->dim, &overlapSize) != 0) {
Vec3f leftPos;
Vec3f rightPos;
Math_Vec3s_ToVec3f(&leftPos, &leftElem->dim.worldSphere.center);
Math_Vec3s_ToVec3f(&rightPos, &right->dim.pos);
CollisionCheck_SetOCvsOC(play, &left->base, &leftElem->info, &leftPos, &right->base, &right->info,
&rightPos, overlap);
&rightPos, overlapSize);
}
}
}
@ -3107,7 +3104,7 @@ void CollisionCheck_OC_JntSphVsSphere(PlayState* play, CollisionCheckContext* co
ColliderJntSph* left = (ColliderJntSph*)l;
ColliderSphere* right = (ColliderSphere*)r;
ColliderJntSphElement* leftElem;
f32 overlap;
f32 overlapSize;
if ((left->count > 0) && (left->elements != NULL) && (left->base.ocFlags1 & OCELEM_ON) &&
(right->base.ocFlags1 & OCELEM_ON) && (right->info.ocElemFlags & OCELEM_ON)) {
@ -3116,14 +3113,14 @@ void CollisionCheck_OC_JntSphVsSphere(PlayState* play, CollisionCheckContext* co
if (!(leftElem->info.ocElemFlags & OCELEM_ON)) {
continue;
}
if (Math3D_ColSphereSphereIntersect(&leftElem->dim.worldSphere, &right->dim.worldSphere, &overlap) != 0) {
if (Math3D_SphVsSphOverlap(&leftElem->dim.worldSphere, &right->dim.worldSphere, &overlapSize) != 0) {
Vec3f leftPos;
Vec3f rightPos;
Math_Vec3s_ToVec3f(&leftPos, &leftElem->dim.worldSphere.center);
Math_Vec3s_ToVec3f(&rightPos, &right->dim.worldSphere.center);
CollisionCheck_SetOCvsOC(play, &left->base, &leftElem->info, &leftPos, &right->base, &right->info,
&rightPos, overlap);
&rightPos, overlapSize);
}
}
}
@ -3142,18 +3139,18 @@ void CollisionCheck_OC_CylVsJntSph(PlayState* play, CollisionCheckContext* colCt
void CollisionCheck_OC_CylVsCyl(PlayState* play, CollisionCheckContext* colCtxt, Collider* l, Collider* r) {
ColliderCylinder* left = (ColliderCylinder*)l;
ColliderCylinder* right = (ColliderCylinder*)r;
f32 overlap;
f32 overlapSize;
if ((left->base.ocFlags1 & OCELEM_ON) && (right->base.ocFlags1 & OCELEM_ON) &&
(left->info.ocElemFlags & OCELEM_ON) && (right->info.ocElemFlags & OCELEM_ON)) {
if (Math3D_ColCylinderCylinderAmount(&left->dim, &right->dim, &overlap) != 0) {
if (Math3D_CylVsCylOverlap(&left->dim, &right->dim, &overlapSize) != 0) {
Vec3f leftPos;
Vec3f rightPos;
Math_Vec3s_ToVec3f(&leftPos, &left->dim.pos);
Math_Vec3s_ToVec3f(&rightPos, &right->dim.pos);
CollisionCheck_SetOCvsOC(play, &left->base, &left->info, &leftPos, &right->base, &right->info, &rightPos,
overlap);
overlapSize);
}
}
}
@ -3164,18 +3161,18 @@ void CollisionCheck_OC_CylVsCyl(PlayState* play, CollisionCheckContext* colCtxt,
void CollisionCheck_OC_CylVsSphere(PlayState* play, CollisionCheckContext* colCtxt, Collider* l, Collider* r) {
ColliderCylinder* left = (ColliderCylinder*)l;
ColliderSphere* right = (ColliderSphere*)r;
f32 overlap;
f32 overlapSize;
if ((left->base.ocFlags1 & OCELEM_ON) && (left->info.ocElemFlags & OCELEM_ON) &&
(right->base.ocFlags1 & OCELEM_ON) && (right->info.ocElemFlags & OCELEM_ON)) {
if (Math3D_ColSphereCylinderDistance(&right->dim.worldSphere, &left->dim, &overlap) != 0) {
if (Math3D_SphVsCylOverlap(&right->dim.worldSphere, &left->dim, &overlapSize) != 0) {
Vec3f leftPos;
Vec3f rightPos;
Math_Vec3s_ToVec3f(&leftPos, &left->dim.pos);
Math_Vec3s_ToVec3f(&rightPos, &right->dim.worldSphere.center);
CollisionCheck_SetOCvsOC(play, &left->base, &left->info, &leftPos, &right->base, &right->info, &rightPos,
overlap);
overlapSize);
}
}
}
@ -3200,18 +3197,18 @@ void CollisionCheck_OC_SphereVsCyl(PlayState* play, CollisionCheckContext* colCt
void CollisionCheck_OC_SphereVsSphere(PlayState* play, CollisionCheckContext* colCtxt, Collider* l, Collider* r) {
ColliderSphere* left = (ColliderSphere*)l;
ColliderSphere* right = (ColliderSphere*)r;
f32 overlap;
f32 overlapSize;
if ((left->base.ocFlags1 & OCELEM_ON) && (left->info.ocElemFlags & OCELEM_ON) &&
(right->base.ocFlags1 & OCELEM_ON) && (right->info.ocElemFlags & OCELEM_ON)) {
if (Math3D_ColSphereSphereIntersect(&left->dim.worldSphere, &right->dim.worldSphere, &overlap) != 0) {
if (Math3D_SphVsSphOverlap(&left->dim.worldSphere, &right->dim.worldSphere, &overlapSize) != 0) {
Vec3f leftPos;
Vec3f rightPos;
Math_Vec3s_ToVec3f(&leftPos, &left->dim.worldSphere.center);
Math_Vec3s_ToVec3f(&rightPos, &right->dim.worldSphere.center);
CollisionCheck_SetOCvsOC(play, &left->base, &left->info, &leftPos, &right->base, &right->info, &rightPos,
overlap);
overlapSize);
}
}
}
@ -3509,7 +3506,7 @@ s32 CollisionCheck_LineOC_Cyl(PlayState* play, CollisionCheckContext* colChkCtx,
return 0;
}
if (func_8017E350(&cylinder->dim, a, b, &D_801EDF38, &D_801EDF48) != 0) {
if (Math3D_CylVsLineSeg(&cylinder->dim, a, b, &D_801EDF38, &D_801EDF48) != 0) {
return 1;
}
@ -3640,7 +3637,7 @@ void Collider_SetTrisVertices(ColliderTris* collider, s32 index, Vec3f* a, Vec3f
Math_Vec3f_Copy(&element->dim.vtx[0], a);
Math_Vec3f_Copy(&element->dim.vtx[1], b);
Math_Vec3f_Copy(&element->dim.vtx[2], c);
Math3D_UnitNormalVector(a, b, c, &nx, &ny, &nz, &originDist);
Math3D_DefPlane(a, b, c, &nx, &ny, &nz, &originDist);
element->dim.plane.normal.x = nx;
element->dim.plane.normal.y = ny;
element->dim.plane.normal.z = nz;

View File

@ -286,8 +286,8 @@ void EffectBlure_UpdateFlags(EffectBlureElement* elem) {
Math_Vec3s_DiffToVec3f(&sp4C, &next->p1, &elem->p1);
Math_Vec3s_DiffToVec3f(&sp40, &next->p2, &elem->p2);
if (Math3D_AngleBetweenVectors(&sp64, &sp4C, &sp34) || Math3D_AngleBetweenVectors(&sp58, &sp40, &sp30) ||
Math3D_AngleBetweenVectors(&sp4C, &sp40, &sp2C)) {
if (Math3D_CosOut(&sp64, &sp4C, &sp34) || Math3D_CosOut(&sp58, &sp40, &sp30) ||
Math3D_CosOut(&sp4C, &sp40, &sp2C)) {
elem->flags &= ~(EFFECT_BLURE_ELEMENT_FLAG_1 | EFFECT_BLURE_ELEMENT_FLAG_2);
elem->flags |= 0;
} else if ((sp34 <= -0.5f) || (sp30 <= -0.5f) || (sp2C <= 0.7071f)) {

View File

@ -59,8 +59,8 @@ void func_800AE930(CollisionContext* colCtx, EffectTireMark* this, Vec3f* pos, f
sp48.y = spB8.y;
sp48.z = spB8.z;
if ((func_80179798(&sp84, &sp90, &sp54, &sp60, &sp6C, &sp30) != 0) &&
(func_80179798(&sp84, &sp90, &sp3C, &sp48, &sp78, &sp30) != 0)) {
if (Math3D_LineSegMakePerpLineSeg(&sp84, &sp90, &sp54, &sp60, &sp6C, &sp30) &&
Math3D_LineSegMakePerpLineSeg(&sp84, &sp90, &sp3C, &sp48, &sp78, &sp30)) {
if (!(spAC->flags & EFFECT_TIRE_MARK_ELEMENT_FLAG_2)) {
spAC->flags |= EFFECT_TIRE_MARK_ELEMENT_FLAG_1;
}

View File

@ -15,6 +15,7 @@
#include "libc64/sleep.h"
#include "libc64/malloc.h"
#include "macros.h"
#include "z64math.h"
Gfx sTransTileSetupDL[] = {
gsDPPipeSync(),

View File

@ -114,7 +114,7 @@ void FireObj_UpdateStateTransitions(PlayState* play, FireObj* fire) {
}
if ((fire->flags & FIRE_FLAG_INTERACT_STICK) && (player->heldItemAction == PLAYER_IA_DEKU_STICK)) {
Math_Vec3f_Diff(&player->meleeWeaponInfo[0].tip, &fire->position, &dist);
if (Math3D_LengthSquared(&dist) < SQ(20.0f)) {
if (Math3D_Vec3fMagnitudeSq(&dist) < SQ(20.0f)) {
sp40 = true;
}
}

View File

@ -1880,7 +1880,7 @@ void Environment_DrawLensFlare(PlayState* play, EnvironmentContext* envCtx, View
OPEN_DISPS(gfxCtx);
dist = Math3D_Distance(&pos, &view->eye) / 12.0f;
dist = Math3D_Vec3f_DistXYZ(&pos, &view->eye) / 12.0f;
// compute a unit vector in the look direction
tempX = view->at.x - view->eye.x;

View File

@ -1681,7 +1681,7 @@ s32 Play_SetCameraAtEye(PlayState* this, s16 camId, Vec3f* at, Vec3f* eye) {
successfullySet <<= 1;
successfullySet |= Camera_SetViewParam(camera, CAM_VIEW_EYE, eye);
camera->dist = Math3D_Distance(at, eye);
camera->dist = Math3D_Vec3f_DistXYZ(at, eye);
if (camera->focalActor != NULL) {
camera->focalActorAtOffset.x = at->x - camera->focalActor->world.pos.x;
@ -1710,7 +1710,7 @@ s32 Play_SetCameraAtEyeUp(PlayState* this, s16 camId, Vec3f* at, Vec3f* eye, Vec
successfullySet <<= 1;
successfullySet |= Camera_SetViewParam(camera, CAM_VIEW_UP, up);
camera->dist = Math3D_Distance(at, eye);
camera->dist = Math3D_Vec3f_DistXYZ(at, eye);
if (camera->focalActor != NULL) {
camera->focalActorAtOffset.x = at->x - camera->focalActor->world.pos.x;

View File

@ -578,7 +578,7 @@ s32 SubS_HasReachedPoint(Actor* actor, Path* path, s32 pointIndex) {
diffZ = points[index + 1].z - points[index - 1].z;
}
func_8017B7F8(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
Math3D_RotateXZPlane(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
if (((px * actor->world.pos.x) + (pz * actor->world.pos.z) + d) > 0.0f) {
reached = true;
@ -1328,8 +1328,8 @@ void SubS_ActorPathing_ComputePointInfo(PlayState* play, ActorPathing* actorPath
diff.x = actorPath->curPoint.x - actorPath->worldPos->x;
diff.y = actorPath->curPoint.y - actorPath->worldPos->y;
diff.z = actorPath->curPoint.z - actorPath->worldPos->z;
actorPath->distSqToCurPointXZ = Math3D_XZLengthSquared(diff.x, diff.z);
actorPath->distSqToCurPoint = Math3D_LengthSquared(&diff);
actorPath->distSqToCurPointXZ = Math3D_Dist1DSq(diff.x, diff.z);
actorPath->distSqToCurPoint = Math3D_Vec3fMagnitudeSq(&diff);
actorPath->rotToCurPoint.y = Math_Atan2S_XY(diff.z, diff.x);
actorPath->rotToCurPoint.x = Math_Atan2S_XY(sqrtf(actorPath->distSqToCurPointXZ), -diff.y);
actorPath->rotToCurPoint.z = 0;

View File

@ -55,7 +55,7 @@ f32 __cosf(f32 x) {
dx -= dn * pihi.d;
dx -= dn * pilo.d;
xSq = SQ(dx);
xSq = dx * dx;
polyApprox = ((P[4].d * xSq + P[3].d) * xSq + P[2].d) * xSq + P[1].d;
result = dx + (dx * xSq) * polyApprox; // Actual Maclaurin polynomial for sin(x)

View File

@ -1,5 +1,4 @@
#include "ultra64.h"
#include "macros.h"
void guLookAtF(f32 mf[4][4], f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt, f32 xUp, f32 yUp, f32 zUp) {
f32 length;
@ -15,7 +14,7 @@ void guLookAtF(f32 mf[4][4], f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32
xLook = xAt - xEye;
yLook = yAt - yEye;
zLook = zAt - zEye;
length = -1.0 / sqrtf(SQ(xLook) + SQ(yLook) + SQ(zLook));
length = -1.0 / sqrtf((xLook * xLook) + (yLook * yLook) + (zLook * zLook));
xLook *= length;
yLook *= length;
zLook *= length;
@ -23,7 +22,7 @@ void guLookAtF(f32 mf[4][4], f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32
xRight = yUp * zLook - zUp * yLook;
yRight = zUp * xLook - xUp * zLook;
zRight = xUp * yLook - yUp * xLook;
length = 1.0 / sqrtf(SQ(xRight) + SQ(yRight) + SQ(zRight));
length = 1.0 / sqrtf((xRight * xRight) + (yRight * yRight) + (zRight * zRight));
xRight *= length;
yRight *= length;
zRight *= length;
@ -31,7 +30,7 @@ void guLookAtF(f32 mf[4][4], f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32
xUp = yLook * zRight - zLook * yRight;
yUp = zLook * xRight - xLook * zRight;
zUp = xLook * yRight - yLook * xRight;
length = 1.0 / sqrtf(SQ(xUp) + SQ(yUp) + SQ(zUp));
length = 1.0 / sqrtf((xUp * xUp) + (yUp * yUp) + (zUp * zUp));
xUp *= length;
yUp *= length;
zUp *= length;

View File

@ -1,5 +1,4 @@
#include "ultra64.h"
#include "macros.h"
void guLookAtHiliteF(f32 mf[4][4], LookAt* l, Hilite* h, f32 xEye, f32 yEye, f32 zEye, f32 xAt, f32 yAt, f32 zAt,
f32 xUp, f32 yUp, f32 zUp, f32 xl1, f32 yl1, f32 zl1, /* light 1 direction */
@ -22,7 +21,7 @@ void guLookAtHiliteF(f32 mf[4][4], LookAt* l, Hilite* h, f32 xEye, f32 yEye, f32
xLook = xAt - xEye;
yLook = yAt - yEye;
zLook = zAt - zEye;
length = -1.0 / sqrtf(SQ(xLook) + SQ(yLook) + SQ(zLook));
length = -1.0 / sqrtf((xLook * xLook) + (yLook * yLook) + (zLook * zLook));
xLook *= length;
yLook *= length;
zLook *= length;
@ -30,7 +29,7 @@ void guLookAtHiliteF(f32 mf[4][4], LookAt* l, Hilite* h, f32 xEye, f32 yEye, f32
xRight = yUp * zLook - zUp * yLook;
yRight = zUp * xLook - xUp * zLook;
zRight = xUp * yLook - yUp * xLook;
length = 1.0 / sqrtf(SQ(xRight) + SQ(yRight) + SQ(zRight));
length = 1.0 / sqrtf((xRight * xRight) + (yRight * yRight) + (zRight * zRight));
xRight *= length;
yRight *= length;
zRight *= length;
@ -38,14 +37,14 @@ void guLookAtHiliteF(f32 mf[4][4], LookAt* l, Hilite* h, f32 xEye, f32 yEye, f32
xUp = yLook * zRight - zLook * yRight;
yUp = zLook * xRight - xLook * zRight;
zUp = xLook * yRight - yLook * xRight;
length = 1.0 / sqrtf(SQ(xUp) + SQ(yUp) + SQ(zUp));
length = 1.0 / sqrtf((xUp * xUp) + (yUp * yUp) + (zUp * zUp));
xUp *= length;
yUp *= length;
zUp *= length;
/* hilite vectors */
length = 1.0 / sqrtf(SQ(xl1) + SQ(yl1) + SQ(zl1));
length = 1.0 / sqrtf((xl1 * xl1) + (yl1 * yl1) + (zl1 * zl1));
xl1 *= length;
yl1 *= length;
zl1 *= length;
@ -54,7 +53,7 @@ void guLookAtHiliteF(f32 mf[4][4], LookAt* l, Hilite* h, f32 xEye, f32 yEye, f32
yHilite = yl1 + yLook;
zHilite = zl1 + zLook;
length = sqrtf(SQ(xHilite) + SQ(yHilite) + SQ(zHilite));
length = sqrtf((xHilite * xHilite) + (yHilite * yHilite) + (zHilite * zHilite));
if (length > 0.1) {
length = 1.0 / length;
@ -70,7 +69,7 @@ void guLookAtHiliteF(f32 mf[4][4], LookAt* l, Hilite* h, f32 xEye, f32 yEye, f32
h->h.y1 = hiliteHeight * 2;
}
length = 1.0 / sqrtf(SQ(xl2) + SQ(yl2) + SQ(zl2));
length = 1.0 / sqrtf((xl2 * xl2) + (yl2 * yl2) + (zl2 * zl2));
xl2 *= length;
yl2 *= length;
zl2 *= length;
@ -78,7 +77,7 @@ void guLookAtHiliteF(f32 mf[4][4], LookAt* l, Hilite* h, f32 xEye, f32 yEye, f32
xHilite = xl2 + xLook;
yHilite = yl2 + yLook;
zHilite = zl2 + zLook;
length = sqrtf(SQ(xHilite) + SQ(yHilite) + SQ(zHilite));
length = sqrtf((xHilite * xHilite) + (yHilite * yHilite) + (zHilite * zHilite));
if (length > 0.1) {
length = 1.0 / length;
xHilite *= length;

View File

@ -46,7 +46,7 @@ f32 __sinf(f32 x) {
// |x| > 2^{-12}: for x smaller in magnitude than this, sin(x) - x is too small for a float to register the
// error
if (xpt >= 230) {
xSq = SQ(dx);
xSq = dx * dx;
polyApprox = ((P[4].d * xSq + P[3].d) * xSq + P[2].d) * xSq + P[1].d;
result = dx + (dx * xSq) * polyApprox;
@ -66,7 +66,7 @@ f32 __sinf(f32 x) {
dx -= dn * pihi.d;
dx -= dn * pilo.d;
xSq = SQ(dx);
xSq = dx * dx;
polyApprox = ((P[4].d * xSq + P[3].d) * xSq + P[2].d) * xSq + P[1].d;
result = dx + (dx * xSq) * polyApprox; // Actual Maclaurin polynomial for sin(x)

View File

@ -685,8 +685,8 @@ void func_80A2AED0(BgDblueMovebg* this, PlayState* play) {
Vec3f sp54;
f32 sp50;
if (Math3D_PointDistToLine2D(play->view.eye.x, play->view.eye.z, this->unk_190.x, this->unk_190.z,
this->unk_19C.x, this->unk_19C.z, &sp54.x, &sp54.z, &sp50)) {
if (Math3D_PointDistSqToLine2DImpl(play->view.eye.x, play->view.eye.z, this->unk_190.x, this->unk_190.z,
this->unk_19C.x, this->unk_19C.z, &sp54.x, &sp54.z, &sp50)) {
sp54.y = this->dyna.actor.world.pos.y;
} else {
if (Math_Vec3f_DistXYZ(&play->view.eye, &this->unk_190) <=

View File

@ -61,7 +61,7 @@ Color_RGBA8 D_80B8539C = { 200, 255, 255, 255 };
Color_RGBA8 D_80B853A0 = { 200, 200, 200, 0 };
s32 func_80B83C80(Vec3f* arg0, Vec3f* arg1) {
f32 temp_f0 = Math3D_LengthSquared(arg0);
f32 temp_f0 = Math3D_Vec3fMagnitudeSq(arg0);
f32 temp_f2;
if (temp_f0 < SQ(0.001f)) {

View File

@ -485,12 +485,12 @@ void func_80A9BD24(BgHakuginPost* this, PlayState* play, BgHakuginPostUnkStruct*
}
if (unkStruct->unk_0000[i].unk_34 == 2) {
if (Math3D_XZLengthSquared(unkStruct->unk_0000[i].unk_14.x, unkStruct->unk_0000[i].unk_14.z) >
if (Math3D_Dist1DSq(unkStruct->unk_0000[i].unk_14.x, unkStruct->unk_0000[i].unk_14.z) >
SQ(440.0f) + 0.02f) {
unkStruct->unk_0000[i].unk_34 = 3;
}
} else if (unkStruct->unk_0000[i].unk_34 == 3) {
if (Math3D_XZLengthSquared(unkStruct->unk_0000[i].unk_14.x, unkStruct->unk_0000[i].unk_14.z) > 278784.03f) {
if (Math3D_Dist1DSq(unkStruct->unk_0000[i].unk_14.x, unkStruct->unk_0000[i].unk_14.z) > 278784.03f) {
func_80A9B554(this, play, unkStruct, &unkStruct->unk_0000[i]);
Audio_PlaySfx_2(NA_SE_EV_GLASSBROKEN_IMPACT);
unkStruct->unk_0000[i].unk_34 = 4;
@ -543,8 +543,8 @@ void BgHakuginPost_RequestQuakeAndRumble(BgHakuginPost* this, PlayState* play) {
Camera* activeCam = GET_ACTIVE_CAM(play);
s16 quakeIndex;
Rumble_Request(Math3D_XZDistanceSquared(player->actor.world.pos.x, player->actor.world.pos.z,
this->dyna.actor.home.pos.x, this->dyna.actor.home.pos.z),
Rumble_Request(Math3D_Dist2DSq(player->actor.world.pos.x, player->actor.world.pos.z, this->dyna.actor.home.pos.x,
this->dyna.actor.home.pos.z),
255, 20, 150);
quakeIndex = Quake_Request(activeCam, QUAKE_TYPE_3);
@ -576,7 +576,7 @@ void func_80A9C228(BgHakuginPost* this, PlayState* play, BgHakuginPostUnkStruct*
spB8.x = Math_SinS(temp_s0) * temp_f20 + spC8->unk_14.x;
spB8.z = Math_CosS(temp_s0) * temp_f20 + spC8->unk_14.z;
if (Math3D_XZLengthSquared(spB8.x, spB8.z) < SQ(550.0f) + 0.03f) {
if (Math3D_Dist1DSq(spB8.x, spB8.z) < SQ(550.0f) + 0.03f) {
spB8.x += this->dyna.actor.home.pos.x;
spB8.y = spC8->unk_14.y + this->unk_16C + 20.0f;
spB8.z += this->dyna.actor.home.pos.z;

View File

@ -72,8 +72,8 @@ void BgUmajump_CheckDistance(BgUmajump* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if ((this->horse != NULL) && (player != NULL) &&
(Math3D_XZDistance(this->horse->world.pos.x, this->horse->world.pos.z, player->actor.world.pos.x,
player->actor.world.pos.z) < 1400.0f)) {
(Math3D_Dist2D(this->horse->world.pos.x, this->horse->world.pos.z, player->actor.world.pos.x,
player->actor.world.pos.z) < 1400.0f)) {
this->actionFunc = BgUmajump_PlayCutscene;
}
}

View File

@ -692,7 +692,7 @@ void BossHakugin_StepVector(Vec3f* norm, Vec3f* targetNorm, f32 angleStep) {
return;
}
Math3D_CrossProduct(norm, targetNorm, &crossProduct);
Math3D_Vec3f_Cross(norm, targetNorm, &crossProduct);
if (BossHakugin_Vec3fNormalize(&crossProduct)) {
Matrix_RotateAxisF(angleStep, &crossProduct, MTXMODE_NEW);
@ -2981,7 +2981,7 @@ void BossHakugin_UpdateElectricBalls(BossHakugin* this, PlayState* play) {
normal.x = COLPOLY_GET_NORMAL(poly->normal.x);
normal.y = COLPOLY_GET_NORMAL(poly->normal.y);
normal.z = COLPOLY_GET_NORMAL(poly->normal.z);
func_80179F64(&this->electricBallRot, &normal, &targetRot);
Math3D_Vec3fReflect(&this->electricBallRot, &normal, &targetRot);
Math_Vec3f_Copy(&this->electricBallRot, &targetRot);
}
} else {

View File

@ -207,7 +207,7 @@ s32 EnAkindonuts_HasReachedPoint(EnAkindonuts* this, Path* path, s32 pointIndex)
diffZ = points[index + 1].z - points[index - 1].z;
}
func_8017B7F8(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
Math3D_RotateXZPlane(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
if (((px * this->actor.world.pos.x) + (pz * this->actor.world.pos.z) + d) > 0.0f) {
reached = true;

View File

@ -295,7 +295,7 @@ void func_8088A894(EnArrow* this, PlayState* play) {
return;
}
temp_f0 = Math3D_LengthSquared(&sp68);
temp_f0 = Math3D_Vec3fMagnitudeSq(&sp68);
if (temp_f0 < 1.0f) {
return;
}

View File

@ -433,7 +433,7 @@ f32 func_80A954AC(EnAz* this) {
sp1C.x = pathing->curPoint.x - pathing->prevPoint.x;
sp1C.y = pathing->curPoint.y - pathing->prevPoint.y;
sp1C.z = pathing->curPoint.z - pathing->prevPoint.z;
return Math3D_Parallel(&sp28, &sp1C);
return Math3D_Cos(&sp28, &sp1C);
}
s32 func_80A95534(PlayState* play, ActorPathing* actorPathing) {
@ -1633,10 +1633,8 @@ void func_80A97EAC(EnAz* this, PlayState* play) {
void func_80A97F9C(EnAz* this, PlayState* play) {
Player* player = GET_PLAYER(play);
D_80A99E8C =
Math3D_XZDistanceSquared(player->actor.world.pos.x, player->actor.world.pos.z, D_80A99E80.x, D_80A99E80.z);
if (Math3D_XZDistanceSquared(this->actor.world.pos.x, this->actor.world.pos.z, D_80A99E80.x, D_80A99E80.z) >=
SQ(1000.0f)) {
D_80A99E8C = Math3D_Dist2DSq(player->actor.world.pos.x, player->actor.world.pos.z, D_80A99E80.x, D_80A99E80.z);
if (Math3D_Dist2DSq(this->actor.world.pos.x, this->actor.world.pos.z, D_80A99E80.x, D_80A99E80.z) >= SQ(1000.0f)) {
this->unk_374 |= 0x1000;
}
if (!(this->unk_300.flags & ACTOR_PATHING_REACHED_END_PERMANENT)) {
@ -1704,8 +1702,8 @@ void func_80A982E0(PlayState* play, ActorPathing* actorPathing) {
sp28.x = actorPathing->curPoint.x - actorPathing->worldPos->x;
sp28.y = actorPathing->curPoint.y - actorPathing->worldPos->y;
sp28.z = actorPathing->curPoint.z - actorPathing->worldPos->z;
actorPathing->distSqToCurPointXZ = Math3D_XZLengthSquared(sp28.x, sp28.z);
actorPathing->distSqToCurPoint = Math3D_LengthSquared(&sp28);
actorPathing->distSqToCurPointXZ = Math3D_Dist1DSq(sp28.x, sp28.z);
actorPathing->distSqToCurPoint = Math3D_Vec3fMagnitudeSq(&sp28);
actorPathing->rotToCurPoint.y = Math_Atan2S_XY(sp28.z, sp28.x);
actorPathing->rotToCurPoint.x = Math_Atan2S_XY(sqrtf(actorPathing->distSqToCurPointXZ), -sp28.y);
actorPathing->rotToCurPoint.z = 0;

View File

@ -228,8 +228,8 @@ void EnBat_FlyIdle(EnBat* this, PlayState* play) {
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
this->actor.bgCheckFlags &= ~BGCHECKFLAG_WALL;
this->yawTarget = this->actor.wallYaw;
} else if (Math3D_XZDistanceSquared(this->actor.world.pos.x, this->actor.world.pos.z, this->actor.home.pos.x,
this->actor.home.pos.z) > SQ(300.0f)) {
} else if (Math3D_Dist2DSq(this->actor.world.pos.x, this->actor.world.pos.z, this->actor.home.pos.x,
this->actor.home.pos.z) > SQ(300.0f)) {
this->yawTarget = Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos);
} else if (finishedRotStep && (Rand_ZeroOne() < 0.015f)) {
this->yawTarget =

View File

@ -447,7 +447,7 @@ void EnBigslime_UpdateSurfaceNorm(EnBigslime* this) {
vecTriEdge2.y = dynamicVtx12->n.ob[1] - dynamicVtx0->n.ob[1];
vecTriEdge2.z = dynamicVtx12->n.ob[2] - dynamicVtx0->n.ob[2];
Math3D_CrossProduct(&vecTriEdge1, &vecTriEdge2, &vecTriNorm);
Math3D_Vec3f_Cross(&vecTriEdge1, &vecTriEdge2, &vecTriNorm);
EnBigslime_Vec3fNormalize(&vecTriNorm);
Math_Vec3f_Sum(&vtxNorm[sBigslimeTri[i].v[0]], &vecTriNorm, &vtxNorm[sBigslimeTri[i].v[0]]);

View File

@ -136,7 +136,7 @@ s32 EnBomChu_UpdateFloorPoly(EnBomChu* this, CollisionPoly* floorPoly, PlayState
return false;
}
Math3D_CrossProduct(&this->axisUp, &normal, &vec);
Math3D_Vec3f_Cross(&this->axisUp, &normal, &vec);
magnitude = Math3D_Vec3fMagnitude(&vec);
if (magnitude < 0.001f) {
@ -148,7 +148,7 @@ s32 EnBomChu_UpdateFloorPoly(EnBomChu* this, CollisionPoly* floorPoly, PlayState
Matrix_RotateAxisF(angle, &vec, MTXMODE_NEW);
Matrix_MultVec3f(&this->axisLeft, &vec);
Math_Vec3f_Copy(&this->axisLeft, &vec);
Math3D_CrossProduct(&this->axisLeft, &normal, &this->axisForwards);
Math3D_Vec3f_Cross(&this->axisLeft, &normal, &this->axisForwards);
magnitude = Math3D_Vec3fMagnitude(&this->axisForwards);
if (magnitude < 0.001f) {

View File

@ -170,7 +170,7 @@ s32 func_8089F908(EnBubble* this) {
void EnBubble_Vec3fNormalizedReflect(Vec3f* vec1, Vec3f* vec2, Vec3f* dest) {
f32 norm;
func_80179F64(vec1, vec2, dest);
Math3D_Vec3fReflect(vec1, vec2, dest);
norm = sqrtf(SQ(dest->x) + SQ(dest->y) + SQ(dest->z));
if (norm != 0.0f) {
dest->x /= norm;

View File

@ -233,8 +233,8 @@ void func_8091C794(EnButte* this, PlayState* play) {
EnButteStruct* sp4C = &D_8091D324[this->unk_24E];
f32 distSq;
Player* player = GET_PLAYER(play);
f32 distFromHomeSq = Math3D_XZDistanceSquared(this->actor.world.pos.x, this->actor.world.pos.z,
this->actor.home.pos.x, this->actor.home.pos.z);
f32 distFromHomeSq = Math3D_Dist2DSq(this->actor.world.pos.x, this->actor.world.pos.z, this->actor.home.pos.x,
this->actor.home.pos.z);
f32 playSpeed;
f32 sp38;
s32 pad;
@ -289,8 +289,8 @@ void func_8091C794(EnButte* this, PlayState* play) {
if ((BUTTERFLY_GET_1(&this->actor) == BUTTERFLY_1) && (player->heldItemAction == PLAYER_IA_DEKU_STICK) &&
(this->unk_252 <= 0) &&
((Math3D_XZDistanceSquared(player->actor.world.pos.x, player->actor.world.pos.z, this->actor.home.pos.x,
this->actor.home.pos.z) < SQ(120.0f)) ||
((Math3D_Dist2DSq(player->actor.world.pos.x, player->actor.world.pos.z, this->actor.home.pos.x,
this->actor.home.pos.z) < SQ(120.0f)) ||
(this->actor.xzDistToPlayer < 60.0f))) {
func_8091CB68(this);
this->unk_24F = 2;
@ -354,14 +354,14 @@ void func_8091CBB4(EnButte* this, PlayState* play) {
D_8091D3F0 = -D_8091D3F0;
}
distSq = Math3D_XZDistanceSquared(this->actor.world.pos.x, this->actor.world.pos.z, this->actor.home.pos.x,
this->actor.home.pos.z);
distSq = Math3D_Dist2DSq(this->actor.world.pos.x, this->actor.world.pos.z, this->actor.home.pos.x,
this->actor.home.pos.z);
if ((player->heldItemAction != PLAYER_IA_DEKU_STICK) || !(fabsf(player->actor.speed) < 1.8f) ||
(this->unk_252 > 0) || !(distSq < SQ(320.0f))) {
func_8091C748(this);
} else if ((distSq > SQ(240.0f)) &&
(Math3D_XZDistanceSquared(player->meleeWeaponInfo[0].tip.x, player->meleeWeaponInfo[0].tip.z,
this->actor.world.pos.x, this->actor.world.pos.z) < SQ(60.0f))) {
(Math3D_Dist2DSq(player->meleeWeaponInfo[0].tip.x, player->meleeWeaponInfo[0].tip.z,
this->actor.world.pos.x, this->actor.world.pos.z) < SQ(60.0f))) {
func_8091CF64(this);
}
}

View File

@ -289,7 +289,7 @@ s32 EnDg_HasReachedPoint(EnDg* this, Path* path, s32 pointIndex) {
diffZ = points[index + 1].z - points[index - 1].z;
}
func_8017B7F8(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
Math3D_RotateXZPlane(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
if (((px * this->actor.world.pos.x) + (pz * this->actor.world.pos.z) + d) > 0.0f) {
reached = true;

View File

@ -338,7 +338,7 @@ s32 EnGg2_HasReachedPoint(EnGg2* this, Path* path, s32 pointIndex) {
diffZ = points[index + 1].z - points[index - 1].z;
}
func_8017B7F8(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
Math3D_RotateXZPlane(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
if (((px * this->actor.world.pos.x) + (pz * this->actor.world.pos.z) + d) > 0.0f) {
reached = true;

View File

@ -414,7 +414,7 @@ s32 EnGk_HasReachedPoint(EnGk* this, Path* path, s32 pointIndex) {
diffZ = points[index + 1].z - points[index - 1].z;
}
func_8017B7F8(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
Math3D_RotateXZPlane(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
if (((px * this->actor.world.pos.x) + (pz * this->actor.world.pos.z) + d) > 0.0f) {
reached = true;

View File

@ -200,7 +200,7 @@ f32 func_8093EB74(EnGoroiwa* this, PlayState* play) {
for (i = 1; i < temp_s4; i++) {
Math_Vec3f_Copy(&sp54, &sp48);
Math_Vec3s_ToVec3f(&sp48, &this->pathPoints[i]);
temp_f20 += Math3D_Distance(&sp54, &sp48);
temp_f20 += Math3D_Vec3f_DistXYZ(&sp54, &sp48);
}
return temp_f20;
@ -540,7 +540,7 @@ void func_8093FAA4(EnGoroiwa* this, PlayState* play) {
if (this->unk_1E5 & 0x10) {
sp7C = this->unk_1C0;
} else {
temp = Math3D_Distance(&this->actor.world.pos, &this->actor.prevPos);
temp = Math3D_Vec3f_DistXYZ(&this->actor.world.pos, &this->actor.prevPos);
tmp2 = temp / this->unk_1DC;
this->unk_1C0 = tmp2;
sp7C = this->unk_1C0;
@ -548,12 +548,12 @@ void func_8093FAA4(EnGoroiwa* this, PlayState* play) {
sp7C *= this->unk_1C4;
if (!(this->unk_1E5 & 0x10)) {
if (Math3D_LengthSquared(&this->actor.velocity) > 0.1f) {
if (Math3D_Vec3fMagnitudeSq(&this->actor.velocity) > 0.1f) {
Math_Vec3f_Copy(&this->unk_1A8, &this->actor.velocity);
}
}
Math3D_CrossProduct(&D_80942E60, &this->unk_1A8, &sp70);
Math3D_Vec3f_Cross(&D_80942E60, &this->unk_1A8, &sp70);
if (func_8093EAD4(&sp64, &sp70)) {
this->unk_1B4 = sp64;
@ -1356,7 +1356,7 @@ void func_8094220C(EnGoroiwa* this, PlayState* play) {
temp_f20 = this->unk_1DC * 0.9f;
if (spB8.y > 0.0f) {
if (Math3D_AngleBetweenVectors(&D_80942E60, &spB8, &spAC)) {
if (Math3D_CosOut(&D_80942E60, &spB8, &spAC)) {
phi_f12 = 1.0f;
} else {
phi_f12 = 1.0f - SQ(spAC);

View File

@ -510,7 +510,7 @@ void EnHonotrap_FlameMove(EnHonotrap* this, PlayState* play) {
shieldVec.z = -player->shieldMf.zz;
EnHonotrap_GetNormal(&shieldNorm, &shieldVec);
tempVel = thisx->velocity;
func_80179F64(&tempVel, &shieldNorm, &thisx->velocity);
Math3D_Vec3fReflect(&tempVel, &shieldNorm, &thisx->velocity);
thisx->speed = this->speedMod * 0.5f;
thisx->world.rot.y = Math_Atan2S_XY(thisx->velocity.z, thisx->velocity.x);
EnHonotrap_SetupFlameVanish(this);

View File

@ -345,7 +345,7 @@ void func_8087B7C0(EnHorse* this, PlayState* play, Path* path) {
phi_f14 = pathPoints[this->curRaceWaypoint + 1].z - pathPoints[this->curRaceWaypoint - 1].z;
}
func_8017B7F8(&sp8C, Math_Atan2S(phi_f12, phi_f14), &sp7C, &sp78, &sp74);
Math3D_RotateXZPlane(&sp8C, Math_Atan2S(phi_f12, phi_f14), &sp7C, &sp78, &sp74);
if (((this->actor.world.pos.x * sp7C) + (sp78 * this->actor.world.pos.z) + sp74) > 0.0f) {
this->curRaceWaypoint++;
@ -361,7 +361,7 @@ void func_8087B7C0(EnHorse* this, PlayState* play, Path* path) {
Math_Vec3s_ToVec3f(&sp80, &pathPoints[this->curRaceWaypoint - 1]);
}
func_8017D7C0(this->actor.world.pos.x, this->actor.world.pos.z, sp80.x, sp80.z, sp8C.x, sp8C.z, &sp70);
Math3D_PointDistSqToLine2D(this->actor.world.pos.x, this->actor.world.pos.z, sp80.x, sp80.z, sp8C.x, sp8C.z, &sp70);
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) || (this->unk_1EC & 4)) {
EnHorse_RotateToPoint(this, play, &sp8C, 0xC80);
@ -404,7 +404,7 @@ void func_8087B7C0(EnHorse* this, PlayState* play, Path* path) {
for (i = sp68; i < sp60; i++) {
Math_Vec3s_ToVec3f(&sp50, &pathPoints[i]);
temp_f0 = Math3D_Distance(&this->actor.world.pos, &sp50);
temp_f0 = Math3D_Vec3f_DistXYZ(&this->actor.world.pos, &sp50);
if (temp_f0 < sp64) {
sp64 = temp_f0;
sp68 = i;
@ -577,7 +577,7 @@ bool func_8087C38C(PlayState* play, EnHorse* this, Vec3f* arg2) {
return false;
}
eyeDist = Math3D_Distance(arg2, &play->view.eye);
eyeDist = Math3D_Vec3f_DistXYZ(arg2, &play->view.eye);
return func_8087C2B8(play, this, &sp24, sp20) || (eyeDist < 100.0f);
}
@ -629,7 +629,7 @@ s32 EnHorse_Spawn(EnHorse* this, PlayState* play) {
spawnPos.x = pathPoints[i].x;
spawnPos.y = pathPoints[i].y;
spawnPos.z = pathPoints[i].z;
dist = Math3D_Distance(&player->actor.world.pos, &spawnPos);
dist = Math3D_Vec3f_DistXYZ(&player->actor.world.pos, &spawnPos);
if ((minDist < dist) || func_8087C38C(play, this, &spawnPos)) {
continue;
@ -655,7 +655,7 @@ s32 EnHorse_Spawn(EnHorse* this, PlayState* play) {
spawnPos.x = pathPoints[i].x;
spawnPos.y = pathPoints[i].y;
spawnPos.z = pathPoints[i].z;
dist = Math3D_Distance(&player->actor.world.pos, &spawnPos);
dist = Math3D_Vec3f_DistXYZ(&player->actor.world.pos, &spawnPos);
if (minDist < dist) {
continue;
@ -2514,7 +2514,7 @@ void EnHorse_CsMoveToPoint(EnHorse* this, PlayState* play, CsCmdActorCue* cue) {
endPos.y = cue->endPos.y;
endPos.z = cue->endPos.z;
if (Math3D_Distance(&endPos, &this->actor.world.pos) > 8.0f) {
if (Math3D_Vec3f_DistXYZ(&endPos, &this->actor.world.pos) > 8.0f) {
EnHorse_RotateToPoint(this, play, &endPos, 0x320);
this->actor.speed = 8.0f;
this->skin.skelAnime.playSpeed = this->actor.speed * 0.3f;
@ -2695,7 +2695,7 @@ void EnHorse_CsWarpMoveToPoint(EnHorse* this, PlayState* play, CsCmdActorCue* cu
endPos.y = cue->endPos.y;
endPos.z = cue->endPos.z;
if (Math3D_Distance(&endPos, &this->actor.world.pos) > 8.0f) {
if (Math3D_Vec3f_DistXYZ(&endPos, &this->actor.world.pos) > 8.0f) {
EnHorse_RotateToPoint(this, play, &endPos, 0x320);
this->actor.speed = 8.0f;
this->skin.skelAnime.playSpeed = this->actor.speed * 0.3f;
@ -2828,10 +2828,10 @@ s32 EnHorse_UpdateHbaRaceInfo(EnHorse* this, PlayState* play, RaceInfo* raceInfo
f32 d;
EnHorse_RaceWaypointPos(raceInfo->waypoints, this->curRaceWaypoint, &pos);
func_8017B7F8(&pos, raceInfo->waypoints[this->curRaceWaypoint].angle, &px, &pz, &d);
Math3D_RotateXZPlane(&pos, raceInfo->waypoints[this->curRaceWaypoint].angle, &px, &pz, &d);
if ((this->curRaceWaypoint >= (raceInfo->numWaypoints - 1)) &&
(Math3D_Distance(&pos, &this->actor.world.pos) < DREG(8))) {
(Math3D_Vec3f_DistXYZ(&pos, &this->actor.world.pos) < DREG(8))) {
this->hbaFlags |= 2;
}
@ -2999,9 +2999,9 @@ void EnHorse_FleePlayer(EnHorse* this, PlayState* play) {
}
}
distToHome = Math3D_Distance(&this->actor.home.pos, &this->actor.world.pos);
playerDistToHome = Math3D_Distance(&player->actor.world.pos, &this->actor.home.pos);
distToPlayer = Math3D_Distance(&player->actor.world.pos, &this->actor.world.pos);
distToHome = Math3D_Vec3f_DistXYZ(&this->actor.home.pos, &this->actor.world.pos);
playerDistToHome = Math3D_Vec3f_DistXYZ(&player->actor.world.pos, &this->actor.home.pos);
distToPlayer = Math3D_Vec3f_DistXYZ(&player->actor.world.pos, &this->actor.world.pos);
if (playerDistToHome > 300.0f) {
if (distToHome > 150.0f) {
@ -3352,7 +3352,7 @@ void func_808848C8(EnHorse* this, PlayState* play) {
Horse_RotateToPoint(&this->actor, &sp24, 0x7D0);
this->skin.skelAnime.playSpeed = this->actor.speed * 0.75f;
SkelAnime_Update(&this->skin.skelAnime);
if (Math3D_Distance(&sp24, &this->actor.world.pos) < 30.0f) {
if (Math3D_Vec3f_DistXYZ(&sp24, &this->actor.world.pos) < 30.0f) {
this->stateFlags &= ~ENHORSE_UNRIDEABLE;
EnHorse_StartIdleRidable(this);
}
@ -3446,7 +3446,7 @@ void func_80884E0C(EnHorse* this, PlayState* play) {
this->actor.world.pos.x = this->banditPosition.x;
this->actor.world.pos.z = this->banditPosition.z;
this->unk_56C = Math3D_Distance(&this->actor.world.pos, &this->actor.prevPos);
this->unk_56C = Math3D_Vec3f_DistXYZ(&this->actor.world.pos, &this->actor.prevPos);
if (((this->unk_550 == 5) || (this->unk_550 == 7)) && (Player_GetMask(play) != PLAYER_MASK_CIRCUS_LEADER)) {
this->rider->animIndex2 = ENIN_ANIM2_7;
} else {

View File

@ -259,22 +259,22 @@ s32 func_808F8FAC(EnHorseGameCheck* this, PlayState* play) {
}
if (!(this->unk_164 & 0x1000)) {
if (Math3D_XZBoundCheck(D_808F9BAC[0], D_808F9BAC[1], D_808F9BAC[2], D_808F9BAC[3],
this->horse1->actor.world.pos.x, this->horse1->actor.world.pos.z)) {
if (Math3D_PointInSquare2D(D_808F9BAC[0], D_808F9BAC[1], D_808F9BAC[2], D_808F9BAC[3],
this->horse1->actor.world.pos.x, this->horse1->actor.world.pos.z)) {
this->unk_164 |= 0x1000;
}
}
if (!(this->unk_164 & 0x2000) && (this->unk_164 & 0x1000)) {
if (Math3D_XZBoundCheck(D_808F9BBC[0], D_808F9BBC[1], D_808F9BBC[2], D_808F9BBC[3],
this->horse1->actor.world.pos.x, this->horse1->actor.world.pos.z)) {
if (Math3D_PointInSquare2D(D_808F9BBC[0], D_808F9BBC[1], D_808F9BBC[2], D_808F9BBC[3],
this->horse1->actor.world.pos.x, this->horse1->actor.world.pos.z)) {
this->unk_164 |= 0x2000;
}
}
if (!(this->unk_164 & 0x4000) && (this->unk_164 & 0x2000)) {
if (Math3D_XZBoundCheck(D_808F9BCC[0], D_808F9BCC[1], D_808F9BCC[2], D_808F9BCC[3],
this->horse1->actor.world.pos.x, this->horse1->actor.world.pos.z)) {
if (Math3D_PointInSquare2D(D_808F9BCC[0], D_808F9BCC[1], D_808F9BCC[2], D_808F9BCC[3],
this->horse1->actor.world.pos.x, this->horse1->actor.world.pos.z)) {
this->unk_164 |= 0x4000;
}
}
@ -292,22 +292,22 @@ s32 func_808F8FAC(EnHorseGameCheck* this, PlayState* play) {
}
if (!(this->unk_164 & 0x80000)) {
if (Math3D_XZBoundCheck(D_808F9BAC[0], D_808F9BAC[1], D_808F9BAC[2], D_808F9BAC[3],
this->horse2->actor.world.pos.x, this->horse2->actor.world.pos.z)) {
if (Math3D_PointInSquare2D(D_808F9BAC[0], D_808F9BAC[1], D_808F9BAC[2], D_808F9BAC[3],
this->horse2->actor.world.pos.x, this->horse2->actor.world.pos.z)) {
this->unk_164 |= 0x80000;
}
}
if (!(this->unk_164 & 0x100000) && (this->unk_164 & 0x80000)) {
if (Math3D_XZBoundCheck(D_808F9BBC[0], D_808F9BBC[1], D_808F9BBC[2], D_808F9BBC[3],
this->horse2->actor.world.pos.x, this->horse2->actor.world.pos.z)) {
if (Math3D_PointInSquare2D(D_808F9BBC[0], D_808F9BBC[1], D_808F9BBC[2], D_808F9BBC[3],
this->horse2->actor.world.pos.x, this->horse2->actor.world.pos.z)) {
this->unk_164 |= 0x100000;
}
}
if (!(this->unk_164 & 0x200000) && (this->unk_164 & 0x100000)) {
if (Math3D_XZBoundCheck(D_808F9BCC[0], D_808F9BCC[1], D_808F9BCC[2], D_808F9BCC[3],
this->horse2->actor.world.pos.x, this->horse2->actor.world.pos.z)) {
if (Math3D_PointInSquare2D(D_808F9BCC[0], D_808F9BCC[1], D_808F9BCC[2], D_808F9BCC[3],
this->horse2->actor.world.pos.x, this->horse2->actor.world.pos.z)) {
this->unk_164 |= 0x200000;
}
}
@ -324,20 +324,20 @@ s32 func_808F8FAC(EnHorseGameCheck* this, PlayState* play) {
this->unk_174 = 60;
}
if (!(this->unk_164 & 0x20) && Math3D_XZBoundCheck(D_808F9BAC[0], D_808F9BAC[1], D_808F9BAC[2], D_808F9BAC[3],
horse->actor.world.pos.x, horse->actor.world.pos.z)) {
if (!(this->unk_164 & 0x20) && Math3D_PointInSquare2D(D_808F9BAC[0], D_808F9BAC[1], D_808F9BAC[2], D_808F9BAC[3],
horse->actor.world.pos.x, horse->actor.world.pos.z)) {
this->unk_164 |= 0x20;
}
if (!(this->unk_164 & 0x40) && (this->unk_164 & 0x20) &&
Math3D_XZBoundCheck(D_808F9BBC[0], D_808F9BBC[1], D_808F9BBC[2], D_808F9BBC[3], horse->actor.world.pos.x,
horse->actor.world.pos.z)) {
Math3D_PointInSquare2D(D_808F9BBC[0], D_808F9BBC[1], D_808F9BBC[2], D_808F9BBC[3], horse->actor.world.pos.x,
horse->actor.world.pos.z)) {
this->unk_164 |= 0x40;
}
if (!(this->unk_164 & 0x80) && (this->unk_164 & 0x40) &&
Math3D_XZBoundCheck(D_808F9BCC[0], D_808F9BCC[1], D_808F9BCC[2], D_808F9BCC[3], horse->actor.world.pos.x,
horse->actor.world.pos.z)) {
Math3D_PointInSquare2D(D_808F9BCC[0], D_808F9BCC[1], D_808F9BCC[2], D_808F9BCC[3], horse->actor.world.pos.x,
horse->actor.world.pos.z)) {
this->unk_164 |= 0x80;
}

View File

@ -362,7 +362,7 @@ void func_808DF088(EnHorseLinkChild* this, PlayState* play) {
s32 newYawDir;
s32 pad;
if (Math3D_Distance(&player->actor.world.pos, &this->actor.home.pos) < 250.0f) {
if (Math3D_Vec3f_DistXYZ(&player->actor.world.pos, &this->actor.home.pos) < 250.0f) {
newYawDiff = player->actor.shape.rot.y;
if (Actor_WorldYawTowardActor(&this->actor, &player->actor) > 0) {
newYawDir = 1;
@ -407,10 +407,10 @@ void EnHorseLinkChild_LonLonIdle(EnHorseLinkChild* this, PlayState* play) {
(this->animIndex == OOT_CHILD_EPONA_ANIM_IDLE)) {
//! @bug: The carry-over of this flag from OoT was not done correctly
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_ENTERED_ZORA_HALL)) {
f32 distToHome = Math3D_Distance(&this->actor.world.pos, &this->actor.home.pos);
f32 distToHome = Math3D_Vec3f_DistXYZ(&this->actor.world.pos, &this->actor.home.pos);
s32 pad;
if (Math3D_Distance(&player->actor.world.pos, &this->actor.home.pos) > 250.0f) {
if (Math3D_Vec3f_DistXYZ(&player->actor.world.pos, &this->actor.home.pos) > 250.0f) {
if (distToHome >= 300.0f) {
animIndex = OOT_CHILD_EPONA_ANIM_GALLOP;
this->actor.speed = 6.0f;
@ -544,7 +544,7 @@ void EnHorseLinkChild_ActionFunc4(EnHorseLinkChild* this, PlayState* play) {
if (!this->isReturningHome) {
distToTargetPos = Actor_WorldDistXZToActor(&this->actor, &GET_PLAYER(play)->actor);
} else {
distToTargetPos = Math3D_Distance(&this->actor.world.pos, &this->actor.home.pos);
distToTargetPos = Math3D_Vec3f_DistXYZ(&this->actor.world.pos, &this->actor.home.pos);
}
if (!this->isReturningHome) {

View File

@ -607,7 +607,7 @@ f32 EnInvadepoh_GetTotalPathDistance(EnInvadepoh* this) {
for (i = 1; i < pointCount; currentPathPoint++, i++) {
Math_Vec3f_Copy(&previousPathPointPos, &currentPathPointPos);
Math_Vec3s_ToVec3f(&currentPathPointPos, currentPathPoint);
totalPathDistance += Math3D_Distance(&previousPathPointPos, &currentPathPointPos);
totalPathDistance += Math3D_Vec3f_DistXYZ(&previousPathPointPos, &currentPathPointPos);
}
return totalPathDistance;
@ -688,7 +688,7 @@ s32 EnInvadepoh_Dog_IsCloseToPath(EnInvadepoh* this, f32 a, f32 b) {
// Projects the dog's current position onto the line formed by the current and next path points and checks to see if
// the projected position lies between the current and next points along the path. In other words, it makes sure the
// dog is not "behind" the current point or "ahead of" the next point along the axis formed by the two points.
pathSegmentDistance = Math3D_XZLength(diffX, diffZ);
pathSegmentDistance = Math3D_Dist1D(diffX, diffZ);
distanceAlongPath = (offsetFromPointZ * cos) + (offsetFromPointX * sin);
if ((distanceAlongPath < 0.0f) || (pathSegmentDistance < distanceAlongPath)) {
return false;
@ -770,7 +770,7 @@ void EnInvadepoh_Alien_SetCheckpoints(EnInvadepoh* this) {
for (i = 1; i < endPoint; i++, currentPathPoint++, pathCheckpoint++) {
Math_Vec3f_Copy(&previousPathPointPos, &currentPathPointPos);
Math_Vec3s_ToVec3f(&currentPathPointPos, currentPathPoint);
pathSegmentDistance += Math3D_Distance(&previousPathPointPos, &currentPathPointPos);
pathSegmentDistance += Math3D_Vec3f_DistXYZ(&previousPathPointPos, &currentPathPointPos);
*pathCheckpoint = pathSegmentDistance * invTotalPathDistance;
if (*pathCheckpoint < 0.0f) {
@ -1039,7 +1039,7 @@ s32 EnInvadepoh_Dog_MoveAlongPath(EnInvadepoh* this, PlayState* play) {
worldToCurrent.z = currentPathPointZ - this->actor.world.pos.z;
if (this->actor.speed > 0.0f) {
if (Math3D_AngleBetweenVectors(&currentToNext, &worldToNext, &angleToNext)) {
if (Math3D_CosOut(&currentToNext, &worldToNext, &angleToNext)) {
reachedNextPoint = true;
} else if (angleToNext <= 0.0f) {
reachedNextPoint = true;
@ -1129,7 +1129,7 @@ void EnInvadepoh_Alien_DesegmentTexAnims(void) {
s32 EnInvadepoh_StepToXZ(f32* pValueX, f32* pValueZ, f32 targetX, f32 targetZ, f32 step) {
f32 diffX = targetX - *pValueX;
f32 diffZ = targetZ - *pValueZ;
f32 distToTarget = Math3D_XZLength(diffX, diffZ);
f32 distToTarget = Math3D_Dist1D(diffX, diffZ);
if (step < distToTarget) {
f32 stepFraction = step / distToTarget;

View File

@ -14,9 +14,9 @@
* 4. The UFO (which appears as a spinning ball of light)
* 5. A cow tail
*/
#include "sys_cfb.h"
#include "prevent_bss_reordering.h"
#include "z_en_invadepoh_demo.h"
#include "sys_cfb.h"
#define FLAGS (ACTOR_FLAG_10)

View File

@ -317,7 +317,7 @@ void func_8095DFF0(EnIshi* this, PlayState* play) {
Matrix_RotateXS(this->actor.shape.rot.x, MTXMODE_APPLY);
Matrix_RotateZS(this->actor.shape.rot.z, MTXMODE_APPLY);
Matrix_MultVecY(1.0f, &sp30);
sp2C = Math3D_Parallel(&sp30, &D_8095F778);
sp2C = Math3D_Cos(&sp30, &D_8095F778);
if (sp2C < 0.707f) {
temp_v1_2 = Math_Atan2S_XY(sp30.z, sp30.x) - sp3C->world.rot.y;
if (ABS_ALT(temp_v1_2) > 0x4000) {

View File

@ -244,7 +244,7 @@ s32 EnJg_HasReachedPoint(EnJg* this, Path* path, s32 pointIndex) {
diffZ = points[index + 1].z - points[index - 1].z;
}
func_8017B7F8(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
Math3D_RotateXZPlane(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
if (((px * this->actor.world.pos.x) + (pz * this->actor.world.pos.z) + d) > 0.0f) {
reached = true;

View File

@ -3,7 +3,7 @@
* Overlay: ovl_En_Kusa
* Description: Grass / Bush
*/
#include "prevent_bss_reordering.h"
#include "z_en_kusa.h"
#include "objects/object_kusa/object_kusa.h"
#include "objects/gameplay_keep/gameplay_keep.h"

View File

@ -516,7 +516,7 @@ void func_80A5C410(EnKusa2UnkBssStruct* arg0, EnKusa2UnkBssSubStruct2* arg1, Vec
s32 phi_s2 = true;
Math_Vec3f_Diff(&arg1->unk_04, &s->unk_00, &sp98);
temp_f0 = Math3D_LengthSquared(&sp98);
temp_f0 = Math3D_Vec3fMagnitudeSq(&sp98);
phi_v0 = false;
if (temp_f0 <= s->unk_4C) {
@ -923,7 +923,7 @@ void func_80A5D62C(EnKusa2* this, PlayState* play) {
if (this->unk_1BE != 0) {
func_80A5B490(this, play);
func_80A5D754(this);
} else if (Math3D_XZLengthSquared(this->actor.projectedPos.x, this->actor.projectedPos.z) < SQ(1600.0f)) {
} else if (Math3D_Dist1DSq(this->actor.projectedPos.x, this->actor.projectedPos.z) < SQ(1600.0f)) {
func_80A5B160(this, play);
func_80A5D6B0(this);
}
@ -938,7 +938,7 @@ void func_80A5D6C4(EnKusa2* this, PlayState* play) {
if (this->unk_1BE != 0) {
func_80A5B490(this, play);
func_80A5D754(this);
} else if (Math3D_XZLengthSquared(this->actor.projectedPos.x, this->actor.projectedPos.z) > SQ(1750.0f)) {
} else if (Math3D_Dist1DSq(this->actor.projectedPos.x, this->actor.projectedPos.z) > SQ(1750.0f)) {
func_80A5B334(this, play);
func_80A5D618(this);
}

View File

@ -69,7 +69,7 @@ static Vec3f sCheckpointPositions[] = {
* The range extends a little bit beyond the finish line's in-game visual.
*/
s32 EnMttag_IsInFinishLine(Vec3f* pos) {
return Math3D_XZBoundCheck(-1261.0f, -901.0f, -1600.0f, -1520.0f, pos->x, pos->z);
return Math3D_PointInSquare2D(-1261.0f, -901.0f, -1600.0f, -1520.0f, pos->x, pos->z);
}
/**
@ -78,11 +78,11 @@ s32 EnMttag_IsInFinishLine(Vec3f* pos) {
*/
s32 EnMttag_CheckPlayerCheatStatus(Vec3f* pos) {
if (!CHECK_EVENTINF(EVENTINF_10)) {
if (Math3D_XZBoundCheck(-466.0f, -386.0f, -687.0f, 193.0f, pos->x, pos->z)) {
if (Math3D_PointInSquare2D(-466.0f, -386.0f, -687.0f, 193.0f, pos->x, pos->z)) {
// The race hasn't started yet, but the player is beyond the starting line.
return GORON_RACE_CHEAT_FALSE_START;
}
} else if (Math3D_XZBoundCheck(-1127.0f, -1007.0f, -867.0f, -787.0f, pos->x, pos->z)) {
} else if (Math3D_PointInSquare2D(-1127.0f, -1007.0f, -867.0f, -787.0f, pos->x, pos->z)) {
// The goal is actually quite close to the start, just behind a large wall.
// This checks if the player is in an area "behind" the goal that is not accessible
// in normal play; it can only be reached by climbing the wall somehow. Perhaps they
@ -156,7 +156,7 @@ s32 EnMttag_GetCurrentCheckpoint(Actor* actor, PlayState* play, s32* upcomingChe
// Iterates through all possible checkpoints that are associated with this sceneExitIndex.
do {
if (Math3D_PointDistToLine2D(
if (Math3D_PointDistSqToLine2DImpl(
actor->world.pos.x, actor->world.pos.z, sCheckpointPositions[checkpointIterator - 1].x,
sCheckpointPositions[checkpointIterator - 1].z, sCheckpointPositions[checkpointIterator + 1].x,
sCheckpointPositions[checkpointIterator + 1].z, &perpendicularPointX, &perpendicularPointZ,

View File

@ -154,8 +154,8 @@ s32 func_80A68910(EnMushi2* this, PlayState* play) {
params = OBJBEAN_GET_C000(bean);
if (((params == ENOBJBEAN_GET_C000_1) || (params == ENOBJBEAN_GET_C000_2)) &&
(bean->room == this->actor.room)) {
temp_f0 = Math3D_XZDistanceSquared(this->actor.world.pos.x, this->actor.world.pos.z, bean->world.pos.x,
bean->world.pos.z);
temp_f0 = Math3D_Dist2DSq(this->actor.world.pos.x, this->actor.world.pos.z, bean->world.pos.x,
bean->world.pos.z);
temp_f2 = bean->world.pos.y - this->actor.world.pos.y;
if ((temp_f0 < minDistSq) && (temp_f2 < 100.0f) && (temp_f2 > -50.0f)) {
ret = true;
@ -237,7 +237,7 @@ s32 func_80A68CE4(Vec3f* arg0, Vec3f* arg1, f32 arg2) {
f32 temp_f2;
Math_Vec3f_Diff(arg1, arg0, &sp34);
temp_f0 = Math3D_LengthSquared(&sp34);
temp_f0 = Math3D_Vec3fMagnitudeSq(&sp34);
temp_f2 = arg2 + 0.01f;
if (temp_f0 <= SQ(temp_f2)) {
Math_Vec3f_Copy(arg0, arg1);
@ -269,9 +269,9 @@ s32 func_80A68DD4(EnMushi2* this, PlayState* play) {
player = GET_PLAYER(play);
sp2E = BINANG_ROT180(this->actor.yawTowardsPlayer);
sp24 = Math_SinS(sp2E);
if (Math3D_XZDistanceSquared((sp24 * 16.0f) + player->actor.world.pos.x,
(Math_CosS(sp2E) * 16.0f) + player->actor.world.pos.z, this->actor.world.pos.x,
this->actor.world.pos.z) < SQ(20.0f)) {
if (Math3D_Dist2DSq((sp24 * 16.0f) + player->actor.world.pos.x,
(Math_CosS(sp2E) * 16.0f) + player->actor.world.pos.z, this->actor.world.pos.x,
this->actor.world.pos.z) < SQ(20.0f)) {
return true;
}
}
@ -411,8 +411,8 @@ s32 func_80A691EC(EnMushi2* this, CollisionPoly* floorPoly, f32 arg2) {
sp30 = 1;
}
Math3D_CrossProduct(&this->unk_310, &sp4C, &sp40);
Math3D_CrossProduct(&sp4C, &sp40, &sp64);
Math3D_Vec3f_Cross(&this->unk_310, &sp4C, &sp40);
Math3D_Vec3f_Cross(&sp4C, &sp40, &sp64);
if (func_80A68C5C(&sp64, &sp58) && func_80A68C5C(&sp40, &sp34)) {
Math_Vec3f_Copy(&this->unk_31C, &sp4C);
@ -606,15 +606,13 @@ void func_80A69ADC(Actor* thisx) {
s32 pad2;
if (this->unk_358 < 1.0f) {
sp44 = Math3D_SignedDistanceFromPlane(
this->unk_310.x, this->unk_310.y, this->unk_310.z,
func_80A69AA8(this->unk_310.x, this->unk_310.y, this->unk_310.z, &this->actor.world.pos),
&bean->dyna.actor.world.pos);
sp40 = Math3D_SignedDistanceFromPlane(
this->unk_328.x, this->unk_328.y, this->unk_328.z,
func_80A69AA8(this->unk_328.x, this->unk_328.y, this->unk_328.z, &this->actor.world.pos),
&bean->dyna.actor.world.pos);
sp3C = Math3D_XZLength(sp44, sp40);
sp44 = Math3D_PlaneF(this->unk_310.x, this->unk_310.y, this->unk_310.z,
func_80A69AA8(this->unk_310.x, this->unk_310.y, this->unk_310.z, &this->actor.world.pos),
&bean->dyna.actor.world.pos);
sp40 = Math3D_PlaneF(this->unk_328.x, this->unk_328.y, this->unk_328.z,
func_80A69AA8(this->unk_328.x, this->unk_328.y, this->unk_328.z, &this->actor.world.pos),
&bean->dyna.actor.world.pos);
sp3C = Math3D_Dist1D(sp44, sp40);
if (fabsf(sp3C) > 0.1f) {
this->unk_360 = (Rand_ZeroOne() * 3000.0f * (this->unk_358 - 1.0f)) + (((sp40 / sp3C) - 1.0f) * -1500.0f);
@ -652,15 +650,13 @@ void func_80A69D3C(EnMushi2* this) {
f32 sp38;
if ((this->unk_34C != NULL) && (this->unk_358 > 0.999f)) {
sp40 = Math3D_SignedDistanceFromPlane(
this->unk_310.x, this->unk_310.y, this->unk_310.z,
func_80A69AA8(this->unk_310.x, this->unk_310.y, this->unk_310.z, &this->actor.world.pos),
&this->unk_34C->dyna.actor.world.pos);
sp3C = Math3D_SignedDistanceFromPlane(
this->unk_328.x, this->unk_328.y, this->unk_328.z,
func_80A69AA8(this->unk_328.x, this->unk_328.y, this->unk_328.z, &this->actor.world.pos),
&this->unk_34C->dyna.actor.world.pos);
sp38 = Math3D_XZLengthSquared(sp40, sp3C);
sp40 = Math3D_PlaneF(this->unk_310.x, this->unk_310.y, this->unk_310.z,
func_80A69AA8(this->unk_310.x, this->unk_310.y, this->unk_310.z, &this->actor.world.pos),
&this->unk_34C->dyna.actor.world.pos);
sp3C = Math3D_PlaneF(this->unk_328.x, this->unk_328.y, this->unk_328.z,
func_80A69AA8(this->unk_328.x, this->unk_328.y, this->unk_328.z, &this->actor.world.pos),
&this->unk_34C->dyna.actor.world.pos);
sp38 = Math3D_Dist1DSq(sp40, sp3C);
if (fabsf(sp38) > 0.010000001f) {
s16 temp_v0 = Math_Atan2S_XY(sp3C, sp40);

View File

@ -896,7 +896,7 @@ s32 EnOt_ActorPathing_UpdateActorInfo(PlayState* play, ActorPathing* actorPath)
sp44.y = actorPath->curPoint.y - actorPath->prevPoint.y;
sp44.z = actorPath->curPoint.z - actorPath->prevPoint.z;
temp = Math3D_Parallel(&sp50, &sp44);
temp = Math3D_Cos(&sp50, &sp44);
if ((actorPath->distSqToCurPointXZ < SQ(thisx->speed)) || (temp <= 0.0f)) {
ret = true;
} else {

View File

@ -312,12 +312,12 @@ s32 func_8086A2CC(EnPametfrog* this, CollisionPoly* floorPoly) {
return false;
}
Math3D_CrossProduct(&this->unk_2DC, &floorNorm, &vec2);
Math3D_Vec3f_Cross(&this->unk_2DC, &floorNorm, &vec2);
EnPametfrog_Vec3fNormalize(&vec2);
Matrix_RotateAxisF(rotation, &vec2, MTXMODE_NEW);
Matrix_MultVec3f(&this->unk_2E8, &vec2);
Math_Vec3f_Copy(&this->unk_2E8, &vec2);
Math3D_CrossProduct(&this->unk_2E8, &floorNorm, &this->unk_2D0);
Math3D_Vec3f_Cross(&this->unk_2E8, &floorNorm, &this->unk_2D0);
EnPametfrog_Vec3fNormalize(&this->unk_2D0);
Math_Vec3f_Copy(&this->unk_2DC, &floorNorm);
return true;
@ -569,9 +569,9 @@ void EnPametfrog_SetupWallCrawl(EnPametfrog* this) {
this->unk_2DC.x = COLPOLY_GET_NORMAL(this->actor.wallPoly->normal.x);
this->unk_2DC.y = COLPOLY_GET_NORMAL(this->actor.wallPoly->normal.y);
this->unk_2DC.z = COLPOLY_GET_NORMAL(this->actor.wallPoly->normal.z);
Math3D_CrossProduct(&this->unk_2DC, &this->unk_2D0, &this->unk_2E8);
Math3D_Vec3f_Cross(&this->unk_2DC, &this->unk_2D0, &this->unk_2E8);
EnPametfrog_Vec3fNormalize(&this->unk_2E8);
Math3D_CrossProduct(&this->unk_2E8, &this->unk_2DC, &this->unk_2D0);
Math3D_Vec3f_Cross(&this->unk_2E8, &this->unk_2DC, &this->unk_2D0);
EnPametfrog_Vec3fNormalize(&this->unk_2D0);
func_8086A238(this);
this->actor.floorPoly = this->actor.wallPoly;
@ -684,7 +684,7 @@ void EnPametfrog_WallPause(EnPametfrog* this, PlayState* play) {
Matrix_RotateAxisF(this->wallRotation, &this->unk_2DC, MTXMODE_NEW);
Matrix_MultVec3f(&this->unk_2D0, &vec);
Math_Vec3f_Copy(&this->unk_2D0, &vec);
Math3D_CrossProduct(&this->unk_2DC, &this->unk_2D0, &this->unk_2E8);
Math3D_Vec3f_Cross(&this->unk_2DC, &this->unk_2D0, &this->unk_2E8);
func_8086A238(this);
if (((play->gameplayFrames % 60) == 0) && (Rand_ZeroOne() < 0.8f)) {
Actor_PlaySfx(&this->actor, NA_SE_EN_FROG_REAL);

View File

@ -246,7 +246,7 @@ s32 EnRat_UpdateFloorPoly(EnRat* this, CollisionPoly* floorPoly, PlayState* play
return false;
}
Math3D_CrossProduct(&this->axisUp, &normal, &vec);
Math3D_Vec3f_Cross(&this->axisUp, &normal, &vec);
magnitude = Math3D_Vec3fMagnitude(&vec);
if (magnitude < 0.001f) {
@ -258,7 +258,7 @@ s32 EnRat_UpdateFloorPoly(EnRat* this, CollisionPoly* floorPoly, PlayState* play
Matrix_RotateAxisF(angle, &vec, MTXMODE_NEW);
Matrix_MultVec3f(&this->axisLeft, &vec);
Math_Vec3f_Copy(&this->axisLeft, &vec);
Math3D_CrossProduct(&this->axisLeft, &normal, &this->axisForwards);
Math3D_Vec3f_Cross(&this->axisLeft, &normal, &this->axisForwards);
magnitude = Math3D_Vec3fMagnitude(&this->axisForwards);
if (magnitude < 0.001f) {
@ -345,7 +345,7 @@ void EnRat_ChooseDirection(EnRat* this) {
Matrix_RotateAxisF(BINANG_TO_RAD(angle), &this->axisUp, MTXMODE_NEW);
Matrix_MultVec3f(&this->axisForwards, &newAxisForwards);
Math_Vec3f_Copy(&this->axisForwards, &newAxisForwards);
Math3D_CrossProduct(&this->axisUp, &this->axisForwards, &this->axisLeft);
Math3D_Vec3f_Cross(&this->axisUp, &this->axisForwards, &this->axisLeft);
this->shouldRotateOntoSurfaces = true;
}

View File

@ -370,8 +370,8 @@ s32 func_80BF43FC(EnRg* this) {
do {
SubS_CopyPointFromPathCheckBounds(this->path, phi_s0 - 1, &sp9C);
SubS_CopyPointFromPathCheckBounds(this->path, phi_s0 + 1, &sp90);
if (Math3D_PointDistToLine2D(this->actor.world.pos.x, this->actor.world.pos.z, sp9C.x, sp9C.z, sp90.x, sp90.z,
&sp8C, &sp88, &sp84) &&
if (Math3D_PointDistSqToLine2DImpl(this->actor.world.pos.x, this->actor.world.pos.z, sp9C.x, sp9C.z, sp90.x,
sp90.z, &sp8C, &sp88, &sp84) &&
(!phi_s6 || ((phi_s4 + 1) == phi_s0) || (sp84 < phi_f20))) {
phi_s6 = 1;
phi_f20 = sp84;
@ -604,7 +604,7 @@ void func_80BF4AB8(EnRg* this, PlayState* play) {
* The range extends a little bit beyond the finish line's in-game visual.
*/
s32 EnRg_IsInFinishLine(Vec3f* pos) {
return Math3D_XZBoundCheck(-1261.0f, -901.0f, -1600.0f, -1520.0f, pos->x, pos->z);
return Math3D_PointInSquare2D(-1261.0f, -901.0f, -1600.0f, -1520.0f, pos->x, pos->z);
}
Vec3f D_80BF596C[] = {

View File

@ -148,7 +148,7 @@ s32 EnRuppecrow_HasReachedPointClockwise(EnRuppecrow* this, Path* path, s32 poin
diffZ = points[index + 1].z - points[index - 1].z;
}
func_8017B7F8(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
Math3D_RotateXZPlane(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
if (((px * this->actor.world.pos.x) + (pz * this->actor.world.pos.z) + d) > 0.0f) {
reached = true;
@ -182,7 +182,7 @@ s32 EnRuppecrow_HasReachedPointCounterClockwise(EnRuppecrow* this, Path* path, s
diffZ = points[index - 1].z - points[index + 1].z;
}
func_8017B7F8(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
Math3D_RotateXZPlane(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
if (((px * this->actor.world.pos.x) + (pz * this->actor.world.pos.z) + d) > 0.0f) {
reached = true;

View File

@ -194,7 +194,7 @@ s32 EnScopecrow_HasReachedPoint(EnScopecrow* this, Path* path, s32 pointIndex) {
diffZ = points[index + 1].z - points[index - 1].z;
}
func_8017B7F8(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
Math3D_RotateXZPlane(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
if (((px * this->actor.world.pos.x) + (pz * this->actor.world.pos.z) + d) > 0.0f) {
reached = true;

View File

@ -694,7 +694,7 @@ s32 EnScopenuts_HasReachedPoint(EnScopenuts* this, Path* path, s32 pointIndex) {
diffZ = points[index + 1].z - points[index - 1].z;
}
func_8017B7F8(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
Math3D_RotateXZPlane(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
if (((px * this->actor.world.pos.x) + (pz * this->actor.world.pos.z) + d) > 0.0f) {
reached = true;

View File

@ -954,7 +954,7 @@ s32 EnSellnuts_HasReachedPoint(EnSellnuts* this, Path* path, s32 pointIndex) {
diffZ = points[index + 1].z - points[index - 1].z;
}
func_8017B7F8(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
Math3D_RotateXZPlane(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
if (((px * this->actor.world.pos.x) + (pz * this->actor.world.pos.z) + d) > 0.0f) {
reached = true;

View File

@ -591,7 +591,7 @@ s32 EnSuttari_HasReachedPointForward(EnSuttari* this, Path* path, s32 pointIndex
diffZ = points[index + 1].z - points[index - 1].z;
}
func_8017B7F8(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
Math3D_RotateXZPlane(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
if (((px * this->actor.world.pos.x) + (pz * this->actor.world.pos.z) + d) > 0.0f) {
reached = true;
@ -625,7 +625,7 @@ s32 EnSuttari_HasReachedPointReverse(EnSuttari* this, Path* path, s32 pointIndex
diffZ = points[index - 1].z - points[index + 1].z;
}
func_8017B7F8(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
Math3D_RotateXZPlane(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
if (((px * this->actor.world.pos.x) + (pz * this->actor.world.pos.z) + d) > 0.0f) {
reached = true;

View File

@ -289,7 +289,7 @@ void func_808D90F0(EnSw* this, s32 arg1, s16 arg2) {
Matrix_RotateAxisF(BINANG_TO_RAD_ALT(temp), &this->unk_368, MTXMODE_NEW);
Matrix_MultVec3f(&this->unk_350, &sp2C);
Math_Vec3f_Copy(&this->unk_350, &sp2C);
Math3D_CrossProduct(&this->unk_368, &this->unk_350, &this->unk_35C);
Math3D_Vec3f_Cross(&this->unk_368, &this->unk_350, &this->unk_35C);
}
s32 func_808D91C4(EnSw* this, CollisionPoly* floorPoly) {
@ -319,7 +319,7 @@ s32 func_808D91C4(EnSw* this, CollisionPoly* floorPoly) {
return false;
}
Math3D_CrossProduct(&this->unk_368, &sp38, &sp2C);
Math3D_Vec3f_Cross(&this->unk_368, &sp38, &sp2C);
temp_f0 = Math3D_Vec3fMagnitude(&sp2C);
if (temp_f0 < 0.001f) {
return false;
@ -329,7 +329,7 @@ s32 func_808D91C4(EnSw* this, CollisionPoly* floorPoly) {
Matrix_RotateAxisF(sp4C, &sp2C, MTXMODE_NEW);
Matrix_MultVec3f(&this->unk_35C, &sp2C);
Math_Vec3f_Copy(&this->unk_35C, &sp2C);
Math3D_CrossProduct(&this->unk_35C, &sp38, &this->unk_350);
Math3D_Vec3f_Cross(&this->unk_35C, &sp38, &this->unk_350);
temp_f0 = Math3D_Vec3fMagnitude(&this->unk_350);
if (temp_f0 < 0.001f) {

View File

@ -590,7 +590,7 @@ s32 EnTrt2_HasReachedPoint(EnTrt2* this, Path* path, s32 pointIndex) {
diffZ = points[index + 1].z - points[index - 1].z;
}
func_8017B7F8(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
Math3D_RotateXZPlane(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
if (((px * this->actor.world.pos.x) + (pz * this->actor.world.pos.z) + d) > 0.0f) {
reached = true;

View File

@ -299,7 +299,7 @@ s32 EnTruMt_HasReachedPoint(EnTruMt* this, Path* path, s32 pointIndex) {
diffZ = points[index + 1].z - points[index - 1].z;
}
func_8017B7F8(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
Math3D_RotateXZPlane(&point, RAD_TO_BINANG(Math_FAtan2F(diffX, diffZ)), &px, &pz, &d);
if (((px * this->actor.world.pos.x) + (pz * this->actor.world.pos.z) + d) > 0.0f) {
reached = true;

View File

@ -702,7 +702,7 @@ s32 MirRay_CheckInFrustum(Vec3f* vecA, Vec3f* vecB, f32 pointx, f32 pointy, f32
sp50.y = pointy - vecA->y;
sp50.z = pointz - vecA->z;
if (Math3D_Parallel(&sp5C, &sp50) < 0.0f) {
if (Math3D_Cos(&sp5C, &sp50) < 0.0f) {
return false;
}
@ -710,7 +710,7 @@ s32 MirRay_CheckInFrustum(Vec3f* vecA, Vec3f* vecB, f32 pointx, f32 pointy, f32
sp44.y = pointy - vecB->y;
sp44.z = pointz - vecB->z;
if (Math3D_Parallel(&sp5C, &sp44) > 0.0f) {
if (Math3D_Cos(&sp5C, &sp44) > 0.0f) {
return false;
}
return true;

View File

@ -436,7 +436,7 @@ s32 func_80A24118(ObjIceblock* this, PlayState* play, f32 arg2, Vec3f* arg3) {
spF0 = Math_SinS(sp9E);
spEC = Math_CosS(sp9E);
temp_f20 = Math3D_Distance(&this->dyna.actor.world.pos, &this->dyna.actor.prevPos) +
temp_f20 = Math3D_Vec3f_DistXYZ(&this->dyna.actor.world.pos, &this->dyna.actor.prevPos) +
(300.0f * this->dyna.actor.scale.z) + arg2;
temp_f24 = temp_f20 * spF0;
temp_f26 = temp_f20 * spEC;
@ -511,7 +511,7 @@ s32 func_80A243E0(ObjIceblock* this, PlayState* play, Vec3f* arg0) {
sp100 = Math_SinS(temp_s6);
spFC = Math_CosS(temp_s6);
temp_f0 = ((Math3D_Distance(&this->dyna.actor.world.pos, &this->dyna.actor.prevPos) +
temp_f0 = ((Math3D_Vec3f_DistXYZ(&this->dyna.actor.world.pos, &this->dyna.actor.prevPos) +
(300.0f * this->dyna.actor.scale.z)) +
2.0f);
temp_f12 = -temp_f0;

View File

@ -258,7 +258,7 @@ s32 ObjMine_StepUntilParallel(Vec3f* value, Vec3f* target, f32 angleStep) {
Vec3f perpVec;
Vec3f prevValue;
Vec3f perpNormal;
f32 cosAngle = Math3D_Parallel(value, target);
f32 cosAngle = Math3D_Cos(value, target);
if (Math_CosF(angleStep) <= cosAngle) {
Math_Vec3f_Copy(value, target);
@ -267,7 +267,7 @@ s32 ObjMine_StepUntilParallel(Vec3f* value, Vec3f* target, f32 angleStep) {
Matrix_Push();
Math_Vec3f_Copy(&prevValue, value);
Math3D_CrossProduct(value, target, &perpVec);
Math3D_Vec3f_Cross(value, target, &perpVec);
if (ObjMine_GetUnitVec3f(&perpVec, &perpNormal)) {
Matrix_RotateAxisS(RAD_TO_BINANG(angleStep), &perpNormal, MTXMODE_NEW);
Matrix_MultVec3f(&prevValue, value);
@ -337,10 +337,10 @@ void ObjMine_Air_SetBasis(ObjMine* this) {
ObjMine_GetUnitVec3f(&tempVec, &airChain->basis.y);
Math3D_CrossProduct(&sStandardBasis.x, &airChain->basis.y, &tempVec);
Math3D_Vec3f_Cross(&sStandardBasis.x, &airChain->basis.y, &tempVec);
ObjMine_GetUnitVec3f(&tempVec, &airChain->basis.z);
Math3D_CrossProduct(&airChain->basis.y, &airChain->basis.z, &tempVec);
Math3D_Vec3f_Cross(&airChain->basis.y, &airChain->basis.z, &tempVec);
ObjMine_GetUnitVec3f(&tempVec, &airChain->basis.x);
}
@ -441,8 +441,8 @@ void ObjMine_Water_WallCheck(ObjMine* this, PlayState* play) {
waterChain->touchWall = false;
if (waterChain->wallCheckDistSq > -1e-6f) {
// Checks for walls if mine is sufficiently far from home. If found, sets ejection force towards home.
if (waterChain->wallCheckDistSq <= Math3D_XZDistanceSquared(this->actor.home.pos.x, this->actor.home.pos.z,
this->actor.world.pos.x, this->actor.world.pos.z)) {
if (waterChain->wallCheckDistSq <= Math3D_Dist2DSq(this->actor.home.pos.x, this->actor.home.pos.z,
this->actor.world.pos.x, this->actor.world.pos.z)) {
Vec3f centerPos;
Vec3f offsetPos;
Vec3f result; // not used
@ -628,11 +628,11 @@ void ObjMine_Water_UpdateLinks(ObjMine* this) {
tempBasisX = (prevBasisX == NULL) ? &sStandardBasis.x : prevBasisX;
Math3D_CrossProduct(tempBasisX, &newBasis.y, &tempVec);
Math3D_Vec3f_Cross(tempBasisX, &newBasis.y, &tempVec);
// Skips change of basis if any of the basis vectors would be zero.
if (ObjMine_GetUnitVec3f(&tempVec, &newBasis.z)) {
Math3D_CrossProduct(&newBasis.y, &newBasis.z, &tempVec);
Math3D_Vec3f_Cross(&newBasis.y, &newBasis.z, &tempVec);
if (ObjMine_GetUnitVec3f(&tempVec, &newBasis.x)) {
changeBasis = true;
}
@ -807,7 +807,7 @@ void ObjMine_Path_Move(ObjMine* this, PlayState* play) {
MtxF rotMtxF;
// Makes mines appear to roll while traversing the path
Math3D_CrossProduct(&sStandardBasis.y, &thisx->velocity, &yhatCrossV);
Math3D_Vec3f_Cross(&sStandardBasis.y, &thisx->velocity, &yhatCrossV);
if (ObjMine_GetUnitVec3f(&yhatCrossV, &rotAxis)) {
Matrix_RotateAxisF(thisx->speed / PATH_RADIUS, &rotAxis, MTXMODE_NEW);
Matrix_RotateYS(thisx->shape.rot.y, MTXMODE_APPLY);
@ -924,8 +924,8 @@ void ObjMine_Air_Chained(ObjMine* this, PlayState* play) {
// Checks for wall collisions if sufficiently far from home. If collision detected, bounce off the wall at half
// speed. If speed is close to zero when hitting wall, weakly eject it instead.
if (airChain->wallCheckDistSq > -1e-6f) {
if (airChain->wallCheckDistSq <= Math3D_XZDistanceSquared(this->actor.world.pos.x, this->actor.world.pos.z,
this->actor.home.pos.x, this->actor.home.pos.z)) {
if (airChain->wallCheckDistSq <= Math3D_Dist2DSq(this->actor.world.pos.x, this->actor.world.pos.z,
this->actor.home.pos.x, this->actor.home.pos.z)) {
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, AIR_RADIUS, 0.0f, UPDBGCHECKINFO_FLAG_1);
@ -946,7 +946,7 @@ void ObjMine_Air_Chained(ObjMine* this, PlayState* play) {
wallNormal.y = COLPOLY_GET_NORMAL(this->actor.wallPoly->normal.y);
wallNormal.z = COLPOLY_GET_NORMAL(this->actor.wallPoly->normal.z);
func_80179F64(&xzDir, &wallNormal, &reflectedDir);
Math3D_Vec3fReflect(&xzDir, &wallNormal, &reflectedDir);
xzSpeed /= 2.0f;
airChain->velocity.x = reflectedDir.x * xzSpeed;

View File

@ -211,7 +211,7 @@ void ObjMure2_SetupWaitForPlayerInRange(ObjMure2* this) {
}
void ObjMure2_WaitForPlayerInRange(ObjMure2* this, PlayState* play) {
if (Math3D_XZLengthSquared(this->actor.projectedPos.x, this->actor.projectedPos.z) <
if (Math3D_Dist1DSq(this->actor.projectedPos.x, this->actor.projectedPos.z) <
sActivationRangesSq[OBJ_MURE2_GET_CHILD_TYPE(&this->actor)] * this->rangeMultiplier) {
this->actor.flags |= ACTOR_FLAG_10;
ObjMure2_SpawnChildren(this, play);
@ -227,7 +227,7 @@ void ObjMure2_WaitForPlayerOutOfRange(ObjMure2* this, PlayState* play) {
ObjMure2_ClearChildrenList(this);
if ((sDeactivationRangesSq[OBJ_MURE2_GET_CHILD_TYPE(&this->actor)] * this->rangeMultiplier) <=
Math3D_XZLengthSquared(this->actor.projectedPos.x, this->actor.projectedPos.z)) {
Math3D_Dist1DSq(this->actor.projectedPos.x, this->actor.projectedPos.z)) {
this->actor.flags &= ~ACTOR_FLAG_10;
ObjMure2_KillChildren(this, play);
ObjMure2_SetupWaitForPlayerInRange(this);

View File

@ -173,7 +173,7 @@ void func_8098F5D0(ObjMure3* this) {
void func_8098F5E4(ObjMure3* this, PlayState* play) {
static ObjMure3SpawnFunc sSpawnFuncs[] = { func_8098F040, func_8098F110, func_8098F220 };
if (Math3D_XZLengthSquared(this->actor.projectedPos.x, this->actor.projectedPos.z) < SQ(1150.0f)) {
if (Math3D_Dist1DSq(this->actor.projectedPos.x, this->actor.projectedPos.z) < SQ(1150.0f)) {
this->actor.flags |= ACTOR_FLAG_10;
sSpawnFuncs[OBJMURE3_PARAM_RUPEEINDEX(&this->actor)](this, play);
func_8098F66C(this);
@ -186,7 +186,7 @@ void func_8098F66C(ObjMure3* this) {
void func_8098F680(ObjMure3* this, PlayState* play) {
func_8098F438(this, play);
if (Math3D_XZLengthSquared(this->actor.projectedPos.x, this->actor.projectedPos.z) >= SQ(1450.0f)) {
if (Math3D_Dist1DSq(this->actor.projectedPos.x, this->actor.projectedPos.z) >= SQ(1450.0f)) {
this->actor.flags &= ~ACTOR_FLAG_10;
func_8098F364(this, play);
func_8098F5D0(this);

View File

@ -234,7 +234,7 @@ s32 func_80A216D4(ObjSkateblock* this, PlayState* play, f32 arg2, Vec3f* arg3) {
spE8 = Math_SinS(sp96);
spE4 = Math_CosS(sp96);
temp_f2 = Math3D_Distance(&this->dyna.actor.world.pos, &this->dyna.actor.prevPos) +
temp_f2 = Math3D_Vec3f_DistXYZ(&this->dyna.actor.world.pos, &this->dyna.actor.prevPos) +
(300.0f * this->dyna.actor.scale.z) + arg2;
temp_f24 = temp_f2 * spE8;
temp_f26 = temp_f2 * spE4;
@ -306,9 +306,9 @@ s32 func_80A21990(ObjSkateblock* this, PlayState* play, Vec3f* arg2) {
sp100 = Math_SinS(phi_s6);
temp_f26 = Math_CosS(phi_s6);
temp_f12 =
(300.0f * this->dyna.actor.scale.z + Math3D_Distance(&this->dyna.actor.world.pos, &this->dyna.actor.prevPos)) +
2.0f;
temp_f12 = (300.0f * this->dyna.actor.scale.z +
Math3D_Vec3f_DistXYZ(&this->dyna.actor.world.pos, &this->dyna.actor.prevPos)) +
2.0f;
temp_f28 = -temp_f12 * sp100;
temp_f30 = -temp_f12 * temp_f26;

View File

@ -691,7 +691,7 @@ void func_80B047C0(ObjSnowball* this, PlayState* play) {
sp84 = this->unk_20C * 60.0f * 0.9f;
if (sp88.y > 0.0f) {
if (Math3D_AngleBetweenVectors(&D_80B04FD8, &sp88, &sp7C)) {
if (Math3D_CosOut(&D_80B04FD8, &sp88, &sp7C)) {
phi_f2 = 1.0f;
} else {
phi_f2 = 1.0f - SQ(sp7C);

View File

@ -328,7 +328,7 @@ static InitChainEntry sInitChain[] = {
};
s32 func_80B2FB10(Vec3f* arg0, Vec3f* arg1) {
f32 temp_f0 = Math3D_LengthSquared(arg0);
f32 temp_f0 = Math3D_Vec3fMagnitudeSq(arg0);
f32 temp_f2;
if (temp_f0 < 9.999999e-9f) {
@ -396,7 +396,7 @@ bool func_80B2FC98(TriNorm* triNorm, Vec3f* arg1) {
sp78.y = vtx2->y - arg1->y;
sp78.z = vtx2->z - arg1->z;
Math3D_CrossProduct(&sp84, &sp78, &sp4C[i]);
Math3D_Vec3f_Cross(&sp84, &sp78, &sp4C[i]);
vtx2 = vtx;
}
@ -416,7 +416,7 @@ bool func_80B2FC98(TriNorm* triNorm, Vec3f* arg1) {
sp78.y = 0.0f;
sp78.z = vtx2->z - arg1->z;
Math3D_CrossProduct(&sp84, &sp78, &sp4C[i]);
Math3D_Vec3f_Cross(&sp84, &sp78, &sp4C[i]);
vtx2 = vtx;
}
@ -436,7 +436,7 @@ bool func_80B2FC98(TriNorm* triNorm, Vec3f* arg1) {
sp78.y = vtx2->y - arg1->y;
sp78.z = 0.0f;
Math3D_CrossProduct(&sp84, &sp78, &sp4C[i]);
Math3D_Vec3f_Cross(&sp84, &sp78, &sp4C[i]);
vtx2 = vtx;
}
@ -467,9 +467,9 @@ void func_80B300F4(ObjSpidertent* thisx, PlayState* play, TriNorm* triNorm, Vec3
spAC.z = triNorm->plane.normal.z;
if (triNorm->plane.normal.y < 0.5f) {
Math3D_CrossProduct(&spAC, &D_80B3140C, &sp88);
Math3D_Vec3f_Cross(&spAC, &D_80B3140C, &sp88);
} else {
Math3D_CrossProduct(&spAC, &D_80B31400, &sp88);
Math3D_Vec3f_Cross(&spAC, &D_80B31400, &sp88);
}
if (func_80B2FB10(&sp88, &spA0)) {

View File

@ -254,7 +254,7 @@ s32 func_80A1DEB8(ObjSpinyroll* this) {
Math_Vec3f_Diff(&this->unk_4AC[sp30], &this->dyna.actor.world.pos, &sp24);
return Math3D_LengthSquared(&sp24) < (SQ(this->dyna.actor.speed) + 0.05f);
return Math3D_Vec3fMagnitudeSq(&sp24) < (SQ(this->dyna.actor.speed) + 0.05f);
}
void func_80A1DFA0(ObjSpinyroll* this) {

View File

@ -652,7 +652,7 @@ s32 ObjSwitch_IsEyeSwitchHit(ObjSwitch* this) {
Matrix_RotateZS(actor->shape.rot.z, MTXMODE_APPLY);
Matrix_MultVecZ(1.0f, &sp20);
Matrix_Pop();
if ((Math3D_Parallel(&sp2C, &sp20) < COS_OF_5_PI_DIV_8)) {
if ((Math3D_Cos(&sp2C, &sp20) < COS_OF_5_PI_DIV_8)) {
return true;
}
}

View File

@ -161,7 +161,7 @@ void ObjToge_Init(Actor* thisx, PlayState* play) {
this->unk_1C8 = Math_CosS(sp36);
this->unk_1CC = Math_SinS(sp36);
this->unk_1C0 = sp3E * 7.5f;
this->unk_1C4 = Math3D_Distance(&this->unk_198[0], &this->unk_198[1]) * 0.5f;
this->unk_1C4 = Math3D_Vec3f_DistXYZ(&this->unk_198[0], &this->unk_198[1]) * 0.5f;
} else {
this->unk_1B4 = false;
}

View File

@ -370,7 +370,7 @@ s32 func_80B783E0(ObjUm* this, PlayState* play, s32 banditIndex, EnHorse* bandit
return 0;
}
if (Math3D_Distance(&bandit->actor.world.pos, &this->dyna.actor.world.pos) < 800.0f) {
if (Math3D_Vec3f_DistXYZ(&bandit->actor.world.pos, &this->dyna.actor.world.pos) < 800.0f) {
if (banditIndex == 0) {
this->flags |= OBJ_UM_FLAG_0200;
} else {
@ -397,7 +397,7 @@ s32 func_80B783E0(ObjUm* this, PlayState* play, s32 banditIndex, EnHorse* bandit
temp_a1 = Math_Atan2S(phi_f12, phi_f14);
func_8017B7F8(&sp50, temp_a1, &sp4C, &sp48, &sp44);
Math3D_RotateXZPlane(&sp50, temp_a1, &sp4C, &sp48, &sp44);
if (((bandit->actor.world.pos.x * sp4C) + (sp48 * bandit->actor.world.pos.z) + sp44) > 0.0f) {
bandit->curRaceWaypoint++;
if (bandit->curRaceWaypoint >= sp68) {
@ -480,14 +480,14 @@ s32 func_80B78764(ObjUm* this, PlayState* play, EnHorse* bandit1, EnHorse* bandi
func_80B781DC(this, bandit1, bandit2, play);
}
Math3D_Lerp(&bandit1->unk_540, &this->unk_360[bandit1->unk_550], 1.0f - ((f32)bandit1->unk_55C / bandit1->unk_560),
&sp30);
Math3D_LineSplitRatio(&bandit1->unk_540, &this->unk_360[bandit1->unk_550],
1.0f - ((f32)bandit1->unk_55C / bandit1->unk_560), &sp30);
bandit1->banditPosition = sp30;
bandit1->unk_588 = this->dyna.actor.shape.rot.y;
if ((bandit1->unk_550 == 10) || ((bandit1->unk_550 == 8))) {
phi_v1_5 = bandit1->unk_588;
} else if (Math3D_Distance(&bandit1->actor.prevPos, &bandit1->actor.world.pos) < 10.0f) {
} else if (Math3D_Vec3f_DistXYZ(&bandit1->actor.prevPos, &bandit1->actor.world.pos) < 10.0f) {
phi_v1_5 = bandit1->unk_588;
} else {
phi_v1_5 = Math_Vec3f_Yaw(&bandit1->actor.prevPos, &bandit1->actor.world.pos);
@ -1071,7 +1071,7 @@ ObjUmPathState ObjUm_UpdatePath(ObjUm* this, PlayState* play) {
angle = Math_Atan2S(xDiff, zDiff);
func_8017B7F8(&sp50, angle, &sp4C, &sp48, &sp44);
Math3D_RotateXZPlane(&sp50, angle, &sp4C, &sp48, &sp44);
if (((this->dyna.actor.world.pos.x * sp4C) + (sp48 * this->dyna.actor.world.pos.z) + sp44) > 0.0f) {
this->pointIndex++;
@ -1832,7 +1832,7 @@ s32 ObjUm_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
sp3E = Math_Vec3f_Yaw(&this->dyna.actor.focus.pos, &sp30) - this->dyna.actor.shape.rot.y;
temp_v0_3 = Math_Atan2S(
this->dyna.actor.focus.pos.y - sp30.y,
Math3D_XZLength(sp30.x - this->dyna.actor.focus.pos.x, sp30.z - this->dyna.actor.focus.pos.z));
Math3D_Dist1D(sp30.x - this->dyna.actor.focus.pos.x, sp30.z - this->dyna.actor.focus.pos.z));
this->unk_2FE.x = rot->x + sp3E;
this->unk_2FE.y = rot->y;
this->unk_2FE.z = rot->z + temp_v0_3;

View File

@ -130,7 +130,7 @@ s32 func_80A3C700(ObjVspinyroll* this) {
this->dyna.actor.world.pos.z += this->dyna.actor.speed * this->unk_3B4.z;
Math_Vec3f_Diff(&this->unk_39C[sp30], &this->dyna.actor.world.pos, &sp24);
return Math3D_LengthSquared(&sp24) < (SQ(this->dyna.actor.speed) + 0.05f);
return Math3D_Vec3fMagnitudeSq(&sp24) < (SQ(this->dyna.actor.speed) + 0.05f);
}
void func_80A3C7E8(ObjVspinyroll* this) {

View File

@ -79,10 +79,7 @@ void ObjWind_Update(Actor* thisx, PlayState* play) {
ObjWind* this = (ObjWind*)thisx;
ObjWindStruct* entry = &D_80B2448C[OBJ_WIND_GET_TYPE(thisx)];
Player* player;
f32 upZ;
f32 upY;
f32 upX;
Vec3f posCopy;
InfiniteLine line;
Vec3f nearestPoint;
Vec3f sp54;
f32 upXZ; // reused temp
@ -107,12 +104,12 @@ void ObjWind_Update(Actor* thisx, PlayState* play) {
if ((OBJ_WIND_GET_SWITCH_FLAG(thisx) == 0x7F) || !Flags_GetSwitch(play, OBJ_WIND_GET_SWITCH_FLAG(thisx))) {
player = GET_PLAYER(play);
Math_Vec3f_Copy(&posCopy, &this->actor.world.pos);
upY = Math_CosS(this->actor.shape.rot.x);
Math_Vec3f_Copy(&line.point, &this->actor.world.pos);
line.dir.y = Math_CosS(this->actor.shape.rot.x);
upXZ = Math_SinS(this->actor.shape.rot.x);
upX = Math_SinS(this->actor.shape.rot.y) * upXZ;
upZ = Math_CosS(this->actor.shape.rot.y) * upXZ;
distToNearestPoint = func_80179A44(&posCopy, &player->actor.world, &nearestPoint);
line.dir.x = Math_SinS(this->actor.shape.rot.y) * upXZ;
line.dir.z = Math_CosS(this->actor.shape.rot.y) * upXZ;
distToNearestPoint = Math3D_LineClosestToPoint(&line, &player->actor.world.pos, &nearestPoint);
if ((distToNearestPoint >= 0.0f) && (distToNearestPoint < entry->unk_0)) {
upXZ = Math_Vec3f_DistXYZAndStoreDiff(&player->actor.world.pos, &nearestPoint, &sp54);
if (upXZ < entry->unk_2) {
@ -137,9 +134,9 @@ void ObjWind_Update(Actor* thisx, PlayState* play) {
upXZ = 1.0f / upXZ;
}
temp_ft0 *= upXZ;
windSpeedX = (upX * windMagnitude) + (sp54.x * temp_ft0);
windSpeedY = (upY * windMagnitude) + (sp54.y * temp_ft0);
windSpeedZ = (upZ * windMagnitude) + (sp54.z * temp_ft0);
windSpeedX = (line.dir.x * windMagnitude) + (sp54.x * temp_ft0);
windSpeedY = (line.dir.y * windMagnitude) + (sp54.y * temp_ft0);
windSpeedZ = (line.dir.z * windMagnitude) + (sp54.z * temp_ft0);
player->windSpeed = sqrtf(SQ(windSpeedX) + SQ(windSpeedY) + SQ(windSpeedZ));
player->windAngleY = Math_Atan2S_XY(windSpeedZ, windSpeedX);

View File

@ -107,7 +107,7 @@ u32 EffectSsSbn_Init(PlayState* play, u32 index, EffectSs* this, void* initParam
bubbleVec.x = -mtx.mf[2][0] * 10.0f;
bubbleVec.y = -mtx.mf[2][1] * 10.0f;
bubbleVec.z = -mtx.mf[2][2] * 10.0f;
Math3D_AngleBetweenVectors(&colPolyVec, &bubbleVec, &angle);
Math3D_CosOut(&colPolyVec, &bubbleVec, &angle);
opposite = (SQ(angle) >= 1.0f) ? 0.0f : sqrtf(1.0f - SQ(angle));
if (((mtx.mf[0][0] * colPolyVec.x) + (mtx.mf[0][1] * colPolyVec.y) + (mtx.mf[0][2] * colPolyVec.z)) < 0.0f) {

View File

@ -3257,97 +3257,97 @@
0x801795C0:("Rand_CenteredFloat",),
0x801795F0:("Math3D_Normalize",),
0x80179678:("Math3D_PlaneVsLineSegClosestPoint",),
0x80179798:("func_80179798",),
0x80179A44:("func_80179A44",),
0x80179B34:("func_80179B34",),
0x80179B94:("func_80179B94",),
0x80179D74:("func_80179D74",),
0x80179DF0:("Math3D_ScaleAndAdd",),
0x80179E3C:("Math3D_Lerp",),
0x80179E88:("Math3D_Parallel",),
0x80179EAC:("Math3D_AngleBetweenVectors",),
0x80179F64:("func_80179F64",),
0x8017A038:("Math3D_XZBoundCheck",),
0x8017A09C:("func_8017A09C",),
0x8017A1D0:("func_8017A1D0",),
0x8017A304:("func_8017A304",),
0x8017A438:("func_8017A438",),
0x8017A5F8:("Math3D_XZLengthSquared",),
0x8017A610:("Math3D_XZLength",),
0x8017A634:("Math3D_XZDistanceSquared",),
0x8017A678:("Math3D_XZDistance",),
0x8017A6A8:("Math3D_LengthSquared",),
0x80179798:("Math3D_LineSegMakePerpLineSeg",),
0x80179A44:("Math3D_LineClosestToPoint",),
0x80179B34:("Math3D_FindPointOnPlaneIntersect",),
0x80179B94:("Math3D_PlaneVsPlaneNewLine",),
0x80179D74:("Math3D_PlaneVsPlaneVsLineClosestPoint",),
0x80179DF0:("Math3D_PointOnDirectedLine",),
0x80179E3C:("Math3D_LineSplitRatio",),
0x80179E88:("Math3D_Cos",),
0x80179EAC:("Math3D_CosOut",),
0x80179F64:("Math3D_Vec3fReflect",),
0x8017A038:("Math3D_PointInSquare2D",),
0x8017A09C:("Math3D_CirSquareVsTriSquareXY",),
0x8017A1D0:("Math3D_CirSquareVsTriSquareYZ",),
0x8017A304:("Math3D_CirSquareVsTriSquareZX",),
0x8017A438:("Math3D_SphCubeVsTriCube",),
0x8017A5F8:("Math3D_Dist1DSq",),
0x8017A610:("Math3D_Dist1D",),
0x8017A634:("Math3D_Dist2DSq",),
0x8017A678:("Math3D_Dist2D",),
0x8017A6A8:("Math3D_Vec3fMagnitudeSq",),
0x8017A6D4:("Math3D_Vec3fMagnitude",),
0x8017A6F8:("Math3D_Vec3fDistSq",),
0x8017A720:("Math3D_Distance",),
0x8017A740:("Math3D_DistanceS",),
0x8017A7B8:("func_8017A7B8",),
0x8017A7F8:("func_8017A7F8",),
0x8017A838:("func_8017A838",),
0x8017A878:("Math3D_CrossProduct",),
0x8017A720:("Math3D_Vec3f_DistXYZ",),
0x8017A740:("Math3D_DistXYZ16toF",),
0x8017A7B8:("Math3D_Vec3fDiff_CrossZ",),
0x8017A7F8:("Math3D_Vec3fDiff_CrossX",),
0x8017A838:("Math3D_Vec3fDiff_CrossY",),
0x8017A878:("Math3D_Vec3f_Cross",),
0x8017A8EC:("Math3D_SurfaceNorm",),
0x8017A954:("Math3D_PointRelativeToCubeFaces",),
0x8017AA0C:("Math3D_PointRelativeToCubeEdges",),
0x8017ABBC:("Math3D_PointRelativeToCubeVertices",),
0x8017AD38:("Math3D_LineVsCube",),
0x8017B68C:("func_8017B68C",),
0x8017B7F8:("func_8017B7F8",),
0x8017B884:("Math3D_UnitNormalVector",),
0x8017B998:("Math3D_SignedDistanceFromPlane",),
0x8017B9D8:("func_8017B9D8",),
0x8017B68C:("Math3D_LineVsCubeShort",),
0x8017B7F8:("Math3D_RotateXZPlane",),
0x8017B884:("Math3D_DefPlane",),
0x8017B998:("Math3D_PlaneF",),
0x8017B9D8:("Math3D_Plane",),
0x8017BA14:("Math3D_UDistPlaneToPos",),
0x8017BA4C:("Math3D_DistPlaneToPos",),
0x8017BAD0:("Math3D_TriChkPointParaYDist",),
0x8017BD98:("func_8017BD98",),
0x8017BDE0:("func_8017BDE0",),
0x8017BAD0:("Math3D_TriChkPointParaYImpl",),
0x8017BD98:("Math3D_TriChkPointParaYDeterminate",),
0x8017BDE0:("Math3D_TriChkPointParaYSlopedY",),
0x8017BE30:("Math3D_TriChkPointParaYIntersectDist",),
0x8017BEE0:("Math3D_TriChkPointParaYIntersectInsideTri",),
0x8017BF8C:("func_8017BF8C",),
0x8017BF8C:("Math3D_TriChkPointParaY",),
0x8017C008:("Math3D_TriChkLineSegParaYIntersect",),
0x8017C17C:("func_8017C17C",),
0x8017C1F0:("func_8017C1F0",),
0x8017C494:("Math3D_TriChkPointParaYIntersectInsideTri2",),
0x8017C540:("Math3D_TriChkPointParaXDist",),
0x8017C808:("func_8017C808",),
0x8017C17C:("Math3D_TriChkPointParaYDist",),
0x8017C1F0:("Math3D_TriChkPointParaYImplNoCheckRange",),
0x8017C494:("Math3D_TriChkPointParaYNoRangeCheckIntersectInsideTri",),
0x8017C540:("Math3D_TriChkPointParaXImpl",),
0x8017C808:("Math3D_TriChkPointParaXDeterminate",),
0x8017C850:("Math3D_TriChkPointParaXIntersect",),
0x8017C904:("func_8017C904",),
0x8017C904:("Math3D_TriChkPointParaX",),
0x8017C980:("Math3D_TriChkLineSegParaXIntersect",),
0x8017CB08:("func_8017CB08",),
0x8017CB7C:("Math3D_TriChkLineSegParaZDist",),
0x8017CEA8:("func_8017CEA8",),
0x8017CB08:("Math3D_TriChkLineSegParaXDist",),
0x8017CB7C:("Math3D_TriChkPointParaZImpl",),
0x8017CEA8:("Math3D_TriChkPointParaZDeterminate",),
0x8017CEF0:("Math3D_TriChkPointParaZIntersect",),
0x8017CFA4:("func_8017CFA4",),
0x8017CFA4:("Math3D_TriChkPointParaZ",),
0x8017D020:("Math3D_TriChkLineSegParaZIntersect",),
0x8017D1AC:("func_8017D1AC",),
0x8017D220:("func_8017D220",),
0x8017D1AC:("Math3D_TriChkLineSegParaZDist",),
0x8017D220:("Math3D_LineSegFindPlaneIntersect",),
0x8017D2FC:("Math3D_LineSegVsPlane",),
0x8017D404:("func_8017D404",),
0x8017D568:("Math3D_TriSetCoords",),
0x8017D618:("Math3D_IsPointInSphere",),
0x8017D668:("Math3D_PointDistToLine2D",),
0x8017D7C0:("func_8017D7C0",),
0x8017D814:("func_8017D814",),
0x8017D91C:("func_8017D91C",),
0x8017DA24:("func_8017DA24",),
0x8017D404:("Math3D_TriLineIntersect",),
0x8017D568:("Math3D_TriNorm",),
0x8017D618:("Math3D_PointInSph",),
0x8017D668:("Math3D_PointDistSqToLine2DImpl",),
0x8017D7C0:("Math3D_PointDistSqToLine2D",),
0x8017D814:("Math3D_PointDistSqToLineXY",),
0x8017D91C:("Math3D_PointDistSqToLineYZ",),
0x8017DA24:("Math3D_PointDistSqToLineZX",),
0x8017DB2C:("Math3D_LineVsSph",),
0x8017DD34:("func_8017DD34",),
0x8017DE74:("Math3D_ColSphereTri",),
0x8017E294:("func_8017E294",),
0x8017E350:("func_8017E350",),
0x8017ED20:("Math3D_ColCylinderTri",),
0x8017F1A0:("func_8017F1A0",),
0x8017DD34:("Math3D_GetSphVsTriIntersectPoint",),
0x8017DE74:("Math3D_TriVsSphIntersect",),
0x8017E294:("Math3D_PointInCyl",),
0x8017E350:("Math3D_CylVsLineSeg",),
0x8017ED20:("Math3D_CylTriVsIntersect",),
0x8017F1A0:("Math3D_CylVsTri",),
0x8017F1C0:("Math3D_SphVsSph",),
0x8017F1E0:("Math3D_ColSphereSphereIntersect",),
0x8017F200:("Math3D_ColSphereSphereIntersectAndDistance",),
0x8017F2CC:("Math3D_ColSphereCylinderDistance",),
0x8017F2EC:("Math3D_ColSphereCylinderDistanceAndAmount",),
0x8017F45C:("Math3D_ColCylinderCylinderAmount",),
0x8017F47C:("Math3D_ColCylinderCylinderAmountAndDistance",),
0x8017F64C:("Math3d_ColTriTri",),
0x8017F1E0:("Math3D_SphVsSphOverlap",),
0x8017F200:("Math3D_SphVsSphOverlapCenterDist",),
0x8017F2CC:("Math3D_SphVsCylOverlap",),
0x8017F2EC:("Math3D_SphVsCylOverlapCenterDist",),
0x8017F45C:("Math3D_CylVsCylOverlap",),
0x8017F47C:("Math3D_CylVsCylOverlapCenterDist",),
0x8017F64C:("Math3D_TriVsTriIntersect",),
0x8017F9C0:("Math3D_XZInSphere",),
0x8017FA34:("Math3D_XYInSphere",),
0x8017FAA8:("Math3D_YZInSphere",),
0x8017FB1C:("func_8017FB1C",),
0x8017FB1C:("Math3D_CircleLineIntersections",),
0x8017FD44:("func_8017FD44",),
0x8017FEB0:("Math_GetAtan2Tbl",),
0x8017FEE4:("Math_Atan2S",),

View File

@ -3556,7 +3556,7 @@
0x801E0138:("D_801E0138","f32","",0x4),
0x801E013C:("D_801E013C","f32","",0x4),
0x801E0140:("D_801E0140","f32","",0x4),
0x801E0144:("Math3D_AngleBetweenVectors_min_length","f32","",0x4),
0x801E0144:("Math3D_CosOut_min_length","f32","",0x4),
0x801E0148:("D_801E0148","f32","",0x4),
0x801E014C:("D_801E014C","f32","",0x4),
0x801E0150:("Math3D_UnitNormalVector_min_length","f32","",0x4),
@ -4053,78 +4053,36 @@
0x801FBBD2:("gCfbUpperAdjust","UNK_TYPE1","",0x1),
0x801FBBD4:("gSysCfbHiResEnabled","UNK_TYPE1","",0x1),
0x801FBBE0:("sDmaBuffer","u32","[2]",0x8),
0x801FBBF0:("D_801FBBF0","Vec3f","",0xc),
0x801FBC00:("Math3D_ColSphereTri_line","LineSegment","",0x18),
0x801FBC18:("Math3D_ColSphereTri_point","Vec3f","",0xc),
0x801FBC28:("D_801FBC28","UNK_TYPE1","",0x1),
0x801FBC2C:("D_801FBC2C","UNK_TYPE1","",0x1),
0x801FBC30:("D_801FBC30","UNK_TYPE1","",0x1),
0x801FBC38:("D_801FBC38","UNK_TYPE1","",0x1),
0x801FBC3A:("D_801FBC3A","UNK_TYPE1","",0x1),
0x801FBC3C:("D_801FBC3C","UNK_TYPE1","",0x1),
0x801FBC3E:("D_801FBC3E","UNK_TYPE1","",0x1),
0x801FBC40:("D_801FBC40","UNK_TYPE1","",0x1),
0x801FBC42:("D_801FBC42","UNK_TYPE1","",0x1),
0x801FBC44:("D_801FBC44","UNK_TYPE1","",0x1),
0x801FBC46:("D_801FBC46","UNK_TYPE1","",0x1),
0x801FBC48:("D_801FBC48","UNK_TYPE1","",0x1),
0x801FBC58:("D_801FBC58","UNK_TYPE1","",0x1),
0x801FBC68:("Math3D_SurfaceNorm_temp1","Vec3f","",0xc),
0x801FBC78:("Math3D_SurfaceNorm_temp2","Vec3f","",0xc),
0x801FBC8C:("D_801FBC8C","f32","",0x4),
0x801FBC90:("D_801FBC90","f32","",0x4),
0x801FBC98:("D_801FBC98","f32","",0x4),
0x801FBCA4:("D_801FBCA4","f32","",0x4),
0x801FBCAC:("D_801FBCAC","f32","",0x4),
0x801FBCB0:("D_801FBCB0","f32","",0x4),
0x801FBCB4:("D_801FBCB4","f32","",0x4),
0x801FBCB8:("D_801FBCB8","f32","",0x4),
0x801FBCBC:("D_801FBCBC","f32","",0x4),
0x801FBCC0:("D_801FBCC0","f32","",0x4),
0x801FBCC4:("D_801FBCC4","f32","",0x4),
0x801FBCC8:("D_801FBCC8","f32","",0x4),
0x801FBCCC:("D_801FBCCC","f32","",0x4),
0x801FBCD0:("D_801FBCD0","f32","",0x4),
0x801FBCD4:("D_801FBCD4","f32","",0x4),
0x801FBCD8:("D_801FBCD8","f32","",0x4),
0x801FBCDC:("D_801FBCDC","f32","",0x4),
0x801FBCE0:("D_801FBCE0","UNK_TYPE1","",0x1),
0x801FBCE4:("D_801FBCE4","UNK_TYPE1","",0x1),
0x801FBCE8:("D_801FBCE8","UNK_TYPE1","",0x1),
0x801FBCF0:("D_801FBCF0","UNK_TYPE1","",0x1),
0x801FBCF4:("D_801FBCF4","UNK_TYPE1","",0x1),
0x801FBCF8:("D_801FBCF8","UNK_TYPE1","",0x1),
0x801FBD00:("D_801FBD00","UNK_TYPE1","",0x1),
0x801FBD04:("D_801FBD04","UNK_TYPE1","",0x1),
0x801FBD08:("D_801FBD08","UNK_TYPE1","",0x1),
0x801FBD10:("D_801FBD10","UNK_TYPE1","",0x1),
0x801FBD20:("D_801FBD20","UNK_TYPE1","",0x1),
0x801FBD24:("D_801FBD24","UNK_TYPE1","",0x1),
0x801FBD28:("D_801FBD28","UNK_TYPE1","",0x1),
0x801FBD30:("D_801FBD30","UNK_TYPE1","",0x1),
0x801FBD34:("D_801FBD34","UNK_TYPE1","",0x1),
0x801FBD38:("D_801FBD38","UNK_TYPE1","",0x1),
0x801FBD40:("D_801FBD40","UNK_TYPE1","",0x1),
0x801FBD44:("D_801FBD44","UNK_TYPE1","",0x1),
0x801FBD48:("D_801FBD48","UNK_TYPE1","",0x1),
0x801FBD50:("D_801FBD50","UNK_TYPE1","",0x1),
0x801FBD54:("D_801FBD54","UNK_TYPE1","",0x1),
0x801FBD58:("D_801FBD58","UNK_TYPE1","",0x1),
0x801FBD60:("Math3D_UnitNormalVector_temp","Vec3f","",0xc),
0x801FBD70:("D_801FBD70","UNK_TYPE1","",0x1),
0x801FBD74:("D_801FBD74","UNK_TYPE1","",0x1),
0x801FBD78:("D_801FBD78","UNK_TYPE1","",0x1),
0x801FBD80:("D_801FBD80","Vec3f","[2]",0x18),
0x801FBD98:("D_801FBD98","Vec3f","",0xc),
0x801FBDA4:("D_801FBDA4","Vec3f","",0xc),
0x801FBDB0:("D_801FBDB0","UNK_TYPE1","",0x1),
0x801FBDB4:("D_801FBDB4","UNK_TYPE1","",0x1),
0x801FBDB8:("D_801FBDB8","UNK_TYPE1","",0x1),
0x801FBDC0:("D_801FBDC0","UNK_TYPE1","",0x1),
0x801FBDD8:("D_801FBDD8","UNK_TYPE1","",0x1),
0x801FBDDC:("D_801FBDDC","UNK_TYPE1","",0x1),
0x801FBDE0:("D_801FBDE0","UNK_TYPE1","",0x1),
0x801FBDE8:("D_801FBDE8","Vec3f","",0xc),
0x801FBBF0:("sSphereCenter","Vec3f","",0xc),
0x801FBC00:("sTriTestLine","Linef","",0x18),
0x801FBC18:("sSphereCenter","Vec3f","",0xc),
0x801FBC28:("sSphPlanePos","Vec3f","",0xC),
0x801FBC38:("sTopSphere","Sphere16","",0x8),
0x801FBC40:("sBottomSphere","Sphere16","",0x8),
0x801FBC48:("sCylIntersectA","Vec3f","",0xC),
0x801FBC58:("sCylIntersectB","Vec3f","",0xC),
0x801FBC68:("sABDiff","Vec3f","",0xc),
0x801FBC78:("sACDiff","Vec3f","",0xc),
0x801FBC88:("sCylf","Cylinderf","",0x18),
0x801FBCA0:("sSphf","Spheref","",0x10),
0x801FBCB0:("sCaf","Cylinderf","",0x18),
0x801FBCC8:("sCbf","Cylinderf","",0x18),
0x801FBCE0:("sTriVtx0","Vec3f","",0xC),
0x801FBCF0:("sTriVtx1","Vec3f","",0xC),
0x801FBD00:("sTriVtx2","Vec3f","",0xC),
0x801FBD10:("sIntersectPoint","Vec3f","",0xC),
0x801FBD20:("sMinF","Vec3f","",0xC),
0x801FBD30:("sMaxF","Vec3f","",0xC),
0x801FBD40:("sAF","Vec3f","",0xC),
0x801FBD50:("sBF","Vec3f","",0xC),
0x801FBD60:("sNormal","Vec3f","",0xC),
0x801FBD70:("sPlanePos","Vec3f","",0xC),
0x801FBD80:("sPlaneIntersectLine","InfiniteLine","",0x18),
0x801FBD98:("sPlaneIntersectSeg","Linef","",0x18),
0x801FBDB0:("sPlanePos","Vec3f","",0xC),
0x801FBDC0:("sPlaneIntersect","InfiniteLine","",0x18),
0x801FBDD8:("sSphLinePerpendicularPoint","Vec3f","",0xC),
0x801FBDE8:("sV0V1Center","Vec3f","",0xC),
0x801FBE00:("sMatrixStack","MtxF*","",0x4),
0x801FBE04:("sCurrentMatrix","MtxF*","",0x4),
0x801FBE10:("sFlashromMesgQueue","UNK_TYPE1","",0x1),

View File

@ -575,6 +575,8 @@ wordReplace = {
"func_800CA1E8": "WaterBox_GetSurface1_2",
"func_800CA22C": "WaterBox_GetSurface2",
"func_800CA6D8": "WaterBox_GetLightSettingIndex",
"func_8017D668": "Math3D_PointDistSqToLine2DImpl",
"func_80179678": "Math3D_PlaneVsLineSegClosestPoint",
"Math3D_DistanceSquared": "Math3D_Vec3fDistSq",
"Math3D_NormalVector": "Math3D_SurfaceNorm",
@ -584,22 +586,80 @@ wordReplace = {
"func_8017AD38": "Math3D_LineVsCube",
"Math3D_NormalizedDistanceFromPlane": "Math3D_UDistPlaneToPos",
"Math3D_NormalizedSignedDistanceFromPlane": "Math3D_DistPlaneToPos",
"func_8017BAD0": "Math3D_TriChkPointParaYDist",
"func_8017BAD0": "Math3D_TriChkPointParaYImpl",
# "Math3D_TriChkPointParaYDist": "Math3D_TriChkPointParaYImpl",
"func_8017BE30": "Math3D_TriChkPointParaYIntersectDist",
"func_8017BEE0": "Math3D_TriChkPointParaYIntersectInsideTri",
"func_8017C008": "Math3D_TriChkLineSegParaYIntersect",
"func_8017C494": "Math3D_TriChkPointParaYIntersectInsideTri2",
"func_8017C540": "Math3D_TriChkPointParaXDist",
"func_8017C494": "Math3D_TriChkPointParaYNoRangeCheckIntersectInsideTri",
"func_8017C540": "Math3D_TriChkPointParaXImpl",
"func_8017C850": "Math3D_TriChkPointParaXIntersect",
"func_8017C980": "Math3D_TriChkLineSegParaXIntersect",
"func_8017CB7C": "Math3D_TriChkLineSegParaZDist",
"func_8017CB7C": "Math3D_TriChkPointParaZImpl",
"func_8017CEF0": "Math3D_TriChkPointParaZIntersect",
"func_8017D020": "Math3D_TriChkLineSegParaZIntersect",
"Math3D_ColSphereLineSeg": "Math3D_LineVsSph",
"Math3D_ColSphereSphere": "Math3D_SphVsSph",
"Math3D_CrossProduct": "Math3D_Vec3f_Cross",
"Math3D_Parallel": "Math3D_Cos",
"Math3D_AngleBetweenVectors": "Math3D_CosOut",
"func_80179A44": "Math3D_LineClosestToPoint",
"func_8017A438": "Math3D_SphCubeVsTriCube",
"Math3D_XZLengthSquared": "Math3D_Dist1DSq",
"Math3D_XZLength": "Math3D_Dist1D",
"Math3D_XZDistanceSquared": "Math3D_Dist2DSq",
"Math3D_XZDistance": "Math3D_Dist2D",
"Math3D_LengthSquared": "Math3D_Vec3fMagnitudeSq",
"Math3D_Distance": "Math3D_Vec3f_DistXYZ",
"Math3D_DistanceS": "Math3D_DistXYZ16toF",
"func_80179798": "Math3D_LineSegMakePerpLineSeg",
"Math3D_LineVsLineClosestTwoPoints": "Math3D_LineSegMakePerpLineSeg",
"func_80179B34": "Math3D_FindPointOnPlaneIntersect",
"func_80179B94": "Math3D_PlaneVsPlaneNewLine",
"func_8017B9D8": "Math3D_Plane",
"func_8017D404": "Math3D_TriLineIntersect",
"Math3D_ColCylinderCylinderAmountAndDistance": "Math3D_CylVsCylOverlapCenterDist",
"Math3D_ColCylinderCylinderAmount": "Math3D_CylVsCylOverlap",
"Math3D_ColSphereCylinderDistanceAndAmount": "Math3D_SphVsCylOverlapCenterDist",
"Math3D_ColCylinderTri": "Math3D_CylTriVsIntersect",
"func_8017F1A0": "Math3D_CylVsTri",
"Math3D_ColSphereSphereIntersect": "Math3D_SphVsSphOverlap",
"Math3D_ColSphereSphereIntersectAndDistance": "Math3D_SphVsSphOverlapCenterDist",
"Math3D_ColSphereCylinderDistance": "Math3D_SphVsCylOverlap",
"func_8017E350": "Math3D_CylVsLineSeg",
"Math3D_ColSphereTri": "Math3D_TriVsSphIntersect",
"Math3D_ScaleAndAdd": "Math3D_PointOnDirectedLine",
"Math3D_Lerp": "Math3D_LineSplitRatio",
"func_80179D74": "Math3D_PlaneVsPlaneVsLineClosestPoint",
"func_8017E294": "Math3D_PointInCyl",
"func_80179F64": "Math3D_Vec3fReflect",
"Math3D_XZBoundCheck": "Math3D_PointInSquare2D",
"func_8017B7F8": "Math3D_RotateXZPlane",
"Math3D_UnitNormalVector": "Math3D_DefPlane",
"Math3D_SignedDistanceFromPlane": "Math3D_PlaneF",
"func_8017BD98": "Math3D_TriChkPointParaYDeterminate",
"func_8017BDE0": "Math3D_TriChkPointParaYSlopedY",
"func_8017BF8C": "Math3D_TriChkPointParaY",
# "func_8017C17C": "Math3D_TriChkPointParaYDist",
"func_8017C1F0": "Math3D_TriChkPointParaYImplNoCheckRange",
"Math3D_TriChkPointParaYIntersectInsideTri2": "Math3D_TriChkPointParaYNoRangeCheckIntersectInsideTri",
"Math3D_TriChkPointParaXDist": "Math3D_TriChkPointParaXImpl",
"func_8017C808": "Math3D_TriChkPointParaXDeterminate",
"func_8017C904": "Math3D_TriChkPointParaX",
"func_8017CB08": "Math3D_TriChkLineSegParaXDist",
# "Math3D_TriChkLineSegParaZDist": "Math3D_TriChkPointParaZImpl",
"func_8017CEA8": "Math3D_TriChkPointParaZDeterminate",
"func_8017CFA4": "Math3D_TriChkPointParaZ",
# "func_8017D1AC": "Math3D_TriChkLineSegParaZDist",
"func_8017D220": "Math3D_LineSegFindPlaneIntersect",
"Math3D_TriSetCoords": "Math3D_TriNorm",
"Math3D_IsPointInSphere": "Math3D_PointInSph",
"Math3d_ColTriTri": "Math3D_TriVsTriIntersect",
"func_8017DD34": "Math3D_GetSphVsTriIntersectPoint",
"func_8017F9C0": "Math3D_XZInSphere",
"func_8017FA34": "Math3D_XYInSphere",
"func_8017FAA8": "Math3D_YZInSphere",
"func_800DFB14": "Camera_ChangeActorCsCamIndex",
"func_800DFC68": "Camera_GetInputDirYaw",
"func_800DFCB4": "Camera_GetCamDirPitch",

View File

@ -2771,97 +2771,97 @@ asm/non_matchings/code/sys_math/Rand_ZeroFloat.s,Rand_ZeroFloat,0x80179594,0xB
asm/non_matchings/code/sys_math/Rand_CenteredFloat.s,Rand_CenteredFloat,0x801795C0,0xC
asm/non_matchings/code/sys_math3d/Math3D_Normalize.s,Math3D_Normalize,0x801795F0,0x22
asm/non_matchings/code/sys_math3d/Math3D_PlaneVsLineSegClosestPoint.s,Math3D_PlaneVsLineSegClosestPoint,0x80179678,0x48
asm/non_matchings/code/sys_math3d/func_80179798.s,func_80179798,0x80179798,0xAB
asm/non_matchings/code/sys_math3d/func_80179A44.s,func_80179A44,0x80179A44,0x3C
asm/non_matchings/code/sys_math3d/func_80179B34.s,func_80179B34,0x80179B34,0x18
asm/non_matchings/code/sys_math3d/func_80179B94.s,func_80179B94,0x80179B94,0x78
asm/non_matchings/code/sys_math3d/func_80179D74.s,func_80179D74,0x80179D74,0x1F
asm/non_matchings/code/sys_math3d/Math3D_ScaleAndAdd.s,Math3D_ScaleAndAdd,0x80179DF0,0x13
asm/non_matchings/code/sys_math3d/Math3D_Lerp.s,Math3D_Lerp,0x80179E3C,0x13
asm/non_matchings/code/sys_math3d/Math3D_Parallel.s,Math3D_Parallel,0x80179E88,0x9
asm/non_matchings/code/sys_math3d/Math3D_AngleBetweenVectors.s,Math3D_AngleBetweenVectors,0x80179EAC,0x2E
asm/non_matchings/code/sys_math3d/func_80179F64.s,func_80179F64,0x80179F64,0x35
asm/non_matchings/code/sys_math3d/Math3D_XZBoundCheck.s,Math3D_XZBoundCheck,0x8017A038,0x19
asm/non_matchings/code/sys_math3d/func_8017A09C.s,func_8017A09C,0x8017A09C,0x4D
asm/non_matchings/code/sys_math3d/func_8017A1D0.s,func_8017A1D0,0x8017A1D0,0x4D
asm/non_matchings/code/sys_math3d/func_8017A304.s,func_8017A304,0x8017A304,0x4D
asm/non_matchings/code/sys_math3d/func_8017A438.s,func_8017A438,0x8017A438,0x70
asm/non_matchings/code/sys_math3d/Math3D_XZLengthSquared.s,Math3D_XZLengthSquared,0x8017A5F8,0x6
asm/non_matchings/code/sys_math3d/Math3D_XZLength.s,Math3D_XZLength,0x8017A610,0x9
asm/non_matchings/code/sys_math3d/Math3D_XZDistanceSquared.s,Math3D_XZDistanceSquared,0x8017A634,0x11
asm/non_matchings/code/sys_math3d/Math3D_XZDistance.s,Math3D_XZDistance,0x8017A678,0xC
asm/non_matchings/code/sys_math3d/Math3D_LengthSquared.s,Math3D_LengthSquared,0x8017A6A8,0xB
asm/non_matchings/code/sys_math3d/Math3D_LineSegMakePerpLineSeg.s,Math3D_LineSegMakePerpLineSeg,0x80179798,0xAB
asm/non_matchings/code/sys_math3d/Math3D_LineClosestToPoint.s,Math3D_LineClosestToPoint,0x80179A44,0x3C
asm/non_matchings/code/sys_math3d/Math3D_FindPointOnPlaneIntersect.s,Math3D_FindPointOnPlaneIntersect,0x80179B34,0x18
asm/non_matchings/code/sys_math3d/Math3D_PlaneVsPlaneNewLine.s,Math3D_PlaneVsPlaneNewLine,0x80179B94,0x78
asm/non_matchings/code/sys_math3d/Math3D_PlaneVsPlaneVsLineClosestPoint.s,Math3D_PlaneVsPlaneVsLineClosestPoint,0x80179D74,0x1F
asm/non_matchings/code/sys_math3d/Math3D_PointOnDirectedLine.s,Math3D_PointOnDirectedLine,0x80179DF0,0x13
asm/non_matchings/code/sys_math3d/Math3D_LineSplitRatio.s,Math3D_LineSplitRatio,0x80179E3C,0x13
asm/non_matchings/code/sys_math3d/Math3D_Cos.s,Math3D_Cos,0x80179E88,0x9
asm/non_matchings/code/sys_math3d/Math3D_CosOut.s,Math3D_CosOut,0x80179EAC,0x2E
asm/non_matchings/code/sys_math3d/Math3D_Vec3fReflect.s,Math3D_Vec3fReflect,0x80179F64,0x35
asm/non_matchings/code/sys_math3d/Math3D_PointInSquare2D.s,Math3D_PointInSquare2D,0x8017A038,0x19
asm/non_matchings/code/sys_math3d/Math3D_CirSquareVsTriSquareXY.s,Math3D_CirSquareVsTriSquareXY,0x8017A09C,0x4D
asm/non_matchings/code/sys_math3d/Math3D_CirSquareVsTriSquareYZ.s,Math3D_CirSquareVsTriSquareYZ,0x8017A1D0,0x4D
asm/non_matchings/code/sys_math3d/Math3D_CirSquareVsTriSquareZX.s,Math3D_CirSquareVsTriSquareZX,0x8017A304,0x4D
asm/non_matchings/code/sys_math3d/Math3D_SphCubeVsTriCube.s,Math3D_SphCubeVsTriCube,0x8017A438,0x70
asm/non_matchings/code/sys_math3d/Math3D_Dist1DSq.s,Math3D_Dist1DSq,0x8017A5F8,0x6
asm/non_matchings/code/sys_math3d/Math3D_Dist1D.s,Math3D_Dist1D,0x8017A610,0x9
asm/non_matchings/code/sys_math3d/Math3D_Dist2DSq.s,Math3D_Dist2DSq,0x8017A634,0x11
asm/non_matchings/code/sys_math3d/Math3D_Dist2D.s,Math3D_Dist2D,0x8017A678,0xC
asm/non_matchings/code/sys_math3d/Math3D_Vec3fMagnitudeSq.s,Math3D_Vec3fMagnitudeSq,0x8017A6A8,0xB
asm/non_matchings/code/sys_math3d/Math3D_Vec3fMagnitude.s,Math3D_Vec3fMagnitude,0x8017A6D4,0x9
asm/non_matchings/code/sys_math3d/Math3D_Vec3fDistSq.s,Math3D_Vec3fDistSq,0x8017A6F8,0xA
asm/non_matchings/code/sys_math3d/Math3D_Distance.s,Math3D_Distance,0x8017A720,0x8
asm/non_matchings/code/sys_math3d/Math3D_DistanceS.s,Math3D_DistanceS,0x8017A740,0x1E
asm/non_matchings/code/sys_math3d/func_8017A7B8.s,func_8017A7B8,0x8017A7B8,0x10
asm/non_matchings/code/sys_math3d/func_8017A7F8.s,func_8017A7F8,0x8017A7F8,0x10
asm/non_matchings/code/sys_math3d/func_8017A838.s,func_8017A838,0x8017A838,0x10
asm/non_matchings/code/sys_math3d/Math3D_CrossProduct.s,Math3D_CrossProduct,0x8017A878,0x1D
asm/non_matchings/code/sys_math3d/Math3D_Vec3f_DistXYZ.s,Math3D_Vec3f_DistXYZ,0x8017A720,0x8
asm/non_matchings/code/sys_math3d/Math3D_DistXYZ16toF.s,Math3D_DistXYZ16toF,0x8017A740,0x1E
asm/non_matchings/code/sys_math3d/Math3D_Vec3fDiff_CrossZ.s,Math3D_Vec3fDiff_CrossZ,0x8017A7B8,0x10
asm/non_matchings/code/sys_math3d/Math3D_Vec3fDiff_CrossX.s,Math3D_Vec3fDiff_CrossX,0x8017A7F8,0x10
asm/non_matchings/code/sys_math3d/Math3D_Vec3fDiff_CrossY.s,Math3D_Vec3fDiff_CrossY,0x8017A838,0x10
asm/non_matchings/code/sys_math3d/Math3D_Vec3f_Cross.s,Math3D_Vec3f_Cross,0x8017A878,0x1D
asm/non_matchings/code/sys_math3d/Math3D_SurfaceNorm.s,Math3D_SurfaceNorm,0x8017A8EC,0x1A
asm/non_matchings/code/sys_math3d/Math3D_PointRelativeToCubeFaces.s,Math3D_PointRelativeToCubeFaces,0x8017A954,0x2E
asm/non_matchings/code/sys_math3d/Math3D_PointRelativeToCubeEdges.s,Math3D_PointRelativeToCubeEdges,0x8017AA0C,0x6C
asm/non_matchings/code/sys_math3d/Math3D_PointRelativeToCubeVertices.s,Math3D_PointRelativeToCubeVertices,0x8017ABBC,0x5F
asm/non_matchings/code/sys_math3d/Math3D_LineVsCube.s,Math3D_LineVsCube,0x8017AD38,0x255
asm/non_matchings/code/sys_math3d/func_8017B68C.s,func_8017B68C,0x8017B68C,0x5B
asm/non_matchings/code/sys_math3d/func_8017B7F8.s,func_8017B7F8,0x8017B7F8,0x23
asm/non_matchings/code/sys_math3d/Math3D_UnitNormalVector.s,Math3D_UnitNormalVector,0x8017B884,0x45
asm/non_matchings/code/sys_math3d/Math3D_SignedDistanceFromPlane.s,Math3D_SignedDistanceFromPlane,0x8017B998,0x10
asm/non_matchings/code/sys_math3d/func_8017B9D8.s,func_8017B9D8,0x8017B9D8,0xF
asm/non_matchings/code/sys_math3d/Math3D_LineVsCubeShort.s,Math3D_LineVsCubeShort,0x8017B68C,0x5B
asm/non_matchings/code/sys_math3d/Math3D_RotateXZPlane.s,Math3D_RotateXZPlane,0x8017B7F8,0x23
asm/non_matchings/code/sys_math3d/Math3D_DefPlane.s,Math3D_DefPlane,0x8017B884,0x45
asm/non_matchings/code/sys_math3d/Math3D_PlaneF.s,Math3D_PlaneF,0x8017B998,0x10
asm/non_matchings/code/sys_math3d/Math3D_Plane.s,Math3D_Plane,0x8017B9D8,0xF
asm/non_matchings/code/sys_math3d/Math3D_UDistPlaneToPos.s,Math3D_UDistPlaneToPos,0x8017BA14,0xE
asm/non_matchings/code/sys_math3d/Math3D_DistPlaneToPos.s,Math3D_DistPlaneToPos,0x8017BA4C,0x21
asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaYDist.s,Math3D_TriChkPointParaYDist,0x8017BAD0,0xB2
asm/non_matchings/code/sys_math3d/func_8017BD98.s,func_8017BD98,0x8017BD98,0x12
asm/non_matchings/code/sys_math3d/func_8017BDE0.s,func_8017BDE0,0x8017BDE0,0x14
asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaYImpl.s,Math3D_TriChkPointParaYImpl,0x8017BAD0,0xB2
asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaYDeterminate.s,Math3D_TriChkPointParaYDeterminate,0x8017BD98,0x12
asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaYSlopedY.s,Math3D_TriChkPointParaYSlopedY,0x8017BDE0,0x14
asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaYIntersectDist.s,Math3D_TriChkPointParaYIntersectDist,0x8017BE30,0x2C
asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaYIntersectInsideTri.s,Math3D_TriChkPointParaYIntersectInsideTri,0x8017BEE0,0x2B
asm/non_matchings/code/sys_math3d/func_8017BF8C.s,func_8017BF8C,0x8017BF8C,0x1F
asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaY.s,Math3D_TriChkPointParaY,0x8017BF8C,0x1F
asm/non_matchings/code/sys_math3d/Math3D_TriChkLineSegParaYIntersect.s,Math3D_TriChkLineSegParaYIntersect,0x8017C008,0x5D
asm/non_matchings/code/sys_math3d/func_8017C17C.s,func_8017C17C,0x8017C17C,0x1D
asm/non_matchings/code/sys_math3d/func_8017C1F0.s,func_8017C1F0,0x8017C1F0,0xA9
asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaYIntersectInsideTri2.s,Math3D_TriChkPointParaYIntersectInsideTri2,0x8017C494,0x2B
asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaXDist.s,Math3D_TriChkPointParaXDist,0x8017C540,0xB2
asm/non_matchings/code/sys_math3d/func_8017C808.s,func_8017C808,0x8017C808,0x12
asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaYDist.s,Math3D_TriChkPointParaYDist,0x8017C17C,0x1D
asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaYImplNoCheckRange.s,Math3D_TriChkPointParaYImplNoCheckRange,0x8017C1F0,0xA9
asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaYNoRangeCheckIntersectInsideTri.s,Math3D_TriChkPointParaYNoRangeCheckIntersectInsideTri,0x8017C494,0x2B
asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaXImpl.s,Math3D_TriChkPointParaXImpl,0x8017C540,0xB2
asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaXDeterminate.s,Math3D_TriChkPointParaXDeterminate,0x8017C808,0x12
asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaXIntersect.s,Math3D_TriChkPointParaXIntersect,0x8017C850,0x2D
asm/non_matchings/code/sys_math3d/func_8017C904.s,func_8017C904,0x8017C904,0x1F
asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaX.s,Math3D_TriChkPointParaX,0x8017C904,0x1F
asm/non_matchings/code/sys_math3d/Math3D_TriChkLineSegParaXIntersect.s,Math3D_TriChkLineSegParaXIntersect,0x8017C980,0x62
asm/non_matchings/code/sys_math3d/func_8017CB08.s,func_8017CB08,0x8017CB08,0x1D
asm/non_matchings/code/sys_math3d/Math3D_TriChkLineSegParaZDist.s,Math3D_TriChkLineSegParaZDist,0x8017CB7C,0xCB
asm/non_matchings/code/sys_math3d/func_8017CEA8.s,func_8017CEA8,0x8017CEA8,0x12
asm/non_matchings/code/sys_math3d/Math3D_TriChkLineSegParaXDist.s,Math3D_TriChkLineSegParaXDist,0x8017CB08,0x1D
asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaZImpl.s,Math3D_TriChkPointParaZImpl,0x8017CB7C,0xCB
asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaZDeterminate.s,Math3D_TriChkPointParaZDeterminate,0x8017CEA8,0x12
asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaZIntersect.s,Math3D_TriChkPointParaZIntersect,0x8017CEF0,0x2D
asm/non_matchings/code/sys_math3d/func_8017CFA4.s,func_8017CFA4,0x8017CFA4,0x1F
asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaZ.s,Math3D_TriChkPointParaZ,0x8017CFA4,0x1F
asm/non_matchings/code/sys_math3d/Math3D_TriChkLineSegParaZIntersect.s,Math3D_TriChkLineSegParaZIntersect,0x8017D020,0x63
asm/non_matchings/code/sys_math3d/func_8017D1AC.s,func_8017D1AC,0x8017D1AC,0x1D
asm/non_matchings/code/sys_math3d/func_8017D220.s,func_8017D220,0x8017D220,0x37
asm/non_matchings/code/sys_math3d/Math3D_TriChkLineSegParaZDist.s,Math3D_TriChkLineSegParaZDist,0x8017D1AC,0x1D
asm/non_matchings/code/sys_math3d/Math3D_LineSegFindPlaneIntersect.s,Math3D_LineSegFindPlaneIntersect,0x8017D220,0x37
asm/non_matchings/code/sys_math3d/Math3D_LineSegVsPlane.s,Math3D_LineSegVsPlane,0x8017D2FC,0x42
asm/non_matchings/code/sys_math3d/func_8017D404.s,func_8017D404,0x8017D404,0x59
asm/non_matchings/code/sys_math3d/Math3D_TriSetCoords.s,Math3D_TriSetCoords,0x8017D568,0x2C
asm/non_matchings/code/sys_math3d/Math3D_IsPointInSphere.s,Math3D_IsPointInSphere,0x8017D618,0x14
asm/non_matchings/code/sys_math3d/Math3D_PointDistToLine2D.s,Math3D_PointDistToLine2D,0x8017D668,0x56
asm/non_matchings/code/sys_math3d/func_8017D7C0.s,func_8017D7C0,0x8017D7C0,0x15
asm/non_matchings/code/sys_math3d/func_8017D814.s,func_8017D814,0x8017D814,0x42
asm/non_matchings/code/sys_math3d/func_8017D91C.s,func_8017D91C,0x8017D91C,0x42
asm/non_matchings/code/sys_math3d/func_8017DA24.s,func_8017DA24,0x8017DA24,0x42
asm/non_matchings/code/sys_math3d/Math3D_TriLineIntersect.s,Math3D_TriLineIntersect,0x8017D404,0x59
asm/non_matchings/code/sys_math3d/Math3D_TriNorm.s,Math3D_TriNorm,0x8017D568,0x2C
asm/non_matchings/code/sys_math3d/Math3D_PointInSph.s,Math3D_PointInSph,0x8017D618,0x14
asm/non_matchings/code/sys_math3d/Math3D_PointDistSqToLine2DImpl.s,Math3D_PointDistSqToLine2DImpl,0x8017D668,0x56
asm/non_matchings/code/sys_math3d/Math3D_PointDistSqToLine2D.s,Math3D_PointDistSqToLine2D,0x8017D7C0,0x15
asm/non_matchings/code/sys_math3d/Math3D_PointDistSqToLineXY.s,Math3D_PointDistSqToLineXY,0x8017D814,0x42
asm/non_matchings/code/sys_math3d/Math3D_PointDistSqToLineYZ.s,Math3D_PointDistSqToLineYZ,0x8017D91C,0x42
asm/non_matchings/code/sys_math3d/Math3D_PointDistSqToLineZX.s,Math3D_PointDistSqToLineZX,0x8017DA24,0x42
asm/non_matchings/code/sys_math3d/Math3D_LineVsSph.s,Math3D_LineVsSph,0x8017DB2C,0x82
asm/non_matchings/code/sys_math3d/func_8017DD34.s,func_8017DD34,0x8017DD34,0x50
asm/non_matchings/code/sys_math3d/Math3D_ColSphereTri.s,Math3D_ColSphereTri,0x8017DE74,0x108
asm/non_matchings/code/sys_math3d/func_8017E294.s,func_8017E294,0x8017E294,0x2F
asm/non_matchings/code/sys_math3d/func_8017E350.s,func_8017E350,0x8017E350,0x274
asm/non_matchings/code/sys_math3d/Math3D_ColCylinderTri.s,Math3D_ColCylinderTri,0x8017ED20,0x120
asm/non_matchings/code/sys_math3d/func_8017F1A0.s,func_8017F1A0,0x8017F1A0,0x8
asm/non_matchings/code/sys_math3d/Math3D_GetSphVsTriIntersectPoint.s,Math3D_GetSphVsTriIntersectPoint,0x8017DD34,0x50
asm/non_matchings/code/sys_math3d/Math3D_TriVsSphIntersect.s,Math3D_TriVsSphIntersect,0x8017DE74,0x108
asm/non_matchings/code/sys_math3d/Math3D_PointInCyl.s,Math3D_PointInCyl,0x8017E294,0x2F
asm/non_matchings/code/sys_math3d/Math3D_CylVsLineSeg.s,Math3D_CylVsLineSeg,0x8017E350,0x274
asm/non_matchings/code/sys_math3d/Math3D_CylTriVsIntersect.s,Math3D_CylTriVsIntersect,0x8017ED20,0x120
asm/non_matchings/code/sys_math3d/Math3D_CylVsTri.s,Math3D_CylVsTri,0x8017F1A0,0x8
asm/non_matchings/code/sys_math3d/Math3D_ColSphereSphere.s,Math3D_ColSphereSphere,0x8017F1C0,0x8
asm/non_matchings/code/sys_math3d/Math3D_ColSphereSphereIntersect.s,Math3D_ColSphereSphereIntersect,0x8017F1E0,0x8
asm/non_matchings/code/sys_math3d/Math3D_ColSphereSphereIntersectAndDistance.s,Math3D_ColSphereSphereIntersectAndDistance,0x8017F200,0x33
asm/non_matchings/code/sys_math3d/Math3D_ColSphereCylinderDistance.s,Math3D_ColSphereCylinderDistance,0x8017F2CC,0x8
asm/non_matchings/code/sys_math3d/Math3D_ColSphereCylinderDistanceAndAmount.s,Math3D_ColSphereCylinderDistanceAndAmount,0x8017F2EC,0x5C
asm/non_matchings/code/sys_math3d/Math3D_ColCylinderCylinderAmount.s,Math3D_ColCylinderCylinderAmount,0x8017F45C,0x8
asm/non_matchings/code/sys_math3d/Math3D_ColCylinderCylinderAmountAndDistance.s,Math3D_ColCylinderCylinderAmountAndDistance,0x8017F47C,0x74
asm/non_matchings/code/sys_math3d/Math3d_ColTriTri.s,Math3d_ColTriTri,0x8017F64C,0xDD
asm/non_matchings/code/sys_math3d/Math3D_SphVsSphOverlap.s,Math3D_SphVsSphOverlap,0x8017F1E0,0x8
asm/non_matchings/code/sys_math3d/Math3D_SphVsSphOverlapCenterDist.s,Math3D_SphVsSphOverlapCenterDist,0x8017F200,0x33
asm/non_matchings/code/sys_math3d/Math3D_SphVsCylOverlap.s,Math3D_SphVsCylOverlap,0x8017F2CC,0x8
asm/non_matchings/code/sys_math3d/Math3D_SphVsCylOverlapCenterDist.s,Math3D_SphVsCylOverlapCenterDist,0x8017F2EC,0x5C
asm/non_matchings/code/sys_math3d/Math3D_CylVsCylOverlap.s,Math3D_CylVsCylOverlap,0x8017F45C,0x8
asm/non_matchings/code/sys_math3d/Math3D_CylVsCylOverlapCenterDist.s,Math3D_CylVsCylOverlapCenterDist,0x8017F47C,0x74
asm/non_matchings/code/sys_math3d/Math3D_TriVsTriIntersect.s,Math3D_TriVsTriIntersect,0x8017F64C,0xDD
asm/non_matchings/code/sys_math3d/Math3D_XZInSphere.s,Math3D_XZInSphere,0x8017F9C0,0x1D
asm/non_matchings/code/sys_math3d/Math3D_XYInSphere.s,Math3D_XYInSphere,0x8017FA34,0x1D
asm/non_matchings/code/sys_math3d/Math3D_YZInSphere.s,Math3D_YZInSphere,0x8017FAA8,0x1D
asm/non_matchings/code/sys_math3d/func_8017FB1C.s,func_8017FB1C,0x8017FB1C,0x8A
asm/non_matchings/code/sys_math3d/Math3D_CircleLineIntersections.s,Math3D_CircleLineIntersections,0x8017FB1C,0x8A
asm/non_matchings/code/sys_math3d/func_8017FD44.s,func_8017FD44,0x8017FD44,0x5B
asm/non_matchings/code/sys_math_atan/Math_GetAtan2Tbl.s,Math_GetAtan2Tbl,0x8017FEB0,0xD
asm/non_matchings/code/sys_math_atan/Math_Atan2S.s,Math_Atan2S,0x8017FEE4,0x7A

1 asm/non_matchings/code/z_en_a_keep/EnAObj_Init.s EnAObj_Init 0x800A5AC0 0x2B
2771 asm/non_matchings/code/sys_math/Rand_CenteredFloat.s Rand_CenteredFloat 0x801795C0 0xC
2772 asm/non_matchings/code/sys_math3d/Math3D_Normalize.s Math3D_Normalize 0x801795F0 0x22
2773 asm/non_matchings/code/sys_math3d/Math3D_PlaneVsLineSegClosestPoint.s Math3D_PlaneVsLineSegClosestPoint 0x80179678 0x48
2774 asm/non_matchings/code/sys_math3d/func_80179798.s asm/non_matchings/code/sys_math3d/Math3D_LineSegMakePerpLineSeg.s func_80179798 Math3D_LineSegMakePerpLineSeg 0x80179798 0xAB
2775 asm/non_matchings/code/sys_math3d/func_80179A44.s asm/non_matchings/code/sys_math3d/Math3D_LineClosestToPoint.s func_80179A44 Math3D_LineClosestToPoint 0x80179A44 0x3C
2776 asm/non_matchings/code/sys_math3d/func_80179B34.s asm/non_matchings/code/sys_math3d/Math3D_FindPointOnPlaneIntersect.s func_80179B34 Math3D_FindPointOnPlaneIntersect 0x80179B34 0x18
2777 asm/non_matchings/code/sys_math3d/func_80179B94.s asm/non_matchings/code/sys_math3d/Math3D_PlaneVsPlaneNewLine.s func_80179B94 Math3D_PlaneVsPlaneNewLine 0x80179B94 0x78
2778 asm/non_matchings/code/sys_math3d/func_80179D74.s asm/non_matchings/code/sys_math3d/Math3D_PlaneVsPlaneVsLineClosestPoint.s func_80179D74 Math3D_PlaneVsPlaneVsLineClosestPoint 0x80179D74 0x1F
2779 asm/non_matchings/code/sys_math3d/Math3D_ScaleAndAdd.s asm/non_matchings/code/sys_math3d/Math3D_PointOnDirectedLine.s Math3D_ScaleAndAdd Math3D_PointOnDirectedLine 0x80179DF0 0x13
2780 asm/non_matchings/code/sys_math3d/Math3D_Lerp.s asm/non_matchings/code/sys_math3d/Math3D_LineSplitRatio.s Math3D_Lerp Math3D_LineSplitRatio 0x80179E3C 0x13
2781 asm/non_matchings/code/sys_math3d/Math3D_Parallel.s asm/non_matchings/code/sys_math3d/Math3D_Cos.s Math3D_Parallel Math3D_Cos 0x80179E88 0x9
2782 asm/non_matchings/code/sys_math3d/Math3D_AngleBetweenVectors.s asm/non_matchings/code/sys_math3d/Math3D_CosOut.s Math3D_AngleBetweenVectors Math3D_CosOut 0x80179EAC 0x2E
2783 asm/non_matchings/code/sys_math3d/func_80179F64.s asm/non_matchings/code/sys_math3d/Math3D_Vec3fReflect.s func_80179F64 Math3D_Vec3fReflect 0x80179F64 0x35
2784 asm/non_matchings/code/sys_math3d/Math3D_XZBoundCheck.s asm/non_matchings/code/sys_math3d/Math3D_PointInSquare2D.s Math3D_XZBoundCheck Math3D_PointInSquare2D 0x8017A038 0x19
2785 asm/non_matchings/code/sys_math3d/func_8017A09C.s asm/non_matchings/code/sys_math3d/Math3D_CirSquareVsTriSquareXY.s func_8017A09C Math3D_CirSquareVsTriSquareXY 0x8017A09C 0x4D
2786 asm/non_matchings/code/sys_math3d/func_8017A1D0.s asm/non_matchings/code/sys_math3d/Math3D_CirSquareVsTriSquareYZ.s func_8017A1D0 Math3D_CirSquareVsTriSquareYZ 0x8017A1D0 0x4D
2787 asm/non_matchings/code/sys_math3d/func_8017A304.s asm/non_matchings/code/sys_math3d/Math3D_CirSquareVsTriSquareZX.s func_8017A304 Math3D_CirSquareVsTriSquareZX 0x8017A304 0x4D
2788 asm/non_matchings/code/sys_math3d/func_8017A438.s asm/non_matchings/code/sys_math3d/Math3D_SphCubeVsTriCube.s func_8017A438 Math3D_SphCubeVsTriCube 0x8017A438 0x70
2789 asm/non_matchings/code/sys_math3d/Math3D_XZLengthSquared.s asm/non_matchings/code/sys_math3d/Math3D_Dist1DSq.s Math3D_XZLengthSquared Math3D_Dist1DSq 0x8017A5F8 0x6
2790 asm/non_matchings/code/sys_math3d/Math3D_XZLength.s asm/non_matchings/code/sys_math3d/Math3D_Dist1D.s Math3D_XZLength Math3D_Dist1D 0x8017A610 0x9
2791 asm/non_matchings/code/sys_math3d/Math3D_XZDistanceSquared.s asm/non_matchings/code/sys_math3d/Math3D_Dist2DSq.s Math3D_XZDistanceSquared Math3D_Dist2DSq 0x8017A634 0x11
2792 asm/non_matchings/code/sys_math3d/Math3D_XZDistance.s asm/non_matchings/code/sys_math3d/Math3D_Dist2D.s Math3D_XZDistance Math3D_Dist2D 0x8017A678 0xC
2793 asm/non_matchings/code/sys_math3d/Math3D_LengthSquared.s asm/non_matchings/code/sys_math3d/Math3D_Vec3fMagnitudeSq.s Math3D_LengthSquared Math3D_Vec3fMagnitudeSq 0x8017A6A8 0xB
2794 asm/non_matchings/code/sys_math3d/Math3D_Vec3fMagnitude.s Math3D_Vec3fMagnitude 0x8017A6D4 0x9
2795 asm/non_matchings/code/sys_math3d/Math3D_Vec3fDistSq.s Math3D_Vec3fDistSq 0x8017A6F8 0xA
2796 asm/non_matchings/code/sys_math3d/Math3D_Distance.s asm/non_matchings/code/sys_math3d/Math3D_Vec3f_DistXYZ.s Math3D_Distance Math3D_Vec3f_DistXYZ 0x8017A720 0x8
2797 asm/non_matchings/code/sys_math3d/Math3D_DistanceS.s asm/non_matchings/code/sys_math3d/Math3D_DistXYZ16toF.s Math3D_DistanceS Math3D_DistXYZ16toF 0x8017A740 0x1E
2798 asm/non_matchings/code/sys_math3d/func_8017A7B8.s asm/non_matchings/code/sys_math3d/Math3D_Vec3fDiff_CrossZ.s func_8017A7B8 Math3D_Vec3fDiff_CrossZ 0x8017A7B8 0x10
2799 asm/non_matchings/code/sys_math3d/func_8017A7F8.s asm/non_matchings/code/sys_math3d/Math3D_Vec3fDiff_CrossX.s func_8017A7F8 Math3D_Vec3fDiff_CrossX 0x8017A7F8 0x10
2800 asm/non_matchings/code/sys_math3d/func_8017A838.s asm/non_matchings/code/sys_math3d/Math3D_Vec3fDiff_CrossY.s func_8017A838 Math3D_Vec3fDiff_CrossY 0x8017A838 0x10
2801 asm/non_matchings/code/sys_math3d/Math3D_CrossProduct.s asm/non_matchings/code/sys_math3d/Math3D_Vec3f_Cross.s Math3D_CrossProduct Math3D_Vec3f_Cross 0x8017A878 0x1D
2802 asm/non_matchings/code/sys_math3d/Math3D_SurfaceNorm.s Math3D_SurfaceNorm 0x8017A8EC 0x1A
2803 asm/non_matchings/code/sys_math3d/Math3D_PointRelativeToCubeFaces.s Math3D_PointRelativeToCubeFaces 0x8017A954 0x2E
2804 asm/non_matchings/code/sys_math3d/Math3D_PointRelativeToCubeEdges.s Math3D_PointRelativeToCubeEdges 0x8017AA0C 0x6C
2805 asm/non_matchings/code/sys_math3d/Math3D_PointRelativeToCubeVertices.s Math3D_PointRelativeToCubeVertices 0x8017ABBC 0x5F
2806 asm/non_matchings/code/sys_math3d/Math3D_LineVsCube.s Math3D_LineVsCube 0x8017AD38 0x255
2807 asm/non_matchings/code/sys_math3d/func_8017B68C.s asm/non_matchings/code/sys_math3d/Math3D_LineVsCubeShort.s func_8017B68C Math3D_LineVsCubeShort 0x8017B68C 0x5B
2808 asm/non_matchings/code/sys_math3d/func_8017B7F8.s asm/non_matchings/code/sys_math3d/Math3D_RotateXZPlane.s func_8017B7F8 Math3D_RotateXZPlane 0x8017B7F8 0x23
2809 asm/non_matchings/code/sys_math3d/Math3D_UnitNormalVector.s asm/non_matchings/code/sys_math3d/Math3D_DefPlane.s Math3D_UnitNormalVector Math3D_DefPlane 0x8017B884 0x45
2810 asm/non_matchings/code/sys_math3d/Math3D_SignedDistanceFromPlane.s asm/non_matchings/code/sys_math3d/Math3D_PlaneF.s Math3D_SignedDistanceFromPlane Math3D_PlaneF 0x8017B998 0x10
2811 asm/non_matchings/code/sys_math3d/func_8017B9D8.s asm/non_matchings/code/sys_math3d/Math3D_Plane.s func_8017B9D8 Math3D_Plane 0x8017B9D8 0xF
2812 asm/non_matchings/code/sys_math3d/Math3D_UDistPlaneToPos.s Math3D_UDistPlaneToPos 0x8017BA14 0xE
2813 asm/non_matchings/code/sys_math3d/Math3D_DistPlaneToPos.s Math3D_DistPlaneToPos 0x8017BA4C 0x21
2814 asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaYDist.s asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaYImpl.s Math3D_TriChkPointParaYDist Math3D_TriChkPointParaYImpl 0x8017BAD0 0xB2
2815 asm/non_matchings/code/sys_math3d/func_8017BD98.s asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaYDeterminate.s func_8017BD98 Math3D_TriChkPointParaYDeterminate 0x8017BD98 0x12
2816 asm/non_matchings/code/sys_math3d/func_8017BDE0.s asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaYSlopedY.s func_8017BDE0 Math3D_TriChkPointParaYSlopedY 0x8017BDE0 0x14
2817 asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaYIntersectDist.s Math3D_TriChkPointParaYIntersectDist 0x8017BE30 0x2C
2818 asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaYIntersectInsideTri.s Math3D_TriChkPointParaYIntersectInsideTri 0x8017BEE0 0x2B
2819 asm/non_matchings/code/sys_math3d/func_8017BF8C.s asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaY.s func_8017BF8C Math3D_TriChkPointParaY 0x8017BF8C 0x1F
2820 asm/non_matchings/code/sys_math3d/Math3D_TriChkLineSegParaYIntersect.s Math3D_TriChkLineSegParaYIntersect 0x8017C008 0x5D
2821 asm/non_matchings/code/sys_math3d/func_8017C17C.s asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaYDist.s func_8017C17C Math3D_TriChkPointParaYDist 0x8017C17C 0x1D
2822 asm/non_matchings/code/sys_math3d/func_8017C1F0.s asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaYImplNoCheckRange.s func_8017C1F0 Math3D_TriChkPointParaYImplNoCheckRange 0x8017C1F0 0xA9
2823 asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaYIntersectInsideTri2.s asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaYNoRangeCheckIntersectInsideTri.s Math3D_TriChkPointParaYIntersectInsideTri2 Math3D_TriChkPointParaYNoRangeCheckIntersectInsideTri 0x8017C494 0x2B
2824 asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaXDist.s asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaXImpl.s Math3D_TriChkPointParaXDist Math3D_TriChkPointParaXImpl 0x8017C540 0xB2
2825 asm/non_matchings/code/sys_math3d/func_8017C808.s asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaXDeterminate.s func_8017C808 Math3D_TriChkPointParaXDeterminate 0x8017C808 0x12
2826 asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaXIntersect.s Math3D_TriChkPointParaXIntersect 0x8017C850 0x2D
2827 asm/non_matchings/code/sys_math3d/func_8017C904.s asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaX.s func_8017C904 Math3D_TriChkPointParaX 0x8017C904 0x1F
2828 asm/non_matchings/code/sys_math3d/Math3D_TriChkLineSegParaXIntersect.s Math3D_TriChkLineSegParaXIntersect 0x8017C980 0x62
2829 asm/non_matchings/code/sys_math3d/func_8017CB08.s asm/non_matchings/code/sys_math3d/Math3D_TriChkLineSegParaXDist.s func_8017CB08 Math3D_TriChkLineSegParaXDist 0x8017CB08 0x1D
2830 asm/non_matchings/code/sys_math3d/Math3D_TriChkLineSegParaZDist.s asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaZImpl.s Math3D_TriChkLineSegParaZDist Math3D_TriChkPointParaZImpl 0x8017CB7C 0xCB
2831 asm/non_matchings/code/sys_math3d/func_8017CEA8.s asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaZDeterminate.s func_8017CEA8 Math3D_TriChkPointParaZDeterminate 0x8017CEA8 0x12
2832 asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaZIntersect.s Math3D_TriChkPointParaZIntersect 0x8017CEF0 0x2D
2833 asm/non_matchings/code/sys_math3d/func_8017CFA4.s asm/non_matchings/code/sys_math3d/Math3D_TriChkPointParaZ.s func_8017CFA4 Math3D_TriChkPointParaZ 0x8017CFA4 0x1F
2834 asm/non_matchings/code/sys_math3d/Math3D_TriChkLineSegParaZIntersect.s Math3D_TriChkLineSegParaZIntersect 0x8017D020 0x63
2835 asm/non_matchings/code/sys_math3d/func_8017D1AC.s asm/non_matchings/code/sys_math3d/Math3D_TriChkLineSegParaZDist.s func_8017D1AC Math3D_TriChkLineSegParaZDist 0x8017D1AC 0x1D
2836 asm/non_matchings/code/sys_math3d/func_8017D220.s asm/non_matchings/code/sys_math3d/Math3D_LineSegFindPlaneIntersect.s func_8017D220 Math3D_LineSegFindPlaneIntersect 0x8017D220 0x37
2837 asm/non_matchings/code/sys_math3d/Math3D_LineSegVsPlane.s Math3D_LineSegVsPlane 0x8017D2FC 0x42
2838 asm/non_matchings/code/sys_math3d/func_8017D404.s asm/non_matchings/code/sys_math3d/Math3D_TriLineIntersect.s func_8017D404 Math3D_TriLineIntersect 0x8017D404 0x59
2839 asm/non_matchings/code/sys_math3d/Math3D_TriSetCoords.s asm/non_matchings/code/sys_math3d/Math3D_TriNorm.s Math3D_TriSetCoords Math3D_TriNorm 0x8017D568 0x2C
2840 asm/non_matchings/code/sys_math3d/Math3D_IsPointInSphere.s asm/non_matchings/code/sys_math3d/Math3D_PointInSph.s Math3D_IsPointInSphere Math3D_PointInSph 0x8017D618 0x14
2841 asm/non_matchings/code/sys_math3d/Math3D_PointDistToLine2D.s asm/non_matchings/code/sys_math3d/Math3D_PointDistSqToLine2DImpl.s Math3D_PointDistToLine2D Math3D_PointDistSqToLine2DImpl 0x8017D668 0x56
2842 asm/non_matchings/code/sys_math3d/func_8017D7C0.s asm/non_matchings/code/sys_math3d/Math3D_PointDistSqToLine2D.s func_8017D7C0 Math3D_PointDistSqToLine2D 0x8017D7C0 0x15
2843 asm/non_matchings/code/sys_math3d/func_8017D814.s asm/non_matchings/code/sys_math3d/Math3D_PointDistSqToLineXY.s func_8017D814 Math3D_PointDistSqToLineXY 0x8017D814 0x42
2844 asm/non_matchings/code/sys_math3d/func_8017D91C.s asm/non_matchings/code/sys_math3d/Math3D_PointDistSqToLineYZ.s func_8017D91C Math3D_PointDistSqToLineYZ 0x8017D91C 0x42
2845 asm/non_matchings/code/sys_math3d/func_8017DA24.s asm/non_matchings/code/sys_math3d/Math3D_PointDistSqToLineZX.s func_8017DA24 Math3D_PointDistSqToLineZX 0x8017DA24 0x42
2846 asm/non_matchings/code/sys_math3d/Math3D_LineVsSph.s Math3D_LineVsSph 0x8017DB2C 0x82
2847 asm/non_matchings/code/sys_math3d/func_8017DD34.s asm/non_matchings/code/sys_math3d/Math3D_GetSphVsTriIntersectPoint.s func_8017DD34 Math3D_GetSphVsTriIntersectPoint 0x8017DD34 0x50
2848 asm/non_matchings/code/sys_math3d/Math3D_ColSphereTri.s asm/non_matchings/code/sys_math3d/Math3D_TriVsSphIntersect.s Math3D_ColSphereTri Math3D_TriVsSphIntersect 0x8017DE74 0x108
2849 asm/non_matchings/code/sys_math3d/func_8017E294.s asm/non_matchings/code/sys_math3d/Math3D_PointInCyl.s func_8017E294 Math3D_PointInCyl 0x8017E294 0x2F
2850 asm/non_matchings/code/sys_math3d/func_8017E350.s asm/non_matchings/code/sys_math3d/Math3D_CylVsLineSeg.s func_8017E350 Math3D_CylVsLineSeg 0x8017E350 0x274
2851 asm/non_matchings/code/sys_math3d/Math3D_ColCylinderTri.s asm/non_matchings/code/sys_math3d/Math3D_CylTriVsIntersect.s Math3D_ColCylinderTri Math3D_CylTriVsIntersect 0x8017ED20 0x120
2852 asm/non_matchings/code/sys_math3d/func_8017F1A0.s asm/non_matchings/code/sys_math3d/Math3D_CylVsTri.s func_8017F1A0 Math3D_CylVsTri 0x8017F1A0 0x8
2853 asm/non_matchings/code/sys_math3d/Math3D_ColSphereSphere.s Math3D_ColSphereSphere 0x8017F1C0 0x8
2854 asm/non_matchings/code/sys_math3d/Math3D_ColSphereSphereIntersect.s asm/non_matchings/code/sys_math3d/Math3D_SphVsSphOverlap.s Math3D_ColSphereSphereIntersect Math3D_SphVsSphOverlap 0x8017F1E0 0x8
2855 asm/non_matchings/code/sys_math3d/Math3D_ColSphereSphereIntersectAndDistance.s asm/non_matchings/code/sys_math3d/Math3D_SphVsSphOverlapCenterDist.s Math3D_ColSphereSphereIntersectAndDistance Math3D_SphVsSphOverlapCenterDist 0x8017F200 0x33
2856 asm/non_matchings/code/sys_math3d/Math3D_ColSphereCylinderDistance.s asm/non_matchings/code/sys_math3d/Math3D_SphVsCylOverlap.s Math3D_ColSphereCylinderDistance Math3D_SphVsCylOverlap 0x8017F2CC 0x8
2857 asm/non_matchings/code/sys_math3d/Math3D_ColSphereCylinderDistanceAndAmount.s asm/non_matchings/code/sys_math3d/Math3D_SphVsCylOverlapCenterDist.s Math3D_ColSphereCylinderDistanceAndAmount Math3D_SphVsCylOverlapCenterDist 0x8017F2EC 0x5C
2858 asm/non_matchings/code/sys_math3d/Math3D_ColCylinderCylinderAmount.s asm/non_matchings/code/sys_math3d/Math3D_CylVsCylOverlap.s Math3D_ColCylinderCylinderAmount Math3D_CylVsCylOverlap 0x8017F45C 0x8
2859 asm/non_matchings/code/sys_math3d/Math3D_ColCylinderCylinderAmountAndDistance.s asm/non_matchings/code/sys_math3d/Math3D_CylVsCylOverlapCenterDist.s Math3D_ColCylinderCylinderAmountAndDistance Math3D_CylVsCylOverlapCenterDist 0x8017F47C 0x74
2860 asm/non_matchings/code/sys_math3d/Math3d_ColTriTri.s asm/non_matchings/code/sys_math3d/Math3D_TriVsTriIntersect.s Math3d_ColTriTri Math3D_TriVsTriIntersect 0x8017F64C 0xDD
2861 asm/non_matchings/code/sys_math3d/Math3D_XZInSphere.s Math3D_XZInSphere 0x8017F9C0 0x1D
2862 asm/non_matchings/code/sys_math3d/Math3D_XYInSphere.s Math3D_XYInSphere 0x8017FA34 0x1D
2863 asm/non_matchings/code/sys_math3d/Math3D_YZInSphere.s Math3D_YZInSphere 0x8017FAA8 0x1D
2864 asm/non_matchings/code/sys_math3d/func_8017FB1C.s asm/non_matchings/code/sys_math3d/Math3D_CircleLineIntersections.s func_8017FB1C Math3D_CircleLineIntersections 0x8017FB1C 0x8A
2865 asm/non_matchings/code/sys_math3d/func_8017FD44.s func_8017FD44 0x8017FD44 0x5B
2866 asm/non_matchings/code/sys_math_atan/Math_GetAtan2Tbl.s Math_GetAtan2Tbl 0x8017FEB0 0xD
2867 asm/non_matchings/code/sys_math_atan/Math_Atan2S.s Math_Atan2S 0x8017FEE4 0x7A