summaryrefslogtreecommitdiff
path: root/src/SSystem
diff options
context:
space:
mode:
authorMax Roncace <me@caseif.net>2025-08-11 02:22:28 -0400
committerGitHub <noreply@github.com>2025-08-10 23:22:28 -0700
commitddf4fc0677f6b93162389063168458244e14ac59 (patch)
tree6a5ed9d344a1f28860754a8220659fd0fdefa243 /src/SSystem
parent87858822619e0a503e12f78690388c67df13f220 (diff)
Misc framework fixes (#2578)
Diffstat (limited to 'src/SSystem')
-rw-r--r--src/SSystem/SComponent/c_cc_d.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/SSystem/SComponent/c_cc_d.cpp b/src/SSystem/SComponent/c_cc_d.cpp
index 713ba728a0..55ac56a417 100644
--- a/src/SSystem/SComponent/c_cc_d.cpp
+++ b/src/SSystem/SComponent/c_cc_d.cpp
@@ -299,6 +299,22 @@ void cCcD_ShapeAttr::getShapeAccess(cCcD_ShapeAttr::Shape* pshape) const {
pshape->_4.x = 0.0f;
}
+bool cCcD_PntAttr::GetNVec(cXyz const& param_0, cXyz* param_1) const {
+ param_1->x = param_0.x - vtx.x;
+ param_1->y = param_0.y - vtx.y;
+ param_1->z = param_0.z - vtx.z;
+ if (cM3d_IsZero(PSVECMag(param_1))) {
+ param_1->x = 0.0f;
+ param_1->y = 0.0f;
+ param_1->z = 0.0f;
+ return false;
+ } else {
+ PSVECNormalize(param_1, param_1);
+ return true;
+ }
+}
+
+
/* 80263A88-80263B58 25E3C8 00D0+00 1/0 1/0 0/0 .text
* CrossAtTg__12cCcD_TriAttrCFRC12cCcD_CpsAttrP4cXyz */
bool cCcD_TriAttr::CrossAtTg(const cCcD_CpsAttr& cpsAttr, cXyz* pxyz) const {