mirror of
https://github.com/zeldaret/tp
synced 2026-07-10 23:22:01 -04:00
some cc doc and obj_brg work (#2184)
* some cc doc * document dCcD material types * work on d_a_obj_brg
This commit is contained in:
+144
-134
@@ -4,6 +4,10 @@
|
||||
*/
|
||||
|
||||
#include "SSystem/SComponent/c_cc_d.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
|
||||
#define CHECK_FLOAT_CLASS(line, x) JUT_ASSERT(line, !(((sizeof(x) == sizeof(float)) ? __fpclassifyf((float)(x)) : __fpclassifyd((double)(x)) ) == 1));
|
||||
#define CHECK_FLOAT_RANGE(line, x) JUT_ASSERT(line, -1.0e32f < x && x < 1.0e32f);
|
||||
|
||||
/* 80430CB4-80430CC0 05D9D4 000C+00 1/1 2/2 0/0 .bss m_virtual_center__14cCcD_ShapeAttr
|
||||
*/
|
||||
@@ -18,7 +22,7 @@ void cCcD_DivideInfo::Set(u32 xDivInfo, u32 yDivInfo, u32 zDivInfo) {
|
||||
|
||||
/* 80263368-802633A8 25DCA8 0040+00 0/0 5/5 0/0 .text Chk__15cCcD_DivideInfoCFRC15cCcD_DivideInfo
|
||||
*/
|
||||
bool cCcD_DivideInfo::Chk(cCcD_DivideInfo const& other) const {
|
||||
bool cCcD_DivideInfo::Chk(const cCcD_DivideInfo& other) const {
|
||||
if ((mXDivInfo & other.mXDivInfo) == 0 || (mZDivInfo & other.mZDivInfo) == 0 ||
|
||||
(mYDivInfo & other.mYDivInfo) == 0)
|
||||
{
|
||||
@@ -29,31 +33,30 @@ bool cCcD_DivideInfo::Chk(cCcD_DivideInfo const& other) const {
|
||||
}
|
||||
|
||||
/* 802633A8-802634D4 25DCE8 012C+00 0/0 2/2 0/0 .text SetArea__15cCcD_DivideAreaFRC8cM3dGAab */
|
||||
void cCcD_DivideArea::SetArea(cM3dGAab const& aab) {
|
||||
Set(&aab.mMin, &aab.mMax);
|
||||
void cCcD_DivideArea::SetArea(const cM3dGAab& aab) {
|
||||
Set(aab.GetMinP(), aab.GetMaxP());
|
||||
|
||||
mScaledXDiff = 1.0f / 32.0f * (mMax.x - mMin.x);
|
||||
mScaledXDiff = 1.0f / 32.0f * (GetMaxP()->x - GetMinP()->x);
|
||||
mXDiffIsZero = cM3d_IsZero(mScaledXDiff);
|
||||
if (!mXDiffIsZero) {
|
||||
mInvScaledXDiff = 1.0f / mScaledXDiff;
|
||||
}
|
||||
|
||||
mScaledYDiff = 1.0f / 32.0f * (mMax.y - mMin.y);
|
||||
mScaledYDiff = 1.0f / 32.0f * (GetMaxP()->y - GetMinP()->y);
|
||||
mYDiffIsZero = cM3d_IsZero(mScaledYDiff);
|
||||
if (!mYDiffIsZero) {
|
||||
mInvScaledYDiff = 1.0f / mScaledYDiff;
|
||||
}
|
||||
|
||||
mScaledZDiff = 1.0f / 32.0f * (mMax.z - mMin.z);
|
||||
mScaledZDiff = 1.0f / 32.0f * (GetMaxP()->z - GetMinP()->z);
|
||||
mZDiffIsZero = cM3d_IsZero(mScaledZDiff);
|
||||
if (!mZDiffIsZero) {
|
||||
mInvScaledZDiff = 1.0f / mScaledZDiff;
|
||||
}
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 8039A7E8-8039A868 026E48 0080+00 2/2 0/0 0/0 .rodata l_base */
|
||||
static u32 const l_base[32] = {
|
||||
static const u32 l_base[32] = {
|
||||
0x00000001, 0x00000003, 0x00000007, 0x0000000F, 0x0000001F, 0x0000003F, 0x0000007F, 0x000000FF,
|
||||
0x000001FF, 0x000003FF, 0x000007FF, 0x00000FFF, 0x00001FFF, 0x00003FFF, 0x00007FFF, 0x0000FFFF,
|
||||
0x0001FFFF, 0x0003FFFF, 0x0007FFFF, 0x000FFFFF, 0x001FFFFF, 0x003FFFFF, 0x007FFFFF, 0x00FFFFFF,
|
||||
@@ -62,15 +65,15 @@ static u32 const l_base[32] = {
|
||||
|
||||
/* 802634D4-802636A0 25DE14 01CC+00 0/0 2/2 0/0 .text
|
||||
* CalcDivideInfo__15cCcD_DivideAreaFP15cCcD_DivideInfoRC8cM3dGAabUl */
|
||||
void cCcD_DivideArea::CalcDivideInfo(cCcD_DivideInfo* pDivideInfo, cM3dGAab const& aab,
|
||||
void cCcD_DivideArea::CalcDivideInfo(cCcD_DivideInfo* pDivideInfo, const cM3dGAab& aab,
|
||||
u32 param_2) {
|
||||
if (param_2 != 0) {
|
||||
pDivideInfo->Set(0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF);
|
||||
} else {
|
||||
u32 xDivInfo, yDivInfo, zDivInfo;
|
||||
if (!mXDiffIsZero) {
|
||||
s32 var1 = mInvScaledXDiff * (aab.mMin.x - mMin.x);
|
||||
s32 var3 = mInvScaledXDiff * (aab.mMax.x - mMin.x);
|
||||
s32 var1 = mInvScaledXDiff * (aab.GetMinP()->x - GetMinP()->x);
|
||||
s32 var3 = mInvScaledXDiff * (aab.GetMaxP()->x - GetMinP()->x);
|
||||
if (31 < var3) {
|
||||
var3 = 31;
|
||||
}
|
||||
@@ -85,8 +88,8 @@ void cCcD_DivideArea::CalcDivideInfo(cCcD_DivideInfo* pDivideInfo, cM3dGAab cons
|
||||
}
|
||||
|
||||
if (!mYDiffIsZero) {
|
||||
s32 var1 = mInvScaledYDiff * (aab.mMin.y - mMin.y);
|
||||
s32 var3 = mInvScaledYDiff * (aab.mMax.y - mMin.y);
|
||||
s32 var1 = mInvScaledYDiff * (aab.GetMinP()->y - GetMinP()->y);
|
||||
s32 var3 = mInvScaledYDiff * (aab.GetMaxP()->y - GetMinP()->y);
|
||||
if (31 < var3) {
|
||||
var3 = 31;
|
||||
}
|
||||
@@ -101,8 +104,8 @@ void cCcD_DivideArea::CalcDivideInfo(cCcD_DivideInfo* pDivideInfo, cM3dGAab cons
|
||||
}
|
||||
|
||||
if (!mZDiffIsZero) {
|
||||
s32 var1 = mInvScaledZDiff * (aab.mMin.z - mMin.z);
|
||||
s32 var3 = mInvScaledZDiff * (aab.mMax.z - mMin.z);
|
||||
s32 var1 = mInvScaledZDiff * (aab.GetMinP()->z - GetMinP()->z);
|
||||
s32 var3 = mInvScaledZDiff * (aab.GetMaxP()->z - GetMinP()->z);
|
||||
if (31 < var3) {
|
||||
var3 = 31;
|
||||
}
|
||||
@@ -122,11 +125,11 @@ void cCcD_DivideArea::CalcDivideInfo(cCcD_DivideInfo* pDivideInfo, cM3dGAab cons
|
||||
|
||||
/* 802636A0-80263894 25DFE0 01F4+00 0/0 3/3 0/0 .text
|
||||
* CalcDivideInfoOverArea__15cCcD_DivideAreaFP15cCcD_DivideInfoRC8cM3dGAab */
|
||||
void cCcD_DivideArea::CalcDivideInfoOverArea(cCcD_DivideInfo* pDivideInfo, cM3dGAab const& aab) {
|
||||
void cCcD_DivideArea::CalcDivideInfoOverArea(cCcD_DivideInfo* pDivideInfo, const cM3dGAab& aab) {
|
||||
u32 xDivInfo, yDivInfo, zDivInfo;
|
||||
if (!mXDiffIsZero) {
|
||||
s32 var1 = mInvScaledXDiff * (aab.mMin.x - mMin.x);
|
||||
s32 var3 = mInvScaledXDiff * (aab.mMax.x - mMin.x);
|
||||
s32 var1 = mInvScaledXDiff * (aab.GetMinP()->x - GetMinP()->x);
|
||||
s32 var3 = mInvScaledXDiff * (aab.GetMaxP()->x - GetMinP()->x);
|
||||
if (var3 < 0 || 31 < var1) {
|
||||
xDivInfo = 0;
|
||||
} else {
|
||||
@@ -144,8 +147,8 @@ void cCcD_DivideArea::CalcDivideInfoOverArea(cCcD_DivideInfo* pDivideInfo, cM3dG
|
||||
}
|
||||
|
||||
if (!mYDiffIsZero) {
|
||||
s32 var1 = mInvScaledYDiff * (aab.mMin.y - mMin.y);
|
||||
s32 var3 = mInvScaledYDiff * (aab.mMax.y - mMin.y);
|
||||
s32 var1 = mInvScaledYDiff * (aab.GetMinP()->y - GetMinP()->y);
|
||||
s32 var3 = mInvScaledYDiff * (aab.GetMaxP()->y - GetMinP()->y);
|
||||
if (var3 < 0 || 31 < var1) {
|
||||
yDivInfo = 0;
|
||||
} else {
|
||||
@@ -163,8 +166,8 @@ void cCcD_DivideArea::CalcDivideInfoOverArea(cCcD_DivideInfo* pDivideInfo, cM3dG
|
||||
}
|
||||
|
||||
if (!mZDiffIsZero) {
|
||||
s32 var1 = mInvScaledZDiff * (aab.mMin.z - mMin.z);
|
||||
s32 var3 = mInvScaledZDiff * (aab.mMax.z - mMin.z);
|
||||
s32 var1 = mInvScaledZDiff * (aab.GetMinP()->z - GetMinP()->z);
|
||||
s32 var3 = mInvScaledZDiff * (aab.GetMaxP()->z - GetMinP()->z);
|
||||
if (var3 < 0 || 31 < var1) {
|
||||
zDivInfo = 0;
|
||||
} else {
|
||||
@@ -195,51 +198,59 @@ cCcD_GStts* cCcD_Stts::GetGStts() {
|
||||
}
|
||||
|
||||
/* 802638A4-80263904 25E1E4 0060+00 0/0 1/1 0/0 .text Init__9cCcD_SttsFiiPvUi */
|
||||
void cCcD_Stts::Init(int weight, int param_1, void* pActor, unsigned int apid) {
|
||||
void cCcD_Stts::Init(int weight, int param_1, void* pactor, fpc_ProcID apid) {
|
||||
Ct();
|
||||
mWeight = weight;
|
||||
m_weight = weight;
|
||||
field_0x15 = param_1;
|
||||
mActor = static_cast<fopAc_ac_c*>(pActor);
|
||||
mApid = apid;
|
||||
mp_actor = static_cast<fopAc_ac_c*>(pactor);
|
||||
m_apid = apid;
|
||||
}
|
||||
|
||||
/* 80263904-80263934 25E244 0030+00 1/0 1/1 0/0 .text Ct__9cCcD_SttsFv */
|
||||
void cCcD_Stts::Ct() {
|
||||
mXyz.x = 0.0f;
|
||||
mXyz.y = 0.0f;
|
||||
mXyz.z = 0.0f;
|
||||
mActor = 0;
|
||||
mApid = 0xFFFFFFFF;
|
||||
mWeight = 0;
|
||||
m_cc_move.x = 0.0f;
|
||||
m_cc_move.y = 0.0f;
|
||||
m_cc_move.z = 0.0f;
|
||||
mp_actor = NULL;
|
||||
m_apid = fpcM_ERROR_PROCESS_ID_e;
|
||||
m_weight = 0;
|
||||
field_0x15 = 0;
|
||||
mTg = 0;
|
||||
m_dmg = 0;
|
||||
}
|
||||
|
||||
/* 80263934-8026395C 25E274 0028+00 0/0 3/3 0/0 .text PlusCcMove__9cCcD_SttsFfff */
|
||||
void cCcD_Stts::PlusCcMove(f32 x, f32 y, f32 z) {
|
||||
mXyz.x += x;
|
||||
mXyz.y += y;
|
||||
mXyz.z += z;
|
||||
m_cc_move.x += x;
|
||||
m_cc_move.y += y;
|
||||
m_cc_move.z += z;
|
||||
|
||||
CHECK_FLOAT_CLASS(422, m_cc_move.x);
|
||||
CHECK_FLOAT_CLASS(423, m_cc_move.y);
|
||||
CHECK_FLOAT_CLASS(424, m_cc_move.z);
|
||||
|
||||
CHECK_FLOAT_RANGE(426, m_cc_move.x);
|
||||
CHECK_FLOAT_RANGE(427, m_cc_move.y);
|
||||
CHECK_FLOAT_RANGE(428, m_cc_move.z);
|
||||
}
|
||||
|
||||
/* 8026395C-80263970 25E29C 0014+00 0/0 10/10 23/23 .text ClrCcMove__9cCcD_SttsFv */
|
||||
void cCcD_Stts::ClrCcMove() {
|
||||
mXyz.z = 0.0f;
|
||||
mXyz.y = 0.0f;
|
||||
mXyz.x = 0.0f;
|
||||
m_cc_move.z = 0.0f;
|
||||
m_cc_move.y = 0.0f;
|
||||
m_cc_move.x = 0.0f;
|
||||
}
|
||||
|
||||
/* 80263970-80263984 25E2B0 0014+00 0/0 2/2 0/0 .text PlusDmg__9cCcD_SttsFi */
|
||||
void cCcD_Stts::PlusDmg(int dmg) {
|
||||
if (mTg >= dmg) {
|
||||
if (m_dmg >= dmg) {
|
||||
return;
|
||||
}
|
||||
mTg = dmg;
|
||||
m_dmg = dmg;
|
||||
}
|
||||
|
||||
/* 80263984-802639B0 25E2C4 002C+00 0/0 1/1 0/0 .text GetWeightF__9cCcD_SttsCFv */
|
||||
f32 cCcD_Stts::GetWeightF() const {
|
||||
return (s32)mWeight;
|
||||
return (s32)m_weight;
|
||||
}
|
||||
|
||||
/* 802639B0-802639C4 25E2F0 0014+00 0/0 1/1 0/0 .text ct__18cCcD_ObjCommonBaseFv */
|
||||
@@ -251,7 +262,7 @@ void cCcD_ObjCommonBase::ct() {
|
||||
|
||||
/* 802639C4-80263A10 25E304 004C+00 1/1 0/0 0/0 .text Set__14cCcD_ObjHitInfFRC17cCcD_SrcObjHitInf
|
||||
*/
|
||||
void cCcD_ObjHitInf::Set(cCcD_SrcObjHitInf const& src) {
|
||||
void cCcD_ObjHitInf::Set(const cCcD_SrcObjHitInf& src) {
|
||||
mObjAt.Set(src.mObjAt);
|
||||
mObjTg.Set(src.mObjTg);
|
||||
mObjCo.Set(src.mObjCo);
|
||||
@@ -263,7 +274,7 @@ void cCcD_Obj::ct() {
|
||||
}
|
||||
|
||||
/* 80263A1C-80263A48 25E35C 002C+00 0/0 1/1 0/0 .text Set__8cCcD_ObjFRC11cCcD_SrcObj */
|
||||
void cCcD_Obj::Set(cCcD_SrcObj const& src) {
|
||||
void cCcD_Obj::Set(const cCcD_SrcObj& src) {
|
||||
mFlags = src.mFlags;
|
||||
cCcD_ObjHitInf::Set(src.mSrcObjHitInf);
|
||||
}
|
||||
@@ -279,19 +290,19 @@ fopAc_ac_c* cCcD_Obj::GetAc() {
|
||||
|
||||
/* 80263A64-80263A88 25E3A4 0024+00 3/0 2/0 0/0 .text
|
||||
* getShapeAccess__14cCcD_ShapeAttrCFPQ214cCcD_ShapeAttr5Shape */
|
||||
void cCcD_ShapeAttr::getShapeAccess(cCcD_ShapeAttr::Shape* p_shape) const {
|
||||
p_shape->_0 = 2;
|
||||
p_shape->_14 = 0.0f;
|
||||
p_shape->_10 = 0.0f;
|
||||
p_shape->_C = 0.0f;
|
||||
p_shape->_8 = 0.0f;
|
||||
p_shape->_4 = 0.0f;
|
||||
void cCcD_ShapeAttr::getShapeAccess(cCcD_ShapeAttr::Shape* pshape) const {
|
||||
pshape->_0 = 2;
|
||||
pshape->_14 = 0.0f;
|
||||
pshape->_10 = 0.0f;
|
||||
pshape->_C = 0.0f;
|
||||
pshape->_8 = 0.0f;
|
||||
pshape->_4 = 0.0f;
|
||||
}
|
||||
|
||||
/* 80263A88-80263B58 25E3C8 00D0+00 1/0 1/0 0/0 .text
|
||||
* CrossAtTg__12cCcD_TriAttrCFRC12cCcD_CpsAttrP4cXyz */
|
||||
bool cCcD_TriAttr::CrossAtTg(cCcD_CpsAttr const& cpsAttr, cXyz* p_xyz) const {
|
||||
if (cM3dGTri::Cross(cpsAttr, p_xyz)) {
|
||||
bool cCcD_TriAttr::CrossAtTg(const cCcD_CpsAttr& cpsAttr, cXyz* pxyz) const {
|
||||
if (cM3dGTri::Cross(cpsAttr, pxyz)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -300,8 +311,8 @@ bool cCcD_TriAttr::CrossAtTg(cCcD_CpsAttr const& cpsAttr, cXyz* p_xyz) const {
|
||||
|
||||
/* 80263B58-80263B90 25E498 0038+00 1/0 1/0 0/0 .text
|
||||
* CrossAtTg__12cCcD_TriAttrCFRC12cCcD_CylAttrP4cXyz */
|
||||
bool cCcD_TriAttr::CrossAtTg(cCcD_CylAttr const& cylAttr, cXyz* p_xyz) const {
|
||||
if (cM3dGTri::Cross(cylAttr, p_xyz)) {
|
||||
bool cCcD_TriAttr::CrossAtTg(const cCcD_CylAttr& cylAttr, cXyz* pxyz) const {
|
||||
if (cM3dGTri::Cross(cylAttr, pxyz)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -310,8 +321,8 @@ bool cCcD_TriAttr::CrossAtTg(cCcD_CylAttr const& cylAttr, cXyz* p_xyz) const {
|
||||
|
||||
/* 80263B90-80263BCC 25E4D0 003C+00 1/0 1/0 0/0 .text
|
||||
* CrossAtTg__12cCcD_TriAttrCFRC12cCcD_SphAttrP4cXyz */
|
||||
bool cCcD_TriAttr::CrossAtTg(cCcD_SphAttr const& sphAttr, cXyz* p_xyz) const {
|
||||
if (cM3dGTri::Cross(sphAttr, p_xyz)) {
|
||||
bool cCcD_TriAttr::CrossAtTg(const cCcD_SphAttr& sphAttr, cXyz* pxyz) const {
|
||||
if (cM3dGTri::Cross(sphAttr, pxyz)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -320,8 +331,8 @@ bool cCcD_TriAttr::CrossAtTg(cCcD_SphAttr const& sphAttr, cXyz* p_xyz) const {
|
||||
|
||||
/* 80263BCC-80263C04 25E50C 0038+00 1/0 1/0 0/0 .text
|
||||
* CrossAtTg__12cCcD_TriAttrCFRC12cCcD_TriAttrP4cXyz */
|
||||
bool cCcD_TriAttr::CrossAtTg(cCcD_TriAttr const& other, cXyz* p_xyz) const {
|
||||
if (cM3dGTri::Cross(other, p_xyz)) {
|
||||
bool cCcD_TriAttr::CrossAtTg(const cCcD_TriAttr& other, cXyz* pxyz) const {
|
||||
if (cM3dGTri::Cross(other, pxyz)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -337,7 +348,7 @@ void cCcD_TriAttr::CalcAabBox() {
|
||||
}
|
||||
|
||||
/* 80263C9C-80263D38 25E5DC 009C+00 1/0 1/0 0/0 .text GetNVec__12cCcD_TriAttrCFRC4cXyzP4cXyz */
|
||||
bool cCcD_TriAttr::GetNVec(cXyz const& param_0, cXyz* pOut) const {
|
||||
bool cCcD_TriAttr::GetNVec(const cXyz& param_0, cXyz* pOut) const {
|
||||
if (getPlaneFunc(¶m_0) >= 0.0f) {
|
||||
*pOut = mNormal;
|
||||
} else {
|
||||
@@ -349,8 +360,8 @@ bool cCcD_TriAttr::GetNVec(cXyz const& param_0, cXyz* pOut) const {
|
||||
|
||||
/* 80263D38-80263D7C 25E678 0044+00 1/0 1/0 0/0 .text
|
||||
* CrossAtTg__12cCcD_CpsAttrCFRC12cCcD_CpsAttrP4cXyz */
|
||||
bool cCcD_CpsAttr::CrossAtTg(cCcD_CpsAttr const& other, cXyz* p_xyz) const {
|
||||
if (cM3dGCps::Cross(&other, p_xyz)) {
|
||||
bool cCcD_CpsAttr::CrossAtTg(const cCcD_CpsAttr& other, cXyz* pxyz) const {
|
||||
if (cM3dGCps::Cross(&other, pxyz)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -359,8 +370,8 @@ bool cCcD_CpsAttr::CrossAtTg(cCcD_CpsAttr const& other, cXyz* p_xyz) const {
|
||||
|
||||
/* 80263D7C-80263DC0 25E6BC 0044+00 1/0 1/0 0/0 .text
|
||||
* CrossAtTg__12cCcD_CpsAttrCFRC12cCcD_CylAttrP4cXyz */
|
||||
bool cCcD_CpsAttr::CrossAtTg(cCcD_CylAttr const& cylAttr, cXyz* p_xyz) const {
|
||||
if (cM3dGCps::Cross(&cylAttr, p_xyz)) {
|
||||
bool cCcD_CpsAttr::CrossAtTg(const cCcD_CylAttr& cylAttr, cXyz* pxyz) const {
|
||||
if (cM3dGCps::Cross(&cylAttr, pxyz)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -369,8 +380,8 @@ bool cCcD_CpsAttr::CrossAtTg(cCcD_CylAttr const& cylAttr, cXyz* p_xyz) const {
|
||||
|
||||
/* 80263DC0-80263E04 25E700 0044+00 1/0 1/0 0/0 .text
|
||||
* CrossAtTg__12cCcD_CpsAttrCFRC12cCcD_SphAttrP4cXyz */
|
||||
bool cCcD_CpsAttr::CrossAtTg(cCcD_SphAttr const& sphAttr, cXyz* p_xyz) const {
|
||||
if (cM3dGCps::Cross(&sphAttr, p_xyz)) {
|
||||
bool cCcD_CpsAttr::CrossAtTg(const cCcD_SphAttr& sphAttr, cXyz* pxyz) const {
|
||||
if (cM3dGCps::Cross(&sphAttr, pxyz)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -379,8 +390,8 @@ bool cCcD_CpsAttr::CrossAtTg(cCcD_SphAttr const& sphAttr, cXyz* p_xyz) const {
|
||||
|
||||
/* 80263E04-80263ED4 25E744 00D0+00 1/0 1/0 0/0 .text
|
||||
* CrossAtTg__12cCcD_CpsAttrCFRC12cCcD_TriAttrP4cXyz */
|
||||
bool cCcD_CpsAttr::CrossAtTg(cCcD_TriAttr const& triAttr, cXyz* p_xyz) const {
|
||||
if (triAttr.cM3dGTri::Cross(*this, p_xyz)) {
|
||||
bool cCcD_CpsAttr::CrossAtTg(const cCcD_TriAttr& triAttr, cXyz* pxyz) const {
|
||||
if (triAttr.cM3dGTri::Cross(*this, pxyz)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -389,7 +400,7 @@ bool cCcD_CpsAttr::CrossAtTg(cCcD_TriAttr const& triAttr, cXyz* p_xyz) const {
|
||||
|
||||
/* 80263ED4-80263F24 25E814 0050+00 1/0 1/0 0/0 .text CrossCo__12cCcD_CpsAttrCFRC12cCcD_CpsAttrPf
|
||||
*/
|
||||
bool cCcD_CpsAttr::CrossCo(cCcD_CpsAttr const& other, f32* param_1) const {
|
||||
bool cCcD_CpsAttr::CrossCo(const cCcD_CpsAttr& other, f32* param_1) const {
|
||||
*param_1 = 0.0f;
|
||||
cXyz xyz;
|
||||
if (cM3dGCps::Cross(&other, &xyz)) {
|
||||
@@ -401,7 +412,7 @@ bool cCcD_CpsAttr::CrossCo(cCcD_CpsAttr const& other, f32* param_1) const {
|
||||
|
||||
/* 80263F24-80263F74 25E864 0050+00 1/0 1/0 0/0 .text CrossCo__12cCcD_CpsAttrCFRC12cCcD_CylAttrPf
|
||||
*/
|
||||
bool cCcD_CpsAttr::CrossCo(cCcD_CylAttr const& cylAttr, f32* param_1) const {
|
||||
bool cCcD_CpsAttr::CrossCo(const cCcD_CylAttr& cylAttr, f32* param_1) const {
|
||||
*param_1 = 0.0f;
|
||||
cXyz xyz;
|
||||
if (cM3dGCps::Cross(&cylAttr, &xyz)) {
|
||||
@@ -413,7 +424,7 @@ bool cCcD_CpsAttr::CrossCo(cCcD_CylAttr const& cylAttr, f32* param_1) const {
|
||||
|
||||
/* 80263F74-80263FC4 25E8B4 0050+00 1/0 1/0 0/0 .text CrossCo__12cCcD_CpsAttrCFRC12cCcD_SphAttrPf
|
||||
*/
|
||||
bool cCcD_CpsAttr::CrossCo(cCcD_SphAttr const& sphAttr, f32* param_1) const {
|
||||
bool cCcD_CpsAttr::CrossCo(const cCcD_SphAttr& sphAttr, f32* param_1) const {
|
||||
*param_1 = 0.0f;
|
||||
cXyz xyz;
|
||||
if (cM3dGCps::Cross(&sphAttr, &xyz)) {
|
||||
@@ -432,7 +443,7 @@ void cCcD_CpsAttr::CalcAabBox() {
|
||||
}
|
||||
|
||||
/* 80264014-8026417C 25E954 0168+00 1/0 1/0 0/0 .text GetNVec__12cCcD_CpsAttrCFRC4cXyzP4cXyz */
|
||||
bool cCcD_CpsAttr::GetNVec(cXyz const& param_0, cXyz* param_1) const {
|
||||
bool cCcD_CpsAttr::GetNVec(const cXyz& param_0, cXyz* param_1) const {
|
||||
Vec diff;
|
||||
const cXyz& endP = GetEndP();
|
||||
VECSubtract(&endP, &mStart, &diff);
|
||||
@@ -468,8 +479,8 @@ bool cCcD_CpsAttr::GetNVec(cXyz const& param_0, cXyz* param_1) const {
|
||||
|
||||
/* 8026417C-802641C8 25EABC 004C+00 1/0 1/0 0/0 .text
|
||||
* CrossAtTg__12cCcD_CylAttrCFRC12cCcD_CpsAttrP4cXyz */
|
||||
bool cCcD_CylAttr::CrossAtTg(cCcD_CpsAttr const& cpsAttr, cXyz* p_xyz) const {
|
||||
if (cM3dGCyl::Cross(&cpsAttr, p_xyz)) {
|
||||
bool cCcD_CylAttr::CrossAtTg(const cCcD_CpsAttr& cpsAttr, cXyz* pxyz) const {
|
||||
if (cM3dGCyl::Cross(&cpsAttr, pxyz)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -478,8 +489,8 @@ bool cCcD_CylAttr::CrossAtTg(cCcD_CpsAttr const& cpsAttr, cXyz* p_xyz) const {
|
||||
|
||||
/* 802641C8-8026420C 25EB08 0044+00 1/0 1/0 0/0 .text
|
||||
* CrossAtTg__12cCcD_CylAttrCFRC12cCcD_CylAttrP4cXyz */
|
||||
bool cCcD_CylAttr::CrossAtTg(cCcD_CylAttr const& other, cXyz* p_xyz) const {
|
||||
if (cross(&other, p_xyz)) {
|
||||
bool cCcD_CylAttr::CrossAtTg(const cCcD_CylAttr& other, cXyz* pxyz) const {
|
||||
if (cross(&other, pxyz)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -488,8 +499,8 @@ bool cCcD_CylAttr::CrossAtTg(cCcD_CylAttr const& other, cXyz* p_xyz) const {
|
||||
|
||||
/* 8026420C-80264250 25EB4C 0044+00 1/0 1/0 0/0 .text
|
||||
* CrossAtTg__12cCcD_CylAttrCFRC12cCcD_SphAttrP4cXyz */
|
||||
bool cCcD_CylAttr::CrossAtTg(cCcD_SphAttr const& sphAttr, cXyz* p_xyz) const {
|
||||
if (cross(&sphAttr, p_xyz)) {
|
||||
bool cCcD_CylAttr::CrossAtTg(const cCcD_SphAttr& sphAttr, cXyz* pxyz) const {
|
||||
if (cross(&sphAttr, pxyz)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -498,8 +509,8 @@ bool cCcD_CylAttr::CrossAtTg(cCcD_SphAttr const& sphAttr, cXyz* p_xyz) const {
|
||||
|
||||
/* 80264250-80264288 25EB90 0038+00 1/0 1/0 0/0 .text
|
||||
* CrossAtTg__12cCcD_CylAttrCFRC12cCcD_TriAttrP4cXyz */
|
||||
bool cCcD_CylAttr::CrossAtTg(cCcD_TriAttr const& triAttr, cXyz* p_xyz) const {
|
||||
if (cM3dGCyl::Cross(triAttr, p_xyz)) {
|
||||
bool cCcD_CylAttr::CrossAtTg(const cCcD_TriAttr& triAttr, cXyz* pxyz) const {
|
||||
if (cM3dGCyl::Cross(triAttr, pxyz)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -508,7 +519,7 @@ bool cCcD_CylAttr::CrossAtTg(cCcD_TriAttr const& triAttr, cXyz* p_xyz) const {
|
||||
|
||||
/* 80264288-802642CC 25EBC8 0044+00 1/0 1/0 0/0 .text CrossCo__12cCcD_CylAttrCFRC12cCcD_CylAttrPf
|
||||
*/
|
||||
bool cCcD_CylAttr::CrossCo(cCcD_CylAttr const& other, f32* f) const {
|
||||
bool cCcD_CylAttr::CrossCo(const cCcD_CylAttr& other, f32* f) const {
|
||||
if (cM3dGCyl::Cross(&other, f)) {
|
||||
return true;
|
||||
} else {
|
||||
@@ -518,7 +529,7 @@ bool cCcD_CylAttr::CrossCo(cCcD_CylAttr const& other, f32* f) const {
|
||||
|
||||
/* 802642CC-80264310 25EC0C 0044+00 1/0 1/0 0/0 .text CrossCo__12cCcD_CylAttrCFRC12cCcD_SphAttrPf
|
||||
*/
|
||||
bool cCcD_CylAttr::CrossCo(cCcD_SphAttr const& sphAttr, f32* f) const {
|
||||
bool cCcD_CylAttr::CrossCo(const cCcD_SphAttr& sphAttr, f32* f) const {
|
||||
if (cM3dGCyl::Cross(&sphAttr, f)) {
|
||||
return true;
|
||||
} else {
|
||||
@@ -528,7 +539,7 @@ bool cCcD_CylAttr::CrossCo(cCcD_SphAttr const& sphAttr, f32* f) const {
|
||||
|
||||
/* 80264310-80264368 25EC50 0058+00 1/0 1/0 0/0 .text CrossCo__12cCcD_CylAttrCFRC12cCcD_CpsAttrPf
|
||||
*/
|
||||
bool cCcD_CylAttr::CrossCo(cCcD_CpsAttr const& cpsAttr, f32* f) const {
|
||||
bool cCcD_CylAttr::CrossCo(const cCcD_CpsAttr& cpsAttr, f32* f) const {
|
||||
*f = 0.0f;
|
||||
cXyz xyz;
|
||||
if (cM3dGCyl::Cross(&cpsAttr, &xyz)) {
|
||||
@@ -542,26 +553,26 @@ bool cCcD_CylAttr::CrossCo(cCcD_CpsAttr const& cpsAttr, f32* f) const {
|
||||
void cCcD_CylAttr::CalcAabBox() {
|
||||
cXyz min;
|
||||
cXyz max;
|
||||
min.x = mCenter.x - mRadius;
|
||||
min.y = mCenter.y;
|
||||
min.z = mCenter.z - mRadius;
|
||||
max.x = mCenter.x + mRadius;
|
||||
max.y = mCenter.y + mHeight;
|
||||
max.z = mCenter.z + mRadius;
|
||||
min.x = GetCP()->x - GetR();
|
||||
min.y = GetCP()->y;
|
||||
min.z = GetCP()->z - GetR();
|
||||
max.x = GetCP()->x + GetR();
|
||||
max.y = GetCP()->y + GetH();
|
||||
max.z = GetCP()->z + GetR();
|
||||
mAab.Set(&min, &max);
|
||||
}
|
||||
|
||||
/* 802643D0-802644B8 25ED10 00E8+00 1/0 1/0 0/0 .text GetNVec__12cCcD_CylAttrCFRC4cXyzP4cXyz */
|
||||
bool cCcD_CylAttr::GetNVec(cXyz const& param_0, cXyz* param_1) const {
|
||||
bool cCcD_CylAttr::GetNVec(const cXyz& param_0, cXyz* param_1) const {
|
||||
Vec vec;
|
||||
if (mCenter.y > param_0.y) {
|
||||
if (GetCP()->y > param_0.y) {
|
||||
vec = mCenter;
|
||||
} else {
|
||||
if (mCenter.y + mHeight < param_0.y) {
|
||||
vec.x = mCenter.x;
|
||||
vec.y = mCenter.y;
|
||||
vec.z = mCenter.z;
|
||||
vec.y = mCenter.y + mHeight;
|
||||
if (GetCP()->y + GetH() < param_0.y) {
|
||||
vec.x = GetCP()->x;
|
||||
vec.y = GetCP()->y;
|
||||
vec.z = GetCP()->z;
|
||||
vec.y = GetCP()->y + GetH();
|
||||
} else {
|
||||
vec = mCenter;
|
||||
vec.y = param_0.y;
|
||||
@@ -581,23 +592,23 @@ bool cCcD_CylAttr::GetNVec(cXyz const& param_0, cXyz* param_1) const {
|
||||
|
||||
/* 802644B8-802644EC 25EDF8 0034+00 1/0 1/0 0/0 .text
|
||||
* getShapeAccess__12cCcD_CylAttrCFPQ214cCcD_ShapeAttr5Shape */
|
||||
void cCcD_CylAttr::getShapeAccess(cCcD_ShapeAttr::Shape* p_shape) const {
|
||||
p_shape->_0 = 1;
|
||||
p_shape->_4 = mCenter.x;
|
||||
p_shape->_8 = mCenter.y;
|
||||
p_shape->_C = mCenter.z;
|
||||
p_shape->_10 = mRadius;
|
||||
p_shape->_14 = mHeight;
|
||||
void cCcD_CylAttr::getShapeAccess(cCcD_ShapeAttr::Shape* pshape) const {
|
||||
pshape->_0 = 1;
|
||||
pshape->_4 = mCenter.x;
|
||||
pshape->_8 = mCenter.y;
|
||||
pshape->_C = mCenter.z;
|
||||
pshape->_10 = mRadius;
|
||||
pshape->_14 = mHeight;
|
||||
}
|
||||
|
||||
inline bool inlineCross(cM3dGSph const& sph, cM3dGCps const* p_cps, cXyz* p_xyz) {
|
||||
return cM3d_Cross_CpsSph(*p_cps, sph, p_xyz);
|
||||
inline bool inlineCross(const cM3dGSph& sph, const cM3dGCps* pcps, cXyz* pxyz) {
|
||||
return cM3d_Cross_CpsSph(*pcps, sph, pxyz);
|
||||
}
|
||||
|
||||
/* 802644EC-80264538 25EE2C 004C+00 1/0 1/0 0/0 .text
|
||||
* CrossAtTg__12cCcD_SphAttrCFRC12cCcD_CpsAttrP4cXyz */
|
||||
bool cCcD_SphAttr::CrossAtTg(cCcD_CpsAttr const& cpsAttr, cXyz* p_xyz) const {
|
||||
if (inlineCross(*this, &cpsAttr, p_xyz)) {
|
||||
bool cCcD_SphAttr::CrossAtTg(const cCcD_CpsAttr& cpsAttr, cXyz* pxyz) const {
|
||||
if (inlineCross(*this, &cpsAttr, pxyz)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -606,8 +617,8 @@ bool cCcD_SphAttr::CrossAtTg(cCcD_CpsAttr const& cpsAttr, cXyz* p_xyz) const {
|
||||
|
||||
/* 80264538-8026457C 25EE78 0044+00 1/0 1/0 0/0 .text
|
||||
* CrossAtTg__12cCcD_SphAttrCFRC12cCcD_CylAttrP4cXyz */
|
||||
bool cCcD_SphAttr::CrossAtTg(cCcD_CylAttr const& cylAttr, cXyz* p_xyz) const {
|
||||
if (cross(&cylAttr, p_xyz)) {
|
||||
bool cCcD_SphAttr::CrossAtTg(const cCcD_CylAttr& cylAttr, cXyz* pxyz) const {
|
||||
if (cross(&cylAttr, pxyz)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -616,8 +627,8 @@ bool cCcD_SphAttr::CrossAtTg(cCcD_CylAttr const& cylAttr, cXyz* p_xyz) const {
|
||||
|
||||
/* 8026457C-802645C0 25EEBC 0044+00 1/0 1/0 0/0 .text
|
||||
* CrossAtTg__12cCcD_SphAttrCFRC12cCcD_SphAttrP4cXyz */
|
||||
bool cCcD_SphAttr::CrossAtTg(cCcD_SphAttr const& sphAttr, cXyz* p_xyz) const {
|
||||
if (cross(&sphAttr, p_xyz)) {
|
||||
bool cCcD_SphAttr::CrossAtTg(const cCcD_SphAttr& sphAttr, cXyz* pxyz) const {
|
||||
if (cross(&sphAttr, pxyz)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -626,8 +637,8 @@ bool cCcD_SphAttr::CrossAtTg(cCcD_SphAttr const& sphAttr, cXyz* p_xyz) const {
|
||||
|
||||
/* 802645C0-802645F8 25EF00 0038+00 1/0 1/0 0/0 .text
|
||||
* CrossAtTg__12cCcD_SphAttrCFRC12cCcD_TriAttrP4cXyz */
|
||||
bool cCcD_SphAttr::CrossAtTg(cCcD_TriAttr const& triAttr, cXyz* p_xyz) const {
|
||||
if (triAttr.cM3dGTri::Cross(*this, p_xyz)) {
|
||||
bool cCcD_SphAttr::CrossAtTg(const cCcD_TriAttr& triAttr, cXyz* pxyz) const {
|
||||
if (triAttr.cM3dGTri::Cross(*this, pxyz)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -636,7 +647,7 @@ bool cCcD_SphAttr::CrossAtTg(cCcD_TriAttr const& triAttr, cXyz* p_xyz) const {
|
||||
|
||||
/* 802645F8-80264644 25EF38 004C+00 1/0 1/0 0/0 .text CrossCo__12cCcD_SphAttrCFRC12cCcD_CylAttrPf
|
||||
*/
|
||||
bool cCcD_SphAttr::CrossCo(cCcD_CylAttr const& cylAttr, f32* f) const {
|
||||
bool cCcD_SphAttr::CrossCo(const cCcD_CylAttr& cylAttr, f32* f) const {
|
||||
if (cM3dGSph::Cross(&cylAttr, f)) {
|
||||
return true;
|
||||
} else {
|
||||
@@ -646,7 +657,7 @@ bool cCcD_SphAttr::CrossCo(cCcD_CylAttr const& cylAttr, f32* f) const {
|
||||
|
||||
/* 80264644-80264688 25EF84 0044+00 1/0 1/0 0/0 .text CrossCo__12cCcD_SphAttrCFRC12cCcD_SphAttrPf
|
||||
*/
|
||||
bool cCcD_SphAttr::CrossCo(cCcD_SphAttr const& sphAttr, f32* f) const {
|
||||
bool cCcD_SphAttr::CrossCo(const cCcD_SphAttr& sphAttr, f32* f) const {
|
||||
if (cM3dGSph::Cross(&sphAttr, f)) {
|
||||
return true;
|
||||
} else {
|
||||
@@ -656,7 +667,7 @@ bool cCcD_SphAttr::CrossCo(cCcD_SphAttr const& sphAttr, f32* f) const {
|
||||
|
||||
/* 80264688-802646E0 25EFC8 0058+00 1/0 1/0 0/0 .text CrossCo__12cCcD_SphAttrCFRC12cCcD_CpsAttrPf
|
||||
*/
|
||||
bool cCcD_SphAttr::CrossCo(cCcD_CpsAttr const& cpsAttr, f32* f) const {
|
||||
bool cCcD_SphAttr::CrossCo(const cCcD_CpsAttr& cpsAttr, f32* f) const {
|
||||
*f = 0.0f;
|
||||
cXyz xyz;
|
||||
if (cM3dGSph::Cross(&cpsAttr, &xyz)) {
|
||||
@@ -671,22 +682,21 @@ void cCcD_SphAttr::CalcAabBox() {
|
||||
cXyz min;
|
||||
cXyz max;
|
||||
|
||||
min = max = mCenter;
|
||||
min = max = *GetCP();
|
||||
|
||||
// min -= mRadius; doesn't work :(
|
||||
min.x -= mRadius;
|
||||
min.y -= mRadius;
|
||||
min.z -= mRadius;
|
||||
min.x -= GetR();
|
||||
min.y -= GetR();
|
||||
min.z -= GetR();
|
||||
|
||||
max.x += mRadius;
|
||||
max.y += mRadius;
|
||||
max.z += mRadius;
|
||||
max.x += GetR();
|
||||
max.y += GetR();
|
||||
max.z += GetR();
|
||||
|
||||
mAab.Set(&min, &max);
|
||||
}
|
||||
|
||||
/* 8026476C-80264808 25F0AC 009C+00 1/0 1/0 0/0 .text GetNVec__12cCcD_SphAttrCFRC4cXyzP4cXyz */
|
||||
bool cCcD_SphAttr::GetNVec(cXyz const& param_0, cXyz* param_1) const {
|
||||
bool cCcD_SphAttr::GetNVec(const cXyz& param_0, cXyz* param_1) const {
|
||||
param_1->x = param_0.x - mCenter.x;
|
||||
param_1->y = param_0.y - mCenter.y;
|
||||
param_1->z = param_0.z - mCenter.z;
|
||||
@@ -704,13 +714,13 @@ bool cCcD_SphAttr::GetNVec(cXyz const& param_0, cXyz* param_1) const {
|
||||
|
||||
/* 80264808-8026483C 25F148 0034+00 1/0 1/0 0/0 .text
|
||||
* getShapeAccess__12cCcD_SphAttrCFPQ214cCcD_ShapeAttr5Shape */
|
||||
void cCcD_SphAttr::getShapeAccess(cCcD_ShapeAttr::Shape* p_shape) const {
|
||||
p_shape->_0 = 0;
|
||||
p_shape->_4 = mCenter.x;
|
||||
p_shape->_8 = mCenter.y;
|
||||
p_shape->_C = mCenter.z;
|
||||
p_shape->_10 = mRadius;
|
||||
p_shape->_14 = 0.0f;
|
||||
void cCcD_SphAttr::getShapeAccess(cCcD_ShapeAttr::Shape* pshape) const {
|
||||
pshape->_0 = 0;
|
||||
pshape->_4 = mCenter.x;
|
||||
pshape->_8 = mCenter.y;
|
||||
pshape->_C = mCenter.z;
|
||||
pshape->_10 = mRadius;
|
||||
pshape->_14 = 0.0f;
|
||||
}
|
||||
|
||||
/* 8026483C-8026484C 25F17C 0010+00 0/0 1/1 0/0 .text SetHit__10cCcD_ObjAtFP8cCcD_Obj */
|
||||
@@ -721,7 +731,7 @@ void cCcD_ObjAt::SetHit(cCcD_Obj* pObj) {
|
||||
|
||||
/* 8026484C-80264868 25F18C 001C+00 1/1 0/0 0/0 .text Set__10cCcD_ObjAtFRC13cCcD_SrcObjAt
|
||||
*/
|
||||
void cCcD_ObjAt::Set(cCcD_SrcObjAt const& src) {
|
||||
void cCcD_ObjAt::Set(const cCcD_SrcObjAt& src) {
|
||||
cCcD_ObjCommonBase::Set(src.mBase);
|
||||
mType = src.mType;
|
||||
mAtp = src.mAtp;
|
||||
@@ -735,7 +745,7 @@ void cCcD_ObjAt::ClrHit() {
|
||||
|
||||
/* 80264880-80264894 25F1C0 0014+00 1/1 0/0 0/0 .text Set__10cCcD_ObjTgFRC13cCcD_SrcObjTg
|
||||
*/
|
||||
void cCcD_ObjTg::Set(cCcD_SrcObjTg const& src) {
|
||||
void cCcD_ObjTg::Set(const cCcD_SrcObjTg& src) {
|
||||
cCcD_ObjCommonBase::Set(src.mBase);
|
||||
mType = src.mType;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user