From 61f71acccd96f0f6dca1feadfdf89e4b076cedc2 Mon Sep 17 00:00:00 2001 From: angie Date: Wed, 24 May 2023 10:14:19 -0400 Subject: [PATCH] Apply renames --- include/z64math.h | 88 ++++++------- src/code/sys_math3d.c | 71 ++-------- src/code/z_bgcheck.c | 12 +- src/code/z_camera.c | 4 +- src/code/z_collision_check.c | 124 +++++++++--------- src/code/z_eff_tire_mark.c | 4 +- src/code/z_sub_s.c | 2 +- .../ovl_En_Akindonuts/z_en_akindonuts.c | 2 +- .../actors/ovl_En_Bubble/z_en_bubble.c | 2 +- src/overlays/actors/ovl_En_Dg/z_en_dg.c | 2 +- src/overlays/actors/ovl_En_Gg2/z_en_gg2.c | 2 +- src/overlays/actors/ovl_En_Gk/z_en_gk.c | 2 +- src/overlays/actors/ovl_En_Horse/z_en_horse.c | 4 +- .../z_en_horse_game_check.c | 18 +-- src/overlays/actors/ovl_En_Jg/z_en_jg.c | 2 +- .../actors/ovl_En_Mt_tag/z_en_mt_tag.c | 6 +- .../actors/ovl_En_Mushi2/z_en_mushi2.c | 8 +- src/overlays/actors/ovl_En_Rg/z_en_rg.c | 2 +- .../actors/ovl_En_Ruppecrow/z_en_ruppecrow.c | 4 +- .../actors/ovl_En_Scopecrow/z_en_scopecrow.c | 2 +- .../actors/ovl_En_Scopenuts/z_en_scopenuts.c | 2 +- .../actors/ovl_En_Sellnuts/z_en_sellnuts.c | 2 +- .../actors/ovl_En_Suttari/z_en_suttari.c | 4 +- src/overlays/actors/ovl_En_Trt2/z_en_trt2.c | 2 +- .../actors/ovl_En_Tru_Mt/z_en_tru_mt.c | 2 +- src/overlays/actors/ovl_Obj_Um/z_obj_um.c | 6 +- tools/disasm/functions.txt | 88 ++++++------- tools/namefixer.py | 60 +++++++-- tools/sizes/code_functions.csv | 88 ++++++------- 29 files changed, 305 insertions(+), 310 deletions(-) diff --git a/include/z64math.h b/include/z64math.h index 5bf72296f..7e1d990b5 100644 --- a/include/z64math.h +++ b/include/z64math.h @@ -222,17 +222,17 @@ 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_LineVsLineClosestTwoPoints(Vec3f* lineAPointA, Vec3f* lineAPointB, Vec3f* lineBPointA, Vec3f* lineBPointB, Vec3f* lineAClosestToB, Vec3f* lineBClosestToA); +s32 Math3D_LineSegMakePerpLineSeg(Vec3f* lineAPointA, Vec3f* lineAPointB, Vec3f* lineBPointA, Vec3f* lineBPointB, Vec3f* lineAClosestToB, Vec3f* lineBClosestToA); f32 Math3D_LineClosestToPoint(Linef* line, Vec3f* pos, Vec3f* closestPoint); -void func_80179B34(float planeAAxis1Norm, f32 planeAAxis2Norm, f32 planeBAxis1Norm, f32 planeBAxis2Norm, f32 axis3Direction, f32 planeADist, f32 planeBDist, float* axis1Point, float* axis2Point); -s32 func_80179B94(f32 planeAA, f32 planeAB, f32 planeAC, f32 planeADist, f32 planeBA, f32 planeBB, f32 planeBC, f32 planeBDist, InfiniteLine* intersect); -// 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* v0, Vec3f* dir, f32 scale, Vec3f* ret); -void Math3D_Lerp(Vec3f* v0, Vec3f* v1, f32 ratio, Vec3f* ret); +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); +// void Math3D_PlaneVsPlaneVsLineClosestPoint(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_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 func_80179F64(Vec3f* vec, Vec3f* normal, Vec3f* reflVec); -s32 Math3D_XZBoundCheck(f32 upperLeftX, f32 lowerRightX, f32 upperLeftY, f32 lowerRightY, f32 x, f32 y); +void Math3D_Vec3fReflect(Vec3f* vec, Vec3f* normal, Vec3f* reflVec); +s32 Math3D_PointInSquare2D(f32 upperLeftX, f32 lowerRightX, f32 upperLeftY, f32 lowerRightY, f32 x, f32 y); // 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* arg0, Vec3f* arg1, Vec3f* arg2, f32 arg3, f32 arg4, f32 arg5); @@ -256,59 +256,59 @@ 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 func_8017B7F8(Vec3f* pointOnPlane, s16 angle, f32* a, f32* c, f32* d); -void Math3D_UnitNormalVector(Vec3f* va, Vec3f* vb, Vec3f* vc, f32* nx, f32* ny, f32* nz, f32* originDist); -f32 Math3D_SignedDistanceFromPlane(f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* pointOnPlane); -f32 func_8017B9D8(Plane* plane, Vec3f* pointOnPlane); +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_TriChkPointParaYDist(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 z, f32 x, f32 detMax, 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_TriChkPointParaYImpl(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 z, f32 x, f32 detMax, f32 chkDist, f32 ny); +// void Math3D_TriChkPointParaYDeterminate(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 Math3D_TriChkPointParaYSlopedY(UNK_TYPE1 param_1, UNK_TYPE1 param_2, UNK_TYPE1 param_3, UNK_TYPE1 param_4, UNK_TYPE4 param_5); 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); -// 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); +// void Math3D_TriChkPointParaY(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 detMax, f32 chkDist, f32 ny); -// 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); +// void Math3D_TriChkPointParaYDist(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 Math3D_TriChkPointParaYImplNoCheckRange(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_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); +// void Math3D_TriChkPointParaXDeterminate(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* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, 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); +// void Math3D_TriChkPointParaX(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 x, f32 y, f32 detMax, 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); +// void Math3D_TriChkLineSegParaXDist(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_TriChkPointParaZImpl(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 x, f32 y, f32 detMax, f32 chkDist, f32 nz); +// void Math3D_TriChkPointParaZDeterminate(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* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, 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); +// void Math3D_TriChkPointParaZ(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); +// void Math3D_TriChkLineSegParaZDist(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 Math3D_LineSegFindPlaneIntersect(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); -s32 func_8017D404(Vec3f* v0, Vec3f* v1, Vec3f* v2, f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* linePointA, Vec3f* linePointB, Vec3f* intersect, s32 fromFront) ; -void Math3D_TriSetCoords(TriNorm* tri, Vec3f* va, Vec3f* vb, Vec3f* vc); -s32 Math3D_IsPointInSphere(Sphere16* sphere, Vec3f* point); +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_PointDistToLine2D(f32 x0, f32 y0, f32 x1, f32 y1, f32 x2, f32 y2, f32* perpXOut, f32* perpYOut, f32* lineLenSq); // returns boolean s32 func_8017D7C0(f32 x0, f32 y0, f32 x1, f32 y1, f32 x2, f32 y2, f32* lineLenSq); s32 func_8017D814(f32 x0, f32 y0, Vec3f* p1, Vec3f* p2, f32* lineLenSq); s32 func_8017D91C(f32 y0, f32 z0, Vec3f* p1, Vec3f* p2, f32* lineLenSq); s32 func_8017DA24(f32 z0, f32 x0, Vec3f* p1, Vec3f* p2, f32* lineLenSq); s32 Math3D_LineVsSph(Sphere16* sphere, Linef* line); -void func_8017DD34(Sphere16* sphere, TriNorm* tri, Vec3f* intersectPoint); -s32 Math3D_ColSphereTri(Sphere16* sphere, TriNorm* tri, Vec3f* intersectPoint); -s32 func_8017E294(Cylinder16* cyl, Vec3f* point); -s32 func_8017E350(Cylinder16* cyl, Vec3f* linePointA, Vec3f* linePointB, Vec3f* intersectA, Vec3f* intersectB); -s32 Math3D_ColCylinderTri(Cylinder16* cyl, TriNorm* tri, Vec3f* intersect); -// void func_8017F1A0(void); +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); +// void Math3D_CylVsTri(void); s32 Math3D_SphVsSph(Sphere16* sphereA, Sphere16* sphereB); -s32 Math3D_ColSphereSphereIntersect(Sphere16* sphereA, Sphere16* sphereB, f32* overlapSize); -s32 Math3D_ColSphereSphereIntersectAndDistance(Sphere16* sphereA, Sphere16* sphereB, f32* overlapSize, f32* centerDist); -s32 Math3D_ColSphereCylinderDistance(Sphere16* sph, Cylinder16* cyl, f32* overlapSize); -s32 Math3D_ColSphereCylinderDistanceAndAmount(Sphere16* sph, Cylinder16* cyl, f32* overlapSize, f32* centerDist); -s32 Math3D_ColCylinderCylinderAmount(Cylinder16* ca, Cylinder16* cb, f32* deadSpace); -s32 Math3D_ColCylinderCylinderAmountAndDistance(Cylinder16* ca, Cylinder16* cb, f32* deadSpace, f32* xzDist); -s32 Math3d_ColTriTri(TriNorm* ta, TriNorm* tb, Vec3f* intersect); +s32 Math3D_SphVsSphOverlap(Sphere16* sphereA, Sphere16* sphereB, f32* overlapSize); +s32 Math3D_SphVsSphOverlapCenter(Sphere16* sphereA, Sphere16* sphereB, f32* overlapSize, f32* centerDist); +s32 Math3D_SphVsCylOverlapDist(Sphere16* sph, Cylinder16* cyl, f32* overlapSize); +s32 Math3D_SphVsCylOverlapCenterDist(Sphere16* sph, Cylinder16* cyl, f32* overlapSize, f32* centerDist); +s32 Math3D_CylOutsideCyl(Cylinder16* ca, Cylinder16* cb, f32* deadSpace); +s32 Math3D_CylOutsideCylDist(Cylinder16* ca, Cylinder16* cb, f32* deadSpace, f32* xzDist); +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); diff --git a/src/code/sys_math3d.c b/src/code/sys_math3d.c index f3234a053..8a8656d4e 100644 --- a/src/code/sys_math3d.c +++ b/src/code/sys_math3d.c @@ -2,56 +2,6 @@ #include "libc/stdbool.h" #include "libc/math.h" -#define Math3D_FindPointOnPlaneIntersect func_80179B34 -#define Math3D_PlaneVsPlaneNewLine func_80179B94 -#define Math3D_LineSegMakePerpLineSeg Math3D_LineVsLineClosestTwoPoints -#define Math3D_Plane func_8017B9D8 -#define Math3D_TriLineIntersect func_8017D404 -#define Math3D_CylOutsideCylDist Math3D_ColCylinderCylinderAmountAndDistance -#define Math3D_CylOutsideCyl Math3D_ColCylinderCylinderAmount -#define Math3D_SphVsCylOverlapCenterDist Math3D_ColSphereCylinderDistanceAndAmount -#define Math3D_CylTriVsIntersect Math3D_ColCylinderTri -#define Math3D_CylVsTri func_8017F1A0 -#define Math3D_SphVsSph Math3D_SphVsSph -#define Math3D_SphVsSphOverlap Math3D_ColSphereSphereIntersect -#define Math3D_SphVsSphOverlapCenter Math3D_ColSphereSphereIntersectAndDistance -#define Math3D_SphVsCylOverlapDist Math3D_ColSphereCylinderDistance -#define Math3D_CylVsLineSeg func_8017E350 -#define Math3D_TriVsSphIntersect Math3D_ColSphereTri -#define Math3D_PointOnDirectedLine Math3D_ScaleAndAdd -#define Math3D_LineSplitRatio Math3D_Lerp -#define Math3D_PlaneVsPlaneVsLineClosestPoint func_80179D74 -#define Math3D_PointInCyl func_8017E294 -#define Math3D_Vec3fReflect func_80179F64 -#define Math3D_PointInSquare2D Math3D_XZBoundCheck -#define Math3D_RotateXZPlane func_8017B7F8 -#define Math3D_DefPlane Math3D_UnitNormalVector -#define Math3D_PlaneF Math3D_SignedDistanceFromPlane -#define Math3D_Plane func_8017B9D8 -#define Math3D_DistPlaneToPos Math3D_DistPlaneToPos -#define Math3D_TriChkPointParaYImpl Math3D_TriChkPointParaYDist -#define Math3D_TriChkPointParaYDeterminate func_8017BD98 -#define Math3D_TriChkPointParaYSlopedY func_8017BDE0 -#define Math3D_TriChkPointParaY func_8017BF8C -#define Math3D_TriChkPointParaYDist_ func_8017C17C -#define Math3D_TriChkPointParaYImplNoCheckRange func_8017C1F0 -#define Math3D_TriChkPointParaYNoRangeCheckIntersectInsideTri Math3D_TriChkPointParaYIntersectInsideTri2 -#define Math3D_TriChkPointParaXImpl Math3D_TriChkPointParaXDist -#define Math3D_TriChkPointParaXDeterminate func_8017C808 -#define Math3D_TriChkPointParaX func_8017C904 -#define Math3D_TriChkLineSegParaXDist func_8017CB08 -#define Math3D_TriChkPointParaZImpl Math3D_TriChkLineSegParaZDist -#define Math3D_TriChkPointParaZDeterminate func_8017CEA8 -#define Math3D_TriChkPointParaZ func_8017CFA4 -#define Math3D_TriChkLineSegParaZDist_ func_8017D1AC -#define Math3D_LineSegFindPlaneIntersect func_8017D220 -#define Math3D_TriLineIntersect func_8017D404 -#define Math3D_TriNorm Math3D_TriSetCoords -#define Math3D_PointInSph Math3D_IsPointInSphere -#define Math3D_PointDistToLine2D_ func_8017D814 -#define Math3D_TriVsTriIntersect Math3d_ColTriTri -#define Math3D_GetSphVsTriIntersectPoint func_8017DD34 - f32 Math3D_Normalize(Vec3f* vec) { f32 magnitude = Math3D_Vec3fMagnitude(vec); @@ -100,7 +50,7 @@ s32 Math3D_PlaneVsLineSegClosestPoint(f32 planeAA, f32 planeAB, f32 planeAC, f32 /** * Finds the two points on lines A and B where the lines are closest together. */ -s32 Math3D_LineVsLineClosestTwoPoints(Vec3f* lineAPointA, Vec3f* lineAPointB, Vec3f* lineBPointA, Vec3f* lineBPointB, +s32 Math3D_LineSegMakePerpLineSeg(Vec3f* lineAPointA, Vec3f* lineAPointB, Vec3f* lineBPointA, Vec3f* lineBPointB, Vec3f* lineAClosestToB, Vec3f* lineBClosestToA) { f32 sqMag; f32 scaleB; @@ -246,7 +196,7 @@ s32 Math3D_PlaneVsPlaneVsLineClosestPoint(f32 planeAA, f32 planeAB, f32 planeAC, return true; } #else -#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_80179D74.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_PlaneVsPlaneVsLineClosestPoint.s") #endif /** @@ -974,7 +924,7 @@ void Math3D_DefPlane(Vec3f* va, Vec3f* vb, Vec3f* vc, f32* nx, f32* ny, f32* nz, } } #else -#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_UnitNormalVector.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_DefPlane.s") #endif f32 Math3D_PlaneF(f32 nx, f32 ny, f32 nz, f32 originDist, Vec3f* pointOnPlane) { @@ -1526,7 +1476,8 @@ s32 func_8017D7C0(f32 x0, f32 y0, f32 x1, f32 y1, f32 x2, f32 y2, f32* lineLenSq return Math3D_PointDistToLine2D(x0, y0, x1, y1, x2, y2, &perpX, &perpY, lineLenSq); } -s32 Math3D_PointDistToLine2D_(f32 x0, f32 y0, Vec3f* p1, Vec3f* p2, f32* lineLenSq) { +// Math3D_PointDistToLine2D_ +s32 func_8017D814(f32 x0, f32 y0, Vec3f* p1, Vec3f* p2, f32* lineLenSq) { f32 perpendicularRatio; f32 xDiff = p2->x - p1->x; f32 yDiff = p2->y - p1->y; @@ -1672,7 +1623,7 @@ void Math3D_GetSphVsTriIntersectPoint(Sphere16* sphere, TriNorm* tri, Vec3f* int Math3D_LineSplitRatio(&sphereCenter, &v0v1Center, splitRatio, intersectPoint); } #else -#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017DD34.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_GetSphVsTriIntersectPoint.s") #endif #ifdef NON_MATCHING @@ -1762,7 +1713,7 @@ s32 Math3D_TriVsSphIntersect(Sphere16* sphere, TriNorm* tri, Vec3f* intersectPoi return false; } #else -#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_ColSphereTri.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_TriVsSphIntersect.s") #endif s32 Math3D_PointInCyl(Cylinder16* cyl, Vec3f* point) { @@ -1964,7 +1915,7 @@ s32 Math3D_CylVsLineSeg(Cylinder16* cyl, Vec3f* linePointA, Vec3f* linePointB, V return count; } #else -#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/func_8017E350.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_CylVsLineSeg.s") #endif #ifdef NON_MATCHING @@ -2062,7 +2013,7 @@ s32 Math3D_CylTriVsIntersect(Cylinder16* cyl, TriNorm* tri, Vec3f* intersect) { return false; } #else -#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_ColCylinderTri.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_CylTriVsIntersect.s") #endif s32 Math3D_CylVsTri(Cylinder16* cyl, TriNorm* tri) { @@ -2153,7 +2104,7 @@ s32 Math3D_SphVsCylOverlapCenterDist(Sphere16* sph, Cylinder16* cyl, f32* overla return false; } #else -#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_ColSphereCylinderDistanceAndAmount.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_SphVsCylOverlapCenterDist.s") #endif s32 Math3D_CylOutsideCyl(Cylinder16* ca, Cylinder16* cb, f32* deadSpace) { @@ -2195,7 +2146,7 @@ s32 Math3D_CylOutsideCylDist(Cylinder16* ca, Cylinder16* cb, f32* deadSpace, f32 return true; } #else -#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_ColCylinderCylinderAmountAndDistance.s") +#pragma GLOBAL_ASM("asm/non_matchings/code/sys_math3d/Math3D_CylOutsideCylDist.s") #endif s32 Math3D_TriVsTriIntersect(TriNorm* ta, TriNorm* tb, Vec3f* intersect) { diff --git a/src/code/z_bgcheck.c b/src/code/z_bgcheck.c index 2ce46459e..c35842022 100644 --- a/src/code/z_bgcheck.c +++ b/src/code/z_bgcheck.c @@ -363,7 +363,7 @@ s32 CollisionPoly_CheckYIntersect(CollisionPoly* poly, Vec3s* vtxList, f32 x, f3 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, + return Math3D_TriChkPointParaYNoRangeCheckIntersectInsideTri(&D_801EDA18[0], &D_801EDA18[1], &D_801EDA18[2], nx, ny, nz, poly->dist, z, x, yIntersect, checkDist); } @@ -429,16 +429,16 @@ 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, + Math3D_TriChkPointParaZImpl(&sPolyVerts[0], &sPolyVerts[1], &sPolyVerts[2], a0->planeIntersect->x, a0->planeIntersect->y, 0.0f, a0->checkDist, sPlane.normal.z))) { return true; } @@ -463,7 +463,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); } #else s32 CollisionPoly_SphVsPoly(CollisionPoly* poly, Vec3s* vtxList, Vec3f* center, f32 radius); diff --git a/src/code/z_camera.c b/src/code/z_camera.c index c0bb26430..b6a829b71 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -1847,13 +1847,13 @@ void Camera_CalcDefaultSwing(Camera* camera, VecGeo* arg1, VecGeo* arg2, f32 arg //! FAKE: dummy:; swing->unk_64 = 0; - } else if ((sp88 = Math3D_SignedDistanceFromPlane(swing->eyeAtColChk.norm.x, swing->eyeAtColChk.norm.y, + } 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, + } 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; diff --git a/src/code/z_collision_check.c b/src/code/z_collision_check.c index 50045a278..0e44356b8 100644 --- a/src/code/z_collision_check.c +++ b/src/code/z_collision_check.c @@ -619,7 +619,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; @@ -1733,7 +1733,7 @@ void CollisionCheck_AC_JntSphVsJntSph(PlayState* play, CollisionCheckContext* co continue; } - if (Math3D_ColSphereSphereIntersectAndDistance(&atElem->dim.worldSphere, &acElem->dim.worldSphere, + if (Math3D_SphVsSphOverlapCenter(&atElem->dim.worldSphere, &acElem->dim.worldSphere, &overlapSize, ¢erDist) != 0) { f32 acToHit; Vec3f hitPos; @@ -1784,7 +1784,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, + if (Math3D_SphVsCylOverlapCenterDist(&atElem->dim.worldSphere, &ac->dim, &overlapSize, ¢erDist)) { Vec3f hitPos; Vec3f atPos; @@ -1834,7 +1834,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; @@ -1862,8 +1862,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)) { @@ -1872,8 +1872,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; @@ -1909,7 +1909,7 @@ 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, + if (Math3D_SphVsSphOverlapCenter(&sphElem->dim.worldSphere, &ac->dim.worldSphere, &overlapSize, ¢erDist) != 0) { f32 acToHit; Vec3f hitPos; @@ -1954,7 +1954,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, + if (Math3D_SphVsCylOverlapCenterDist(&sphElem->dim.worldSphere, &at->dim, &overlapSize, ¢erDist) != 0) { Vec3f hitPos; Vec3f atPos; @@ -2005,7 +2005,7 @@ void CollisionCheck_AC_CylVsCyl(PlayState* play, CollisionCheckContext* colCtxt, return; } - if (Math3D_ColCylinderCylinderAmountAndDistance(&at->dim, &ac->dim, &overlapSize, ¢erDist) != 0) { + if (Math3D_CylOutsideCylDist(&at->dim, &ac->dim, &overlapSize, ¢erDist) != 0) { Vec3f hitPos; Vec3f atPos; Vec3f acPos; @@ -2059,7 +2059,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; @@ -2089,17 +2089,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; @@ -2130,7 +2130,7 @@ void CollisionCheck_AC_CylVsSphere(PlayState* play, CollisionCheckContext* colCt return; } - if (Math3D_ColSphereCylinderDistanceAndAmount(&ac->dim.worldSphere, &at->dim, &overlapSize, ¢erDist) != 0) { + if (Math3D_SphVsCylOverlapCenterDist(&ac->dim.worldSphere, &at->dim, &overlapSize, ¢erDist) != 0) { Vec3f hitPos; Vec3f atPos; Vec3f acPos; @@ -2178,7 +2178,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; @@ -2215,7 +2215,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; @@ -2250,7 +2250,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; @@ -2278,8 +2278,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)) { @@ -2288,8 +2288,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; @@ -2323,7 +2323,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; @@ -2348,8 +2348,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)) { @@ -2358,8 +2358,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; @@ -2396,10 +2396,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; @@ -2410,7 +2410,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; @@ -2436,8 +2436,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)) { @@ -2447,8 +2447,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; @@ -2483,14 +2483,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; @@ -2519,11 +2519,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; @@ -2559,7 +2559,7 @@ void CollisionCheck_AC_SphereVsJntSph(PlayState* play, CollisionCheckContext* co continue; } - if (Math3D_ColSphereSphereIntersectAndDistance(&at->dim.worldSphere, &acElem->dim.worldSphere, &overlapSize, + if (Math3D_SphVsSphOverlapCenter(&at->dim.worldSphere, &acElem->dim.worldSphere, &overlapSize, ¢erDist) != 0) { f32 acToHit; Vec3f hitPos; @@ -2602,7 +2602,7 @@ void CollisionCheck_AC_SphereVsCylinder(PlayState* play, CollisionCheckContext* return; } - if (Math3D_ColSphereCylinderDistanceAndAmount(&at->dim.worldSphere, &ac->dim, &overlapSize, ¢erDist) != 0) { + if (Math3D_SphVsCylOverlapCenterDist(&at->dim.worldSphere, &ac->dim, &overlapSize, ¢erDist) != 0) { Vec3f hitPos; Vec3f atPos; Vec3f acPos; @@ -2649,7 +2649,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; @@ -2676,11 +2676,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; @@ -2710,7 +2710,7 @@ void CollisionCheck_AC_SphereVsSphere(PlayState* play, CollisionCheckContext* co return; } - if (Math3D_ColSphereSphereIntersectAndDistance(&at->dim.worldSphere, &ac->dim.worldSphere, &overlapSize, + if (Math3D_SphVsSphOverlapCenter(&at->dim.worldSphere, &ac->dim.worldSphere, &overlapSize, ¢erDist) != 0) { f32 acToHit; Vec3f hitPos; @@ -3043,7 +3043,7 @@ void CollisionCheck_OC_JntSphVsJntSph(PlayState* play, CollisionCheckContext* co if (!(rightElem->info.ocElemFlags & OCELEM_ON)) { continue; } - if (Math3D_ColSphereSphereIntersect(&leftElem->dim.worldSphere, &rightElem->dim.worldSphere, + if (Math3D_SphVsSphOverlap(&leftElem->dim.worldSphere, &rightElem->dim.worldSphere, &overlap) != 0) { Vec3f leftPos; Vec3f rightPos; @@ -3074,7 +3074,7 @@ 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_SphVsCylOverlapDist(&leftElem->dim.worldSphere, &right->dim, &overlap) != 0) { Vec3f leftPos; Vec3f rightPos; @@ -3103,7 +3103,7 @@ 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, &overlap) != 0) { Vec3f leftPos; Vec3f rightPos; @@ -3133,7 +3133,7 @@ void CollisionCheck_OC_CylVsCyl(PlayState* play, CollisionCheckContext* colCtxt, 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_CylOutsideCyl(&left->dim, &right->dim, &overlap) != 0) { Vec3f leftPos; Vec3f rightPos; @@ -3155,7 +3155,7 @@ void CollisionCheck_OC_CylVsSphere(PlayState* play, CollisionCheckContext* colCt 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_SphVsCylOverlapDist(&right->dim.worldSphere, &left->dim, &overlap) != 0) { Vec3f leftPos; Vec3f rightPos; @@ -3191,7 +3191,7 @@ void CollisionCheck_OC_SphereVsSphere(PlayState* play, CollisionCheckContext* co 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, &overlap) != 0) { Vec3f leftPos; Vec3f rightPos; @@ -3496,7 +3496,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; } @@ -3627,7 +3627,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; diff --git a/src/code/z_eff_tire_mark.c b/src/code/z_eff_tire_mark.c index 66e01b6f8..10b3d9fa2 100644 --- a/src/code/z_eff_tire_mark.c +++ b/src/code/z_eff_tire_mark.c @@ -57,8 +57,8 @@ void func_800AE930(CollisionContext* colCtx, EffectTireMark* this, Vec3f* pos, f sp48.y = spB8.y; sp48.z = spB8.z; - if ((Math3D_LineVsLineClosestTwoPoints(&sp84, &sp90, &sp54, &sp60, &sp6C, &sp30) != 0) && - (Math3D_LineVsLineClosestTwoPoints(&sp84, &sp90, &sp3C, &sp48, &sp78, &sp30) != 0)) { + if ((Math3D_LineSegMakePerpLineSeg(&sp84, &sp90, &sp54, &sp60, &sp6C, &sp30) != 0) && + (Math3D_LineSegMakePerpLineSeg(&sp84, &sp90, &sp3C, &sp48, &sp78, &sp30) != 0)) { if (!(spAC->flags & 2)) { spAC->flags |= 1; } diff --git a/src/code/z_sub_s.c b/src/code/z_sub_s.c index eea4feca2..1dd35ab84 100644 --- a/src/code/z_sub_s.c +++ b/src/code/z_sub_s.c @@ -577,7 +577,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(func_80086B30(diffX, diffZ)), &px, &pz, &d); + Math3D_RotateXZPlane(&point, RAD_TO_BINANG(func_80086B30(diffX, diffZ)), &px, &pz, &d); if (((px * actor->world.pos.x) + (pz * actor->world.pos.z) + d) > 0.0f) { reached = true; } diff --git a/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.c b/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.c index 41dba0aab..bd8840785 100644 --- a/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.c +++ b/src/overlays/actors/ovl_En_Akindonuts/z_en_akindonuts.c @@ -179,7 +179,7 @@ s32 func_80BECD10(EnAkindonuts* this, Path* path, s32 arg2) { phi_f14 = sp5C[idx + 1].z - sp5C[idx - 1].z; } - func_8017B7F8(&sp30, RAD_TO_BINANG(func_80086B30(phi_f12, phi_f14)), &sp44, &sp40, &sp3C); + Math3D_RotateXZPlane(&sp30, RAD_TO_BINANG(func_80086B30(phi_f12, phi_f14)), &sp44, &sp40, &sp3C); if (((this->actor.world.pos.x * sp44) + (sp40 * this->actor.world.pos.z) + sp3C) > 0.0f) { sp50 = true; } diff --git a/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c b/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c index 1c0c2cfc4..b1062343e 100644 --- a/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c +++ b/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c @@ -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; diff --git a/src/overlays/actors/ovl_En_Dg/z_en_dg.c b/src/overlays/actors/ovl_En_Dg/z_en_dg.c index 8a6ae63e8..f1ebb07e3 100644 --- a/src/overlays/actors/ovl_En_Dg/z_en_dg.c +++ b/src/overlays/actors/ovl_En_Dg/z_en_dg.c @@ -280,7 +280,7 @@ s32 EnDg_HasReachedPoint(EnDg* this, Path* path, s32 pointIndex) { diffZ = points[currentPoint + 1].z - points[currentPoint - 1].z; } - func_8017B7F8(&point, RAD_TO_BINANG(func_80086B30(diffX, diffZ)), &px, &pz, &d); + Math3D_RotateXZPlane(&point, RAD_TO_BINANG(func_80086B30(diffX, diffZ)), &px, &pz, &d); if (((this->actor.world.pos.x * px) + (pz * this->actor.world.pos.z) + d) > 0.0f) { reached = true; diff --git a/src/overlays/actors/ovl_En_Gg2/z_en_gg2.c b/src/overlays/actors/ovl_En_Gg2/z_en_gg2.c index fdd099fff..a12afdcb5 100644 --- a/src/overlays/actors/ovl_En_Gg2/z_en_gg2.c +++ b/src/overlays/actors/ovl_En_Gg2/z_en_gg2.c @@ -310,7 +310,7 @@ s32 func_80B3B648(EnGg2* this, Path* path, s32 arg2_) { phi_f14 = points[arg2 + 1].z - points[arg2 - 1].z; } - func_8017B7F8(&sp30, RAD_TO_BINANG(func_80086B30(phi_f12, phi_f14)), &sp44, &sp40, &sp3C); + Math3D_RotateXZPlane(&sp30, RAD_TO_BINANG(func_80086B30(phi_f12, phi_f14)), &sp44, &sp40, &sp3C); if (((this->actor.world.pos.x * sp44) + (sp40 * this->actor.world.pos.z) + sp3C) > 0.0f) { ret = true; diff --git a/src/overlays/actors/ovl_En_Gk/z_en_gk.c b/src/overlays/actors/ovl_En_Gk/z_en_gk.c index 40cf72a98..617b36377 100644 --- a/src/overlays/actors/ovl_En_Gk/z_en_gk.c +++ b/src/overlays/actors/ovl_En_Gk/z_en_gk.c @@ -374,7 +374,7 @@ s32 func_80B50C78(EnGk* this, Path* path, s32 arg2_) { phi_f14 = sp5C[arg2 + 1].z - sp5C[arg2 - 1].z; } - func_8017B7F8(&sp30, RAD_TO_BINANG(func_80086B30(phi_f12, phi_f14)), &sp44, &sp40, &sp3C); + Math3D_RotateXZPlane(&sp30, RAD_TO_BINANG(func_80086B30(phi_f12, phi_f14)), &sp44, &sp40, &sp3C); if (((this->actor.world.pos.x * sp44) + (sp40 * this->actor.world.pos.z) + sp3C) > 0.0f) { ret = true; diff --git a/src/overlays/actors/ovl_En_Horse/z_en_horse.c b/src/overlays/actors/ovl_En_Horse/z_en_horse.c index 6ca711a2b..a3c2bce4a 100644 --- a/src/overlays/actors/ovl_En_Horse/z_en_horse.c +++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.c @@ -327,7 +327,7 @@ void func_8087B7C0(EnHorse* this, PlayState* play, Path* path) { phi_f14 = spA0[this->curRaceWaypoint + 1].z - spA0[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++; @@ -2809,7 +2809,7 @@ 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_Vec3f_DistXYZ(&pos, &this->actor.world.pos) < DREG(8))) { diff --git a/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c b/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c index d37fb8f23..da421f47f 100644 --- a/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c +++ b/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c @@ -257,21 +257,21 @@ 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], + 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], + 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], + 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; } @@ -290,21 +290,21 @@ 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], + 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], + 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], + 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; } @@ -322,19 +322,19 @@ 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], + 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, + 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, + 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; } diff --git a/src/overlays/actors/ovl_En_Jg/z_en_jg.c b/src/overlays/actors/ovl_En_Jg/z_en_jg.c index 451b9e553..cf24f698a 100644 --- a/src/overlays/actors/ovl_En_Jg/z_en_jg.c +++ b/src/overlays/actors/ovl_En_Jg/z_en_jg.c @@ -242,7 +242,7 @@ s32 EnJg_ReachedPoint(EnJg* this, Path* path, s32 pointIndex) { diffZ = points[currentPoint + 1].z - points[currentPoint - 1].z; } - func_8017B7F8(&point, RAD_TO_BINANG(func_80086B30(diffX, diffZ)), &px, &pz, &d); + Math3D_RotateXZPlane(&point, RAD_TO_BINANG(func_80086B30(diffX, diffZ)), &px, &pz, &d); if (((this->actor.world.pos.x * px) + (pz * this->actor.world.pos.z) + d) > 0.0f) { reached = true; diff --git a/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c b/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c index c94a94b12..605729f22 100644 --- a/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c +++ b/src/overlays/actors/ovl_En_Mt_tag/z_en_mt_tag.c @@ -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 diff --git a/src/overlays/actors/ovl_En_Mushi2/z_en_mushi2.c b/src/overlays/actors/ovl_En_Mushi2/z_en_mushi2.c index ee6c61a43..a14daa318 100644 --- a/src/overlays/actors/ovl_En_Mushi2/z_en_mushi2.c +++ b/src/overlays/actors/ovl_En_Mushi2/z_en_mushi2.c @@ -602,11 +602,11 @@ void func_80A69ADC(Actor* thisx) { s32 pad2; if (this->unk_358 < 1.0f) { - sp44 = Math3D_SignedDistanceFromPlane( + 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_SignedDistanceFromPlane( + 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); @@ -648,11 +648,11 @@ void func_80A69D3C(EnMushi2* this) { f32 sp38; if ((this->unk_34C != NULL) && (this->unk_358 > 0.999f)) { - sp40 = Math3D_SignedDistanceFromPlane( + 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_SignedDistanceFromPlane( + 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); diff --git a/src/overlays/actors/ovl_En_Rg/z_en_rg.c b/src/overlays/actors/ovl_En_Rg/z_en_rg.c index d552c5605..ea108d457 100644 --- a/src/overlays/actors/ovl_En_Rg/z_en_rg.c +++ b/src/overlays/actors/ovl_En_Rg/z_en_rg.c @@ -614,7 +614,7 @@ void func_80BF4AB8(EnRg* this, PlayState* play) { } s32 func_80BF4D64(Vec3f* arg0) { - return Math3D_XZBoundCheck(-1261.0f, -901.0f, -1600.0f, -1520.0f, arg0->x, arg0->z); + return Math3D_PointInSquare2D(-1261.0f, -901.0f, -1600.0f, -1520.0f, arg0->x, arg0->z); } s32 func_80BF4DA8(EnRg* this) { diff --git a/src/overlays/actors/ovl_En_Ruppecrow/z_en_ruppecrow.c b/src/overlays/actors/ovl_En_Ruppecrow/z_en_ruppecrow.c index e270f1515..e60c773d0 100644 --- a/src/overlays/actors/ovl_En_Ruppecrow/z_en_ruppecrow.c +++ b/src/overlays/actors/ovl_En_Ruppecrow/z_en_ruppecrow.c @@ -163,7 +163,7 @@ s32 EnRuppecrow_ReachedPointClockwise(EnRuppecrow* this, Path* path, s32 pointIn } } - func_8017B7F8(&point, RAD_TO_BINANG(func_80086B30(diffX, diffZ)), &px, &pz, &d); + Math3D_RotateXZPlane(&point, RAD_TO_BINANG(func_80086B30(diffX, diffZ)), &px, &pz, &d); if (((this->actor.world.pos.x * px) + (pz * this->actor.world.pos.z) + d) > 0.0f) { reached = true; } @@ -198,7 +198,7 @@ s32 EnRuppecrow_ReachedPointCounterClockwise(EnRuppecrow* this, Path* path, s32 } } - func_8017B7F8(&point, RAD_TO_BINANG(func_80086B30(diffX, diffZ)), &px, &pz, &d); + Math3D_RotateXZPlane(&point, RAD_TO_BINANG(func_80086B30(diffX, diffZ)), &px, &pz, &d); if (((this->actor.world.pos.x * px) + (pz * this->actor.world.pos.z) + d) > 0.0f) { reached = true; } diff --git a/src/overlays/actors/ovl_En_Scopecrow/z_en_scopecrow.c b/src/overlays/actors/ovl_En_Scopecrow/z_en_scopecrow.c index 321c790d1..c7a2863f6 100644 --- a/src/overlays/actors/ovl_En_Scopecrow/z_en_scopecrow.c +++ b/src/overlays/actors/ovl_En_Scopecrow/z_en_scopecrow.c @@ -192,7 +192,7 @@ s32 func_80BCD334(EnScopecrow* this, Path* path, s32 pointIndex) { phi_fa1 = points[index + 1].z - points[index - 1].z; } - func_8017B7F8(&sp30, RAD_TO_BINANG(func_80086B30(phi_fa0, phi_fa1)), &sp3C.z, &sp3C.y, &sp3C.x); + Math3D_RotateXZPlane(&sp30, RAD_TO_BINANG(func_80086B30(phi_fa0, phi_fa1)), &sp3C.z, &sp3C.y, &sp3C.x); if (((this->actor.world.pos.x * sp3C.z) + (sp3C.y * this->actor.world.pos.z) + sp3C.x) > 0.0f) { ret = true; diff --git a/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.c b/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.c index 07e2646a0..d9ef2b83e 100644 --- a/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.c +++ b/src/overlays/actors/ovl_En_Scopenuts/z_en_scopenuts.c @@ -654,7 +654,7 @@ s32 func_80BCC2AC(EnScopenuts* this, Path* path, s32 arg2_) { phi_f14 = sp5C[arg2 + 1].z - sp5C[arg2 - 1].z; } - func_8017B7F8(&sp30, RAD_TO_BINANG(func_80086B30(phi_f12, phi_f14)), &sp44, &sp40, &sp3C); + Math3D_RotateXZPlane(&sp30, RAD_TO_BINANG(func_80086B30(phi_f12, phi_f14)), &sp44, &sp40, &sp3C); if (((this->actor.world.pos.x * sp44) + (sp40 * this->actor.world.pos.z) + sp3C) > 0.0f) { sp50 = true; diff --git a/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.c b/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.c index 871bb85a8..04daf8095 100644 --- a/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.c +++ b/src/overlays/actors/ovl_En_Sellnuts/z_en_sellnuts.c @@ -916,7 +916,7 @@ s32 func_80ADCE4C(EnSellnuts* this, Path* path, s32 arg2) { pointY = points[var + 1].z - points[var - 1].z; } - func_8017B7F8(&sp30, RAD_TO_BINANG(func_80086B30(pointX, pointY)), &sp44, &sp40, &sp3C); + Math3D_RotateXZPlane(&sp30, RAD_TO_BINANG(func_80086B30(pointX, pointY)), &sp44, &sp40, &sp3C); if (((this->actor.world.pos.x * sp44) + (sp40 * this->actor.world.pos.z) + sp3C) > 0.0f) { ret = true; } diff --git a/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c b/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c index 196b29263..2c3ee319c 100644 --- a/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c +++ b/src/overlays/actors/ovl_En_Suttari/z_en_suttari.c @@ -589,7 +589,7 @@ s32 func_80BAB758(EnSuttari* this, Path* path, s32 arg2) { sp54 = sp5C[index + 1].x - sp5C[index - 1].x; sp48 = sp5C[index + 1].z - sp5C[index - 1].z; } - func_8017B7F8(&sp30, RAD_TO_BINANG(func_80086B30(sp54, sp48)), &sp44, &sp40, &sp3C); + Math3D_RotateXZPlane(&sp30, RAD_TO_BINANG(func_80086B30(sp54, sp48)), &sp44, &sp40, &sp3C); if (((sp44 * this->actor.world.pos.x) + (sp40 * this->actor.world.pos.z) + sp3C) > 0.0f) { ret = true; } @@ -619,7 +619,7 @@ s32 func_80BAB8F4(EnSuttari* this, Path* path, s32 arg2) { sp54 = sp5C[index - 1].x - sp5C[index + 1].x; sp48 = sp5C[index - 1].z - sp5C[index + 1].z; } - func_8017B7F8(&sp30, RAD_TO_BINANG(func_80086B30(sp54, sp48)), &sp44, &sp40, &sp3C); + Math3D_RotateXZPlane(&sp30, RAD_TO_BINANG(func_80086B30(sp54, sp48)), &sp44, &sp40, &sp3C); if (((sp44 * this->actor.world.pos.x) + (sp40 * this->actor.world.pos.z) + sp3C) > 0.0f) { ret = true; } diff --git a/src/overlays/actors/ovl_En_Trt2/z_en_trt2.c b/src/overlays/actors/ovl_En_Trt2/z_en_trt2.c index 67f52e064..5dc1b749d 100644 --- a/src/overlays/actors/ovl_En_Trt2/z_en_trt2.c +++ b/src/overlays/actors/ovl_En_Trt2/z_en_trt2.c @@ -592,7 +592,7 @@ s32 func_80AD475C(EnTrt2* this, Path* path, s32 arg2) { phi_f14 = points[arg + 1].z - points[arg - 1].z; } - func_8017B7F8(&sp30, RAD_TO_BINANG(func_80086B30(phi_f12, phi_f14)), &sp44, &sp40, &sp3C); + Math3D_RotateXZPlane(&sp30, RAD_TO_BINANG(func_80086B30(phi_f12, phi_f14)), &sp44, &sp40, &sp3C); if (((this->actor.world.pos.x * sp44) + (sp40 * this->actor.world.pos.z) + sp3C) > 0.0f) { ret = true; diff --git a/src/overlays/actors/ovl_En_Tru_Mt/z_en_tru_mt.c b/src/overlays/actors/ovl_En_Tru_Mt/z_en_tru_mt.c index 09ec80172..fd279df36 100644 --- a/src/overlays/actors/ovl_En_Tru_Mt/z_en_tru_mt.c +++ b/src/overlays/actors/ovl_En_Tru_Mt/z_en_tru_mt.c @@ -301,7 +301,7 @@ s32 func_80B76600(EnTruMt* this, Path* path, s32 arg2) { phi_f14 = sp5C[idx + 1].z - sp5C[idx - 1].z; } - func_8017B7F8(&sp30, RAD_TO_BINANG(func_80086B30(phi_f12, phi_f14)), &sp44, &sp40, &sp3C); + Math3D_RotateXZPlane(&sp30, RAD_TO_BINANG(func_80086B30(phi_f12, phi_f14)), &sp44, &sp40, &sp3C); if (((this->actor.world.pos.x * sp44) + (sp40 * this->actor.world.pos.z) + sp3C) > 0.0f) { sp50 = true; } diff --git a/src/overlays/actors/ovl_Obj_Um/z_obj_um.c b/src/overlays/actors/ovl_Obj_Um/z_obj_um.c index bd43c4679..7128d57a0 100644 --- a/src/overlays/actors/ovl_Obj_Um/z_obj_um.c +++ b/src/overlays/actors/ovl_Obj_Um/z_obj_um.c @@ -400,7 +400,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) { @@ -483,7 +483,7 @@ 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), + 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; @@ -1070,7 +1070,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++; diff --git a/tools/disasm/functions.txt b/tools/disasm/functions.txt index 5041005a1..876c51dc1 100644 --- a/tools/disasm/functions.txt +++ b/tools/disasm/functions.txt @@ -3257,17 +3257,17 @@ 0x801795C0:("randPlusMinusPoint5Scaled",), 0x801795F0:("Math3D_Normalize",), 0x80179678:("Math3D_PlaneVsLineSegClosestPoint",), - 0x80179798:("Math3D_LineVsLineClosestTwoPoints",), + 0x80179798:("Math3D_LineSegMakePerpLineSeg",), 0x80179A44:("Math3D_LineClosestToPoint",), - 0x80179B34:("func_80179B34",), - 0x80179B94:("func_80179B94",), - 0x80179D74:("func_80179D74",), - 0x80179DF0:("Math3D_ScaleAndAdd",), - 0x80179E3C:("Math3D_Lerp",), + 0x80179B34:("Math3D_FindPointOnPlaneIntersect",), + 0x80179B94:("Math3D_PlaneVsPlaneNewLine",), + 0x80179D74:("Math3D_PlaneVsPlaneVsLineClosestPoint",), + 0x80179DF0:("Math3D_PointOnDirectedLine",), + 0x80179E3C:("Math3D_LineSplitRatio",), 0x80179E88:("Math3D_Cos",), 0x80179EAC:("Math3D_CosOut",), - 0x80179F64:("func_80179F64",), - 0x8017A038:("Math3D_XZBoundCheck",), + 0x80179F64:("Math3D_Vec3fReflect",), + 0x8017A038:("Math3D_PointInSquare2D",), 0x8017A09C:("func_8017A09C",), 0x8017A1D0:("func_8017A1D0",), 0x8017A304:("func_8017A304",), @@ -3291,59 +3291,59 @@ 0x8017ABBC:("Math3D_PointRelativeToCubeVertices",), 0x8017AD38:("Math3D_LineVsCube",), 0x8017B68C:("Math3D_LineVsCubeShort",), - 0x8017B7F8:("func_8017B7F8",), - 0x8017B884:("Math3D_UnitNormalVector",), - 0x8017B998:("Math3D_SignedDistanceFromPlane",), - 0x8017B9D8:("func_8017B9D8",), + 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",), + 0x8017D404:("Math3D_TriLineIntersect",), + 0x8017D568:("Math3D_TriNorm",), + 0x8017D618:("Math3D_PointInSph",), 0x8017D668:("Math3D_PointDistToLine2D",), 0x8017D7C0:("func_8017D7C0",), 0x8017D814:("func_8017D814",), 0x8017D91C:("func_8017D91C",), 0x8017DA24:("func_8017DA24",), 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_SphVsSphOverlapCenter",), + 0x8017F2CC:("Math3D_SphVsCylOverlapDist",), + 0x8017F2EC:("Math3D_SphVsCylOverlapCenterDist",), + 0x8017F45C:("Math3D_CylOutsideCyl",), + 0x8017F47C:("Math3D_CylOutsideCylDist",), + 0x8017F64C:("Math3D_TriVsTriIntersect",), 0x8017F9C0:("Math3D_XZInSphere",), 0x8017FA34:("Math3D_XYInSphere",), 0x8017FAA8:("Math3D_YZInSphere",), diff --git a/tools/namefixer.py b/tools/namefixer.py index eefefac57..130c3f07b 100755 --- a/tools/namefixer.py +++ b/tools/namefixer.py @@ -116,7 +116,6 @@ wordReplace = { "Actor_IsActorFacedByActor": "Actor_ActorBIsFacingActorA", "Actor_MarkForDeath": "Actor_Kill", "func_800B84D0": "Actor_ProcessTalkRequest", - "func_8017D668": "Math3D_PointDistToLine2D", "THGA_GetSize": "THGA_GetRemaining", "THGA_AllocStartArray8": "THGA_AllocDisplayList", @@ -493,6 +492,8 @@ wordReplace = { "func_800CA1E8": "WaterBox_GetSurface1_2", "func_800CA22C": "WaterBox_GetSurface2", "func_800CA6D8": "WaterBox_GetLightSettingIndex", + + "func_8017D668": "Math3D_PointDistToLine2D", "func_80179678": "Math3D_PlaneVsLineSegClosestPoint", "Math3D_DistanceSquared": "Math3D_Vec3fDistSq", "Math3D_NormalVector": "Math3D_SurfaceNorm", @@ -502,15 +503,16 @@ 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", @@ -519,7 +521,6 @@ wordReplace = { "Math3D_Parallel": "Math3D_Cos", "Math3D_AngleBetweenVectors": "Math3D_CosOut", "func_80179A44": "Math3D_LineClosestToPoint", - "Math3D_XZLengthSquared": "Math3D_Dist1DSq", "Math3D_XZLength": "Math3D_Dist1D", "Math3D_XZDistanceSquared": "Math3D_Dist2DSq", @@ -527,11 +528,54 @@ wordReplace = { "Math3D_LengthSquared": "Math3D_Vec3fMagnitudeSq", "Math3D_Distance": "Math3D_Vec3f_DistXYZ", "Math3D_DistanceS": "Math3D_DistXYZ16toF", - "func_80179798": "Math3D_LineVsLineClosestTwoPoints", - + "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_CylOutsideCylDist", + "Math3D_ColCylinderCylinderAmount": "Math3D_CylOutsideCyl", + "Math3D_ColSphereCylinderDistanceAndAmount": "Math3D_SphVsCylOverlapCenterDist", + "Math3D_ColCylinderTri": "Math3D_CylTriVsIntersect", + "func_8017F1A0": "Math3D_CylVsTri", + "Math3D_ColSphereSphereIntersect": "Math3D_SphVsSphOverlap", + "Math3D_ColSphereSphereIntersectAndDistance": "Math3D_SphVsSphOverlapCenter", + "Math3D_ColSphereCylinderDistance": "Math3D_SphVsCylOverlapDist", + "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", diff --git a/tools/sizes/code_functions.csv b/tools/sizes/code_functions.csv index 144678765..fe47a815c 100644 --- a/tools/sizes/code_functions.csv +++ b/tools/sizes/code_functions.csv @@ -2771,17 +2771,17 @@ asm/non_matchings/code/sys_math/Rand_ZeroFloat.s,Rand_ZeroFloat,0x80179594,0xB asm/non_matchings/code/sys_math/randPlusMinusPoint5Scaled.s,randPlusMinusPoint5Scaled,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/Math3D_LineVsLineClosestTwoPoints.s,Math3D_LineVsLineClosestTwoPoints,0x80179798,0xAB +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/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_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/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/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/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 @@ -2805,59 +2805,59 @@ asm/non_matchings/code/sys_math3d/Math3D_PointRelativeToCubeEdges.s,Math3D_Point 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/Math3D_LineVsCubeShort.s,Math3D_LineVsCubeShort,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_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_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_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_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_SphVsSphOverlapCenter.s,Math3D_SphVsSphOverlapCenter,0x8017F200,0x33 +asm/non_matchings/code/sys_math3d/Math3D_SphVsCylOverlapDist.s,Math3D_SphVsCylOverlapDist,0x8017F2CC,0x8 +asm/non_matchings/code/sys_math3d/Math3D_SphVsCylOverlapCenterDist.s,Math3D_SphVsCylOverlapCenterDist,0x8017F2EC,0x5C +asm/non_matchings/code/sys_math3d/Math3D_CylOutsideCyl.s,Math3D_CylOutsideCyl,0x8017F45C,0x8 +asm/non_matchings/code/sys_math3d/Math3D_CylOutsideCylDist.s,Math3D_CylOutsideCylDist,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