mirror of
https://github.com/zeldaret/tp
synced 2026-05-23 06:54:28 -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:
@@ -6,6 +6,7 @@
|
||||
#include "SSystem/SComponent/c_m3d_g_cyl.h"
|
||||
#include "SSystem/SComponent/c_m3d_g_sph.h"
|
||||
#include "SSystem/SComponent/c_m3d_g_tri.h"
|
||||
#include "f_pc/f_pc_manager.h"
|
||||
|
||||
typedef struct _GXColor GXColor;
|
||||
class fopAc_ac_c;
|
||||
@@ -319,34 +320,34 @@ private:
|
||||
|
||||
class cCcD_Stts {
|
||||
private:
|
||||
/* 0x00 */ cXyz mXyz;
|
||||
/* 0x0C */ fopAc_ac_c* mActor;
|
||||
/* 0x10 */ int mApid;
|
||||
/* 0x14 */ u8 mWeight;
|
||||
/* 0x00 */ cXyz m_cc_move;
|
||||
/* 0x0C */ fopAc_ac_c* mp_actor;
|
||||
/* 0x10 */ fpc_ProcID m_apid;
|
||||
/* 0x14 */ u8 m_weight;
|
||||
/* 0x15 */ u8 field_0x15;
|
||||
/* 0x16 */ u8 mTg;
|
||||
/* 0x16 */ u8 m_dmg;
|
||||
|
||||
public:
|
||||
cCcD_Stts() {}
|
||||
/* 801410A4 vt[3] */ virtual ~cCcD_Stts() {}
|
||||
/* 80263894 vt[4] */ virtual const cCcD_GStts* GetGStts() const;
|
||||
/* 8026389C vt[5] */ virtual cCcD_GStts* GetGStts();
|
||||
/* 802638A4 */ void Init(int, int, void*, unsigned int);
|
||||
/* 802638A4 */ void Init(int, int, void*, fpc_ProcID);
|
||||
/* 80263904 vt[6] */ virtual void Ct();
|
||||
/* 80263934 */ void PlusCcMove(f32, f32, f32);
|
||||
/* 8026395C */ void ClrCcMove();
|
||||
/* 80263970 */ void PlusDmg(int);
|
||||
/* 80263984 */ f32 GetWeightF() const;
|
||||
/* 802649E8 vt[7] */ virtual void ClrAt() {}
|
||||
/* 802649EC vt[8] */ virtual void ClrTg() { mTg = 0; }
|
||||
/* 802649EC vt[8] */ virtual void ClrTg() { m_dmg = 0; }
|
||||
|
||||
u8 GetWeightUc() const { return mWeight; }
|
||||
void SetWeight(u8 weight) { mWeight = weight; }
|
||||
fopAc_ac_c* GetAc() { return mActor; }
|
||||
fopAc_ac_c* GetActor() const { return mActor; }
|
||||
void SetActor(void* ac) { mActor = (fopAc_ac_c*)ac; }
|
||||
cXyz* GetCCMoveP() { return &mXyz; }
|
||||
unsigned int GetApid() const { return mApid; }
|
||||
u8 GetWeightUc() const { return m_weight; }
|
||||
void SetWeight(u8 weight) { m_weight = weight; }
|
||||
fopAc_ac_c* GetAc() { return mp_actor; }
|
||||
fopAc_ac_c* GetActor() const { return mp_actor; }
|
||||
void SetActor(void* ac) { mp_actor = (fopAc_ac_c*)ac; }
|
||||
cXyz* GetCCMoveP() { return &m_cc_move; }
|
||||
fpc_ProcID GetApid() const { return m_apid; }
|
||||
}; // Size = 0x1C
|
||||
|
||||
STATIC_ASSERT(0x1C == sizeof(cCcD_Stts));
|
||||
|
||||
@@ -30,10 +30,11 @@ public:
|
||||
bool cross(const cM3dGSph*, cXyz*) const;
|
||||
bool cross(const cM3dGCyl*, cXyz*) const;
|
||||
void calcMinMax(cXyz*, cXyz*);
|
||||
const cXyz* GetCP(void) const { return &mCenter; }
|
||||
f32 GetR(void) const { return mRadius; }
|
||||
const cXyz* GetCP() const { return &mCenter; }
|
||||
cXyz* GetCP() { return &mCenter; }
|
||||
f32 GetR() const { return mRadius; }
|
||||
f32* GetRP() { return &mRadius; }
|
||||
f32 GetH(void) const { return mHeight; }
|
||||
f32 GetH() const { return mHeight; }
|
||||
cXyz& GetC() { return mCenter; }
|
||||
|
||||
bool Cross(const cM3dGCps* cps, cXyz* xyz) const { return cM3d_Cross_CpsCyl(*cps, *this, xyz); }
|
||||
|
||||
@@ -221,6 +221,8 @@ public:
|
||||
bool ChkFlush() { return field_0x91 & 8; }
|
||||
void SetLock() { mFlags |= LOCK_e; }
|
||||
bool ChkRoofRegist() { return field_0x91 & 4;}
|
||||
cBgD_Vtx_t* GetVtxTbl() const { return pm_vtx_tbl; }
|
||||
int GetVtxNum() const { return pm_bgd->m_v_num; }
|
||||
|
||||
public:
|
||||
/* 0x18 */ MtxP pm_base; // Model Matrix
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
|
||||
class dBgWSv : public dBgW {
|
||||
public:
|
||||
dBgWSv() {
|
||||
field_0xc0 = NULL;
|
||||
}
|
||||
|
||||
/* 80082F98 */ u8 Set(cBgD_t*, u32);
|
||||
/* 80083020 */ void CopyBackVtx();
|
||||
/* 8008308C */ bool CrrPosWork(cXyz*, int, int, int);
|
||||
|
||||
+12
-1
@@ -36,6 +36,17 @@ enum dCcD_hitSe {
|
||||
/* 23 */ dCcD_SE_23,
|
||||
};
|
||||
|
||||
enum dCcD_Material {
|
||||
dCcD_MTRL_NONE,
|
||||
dCcD_MTRL_FIRE,
|
||||
dCcD_MTRL_ICE,
|
||||
dCcD_MTRL_WIND,
|
||||
dCcD_MTRL_LIGHT,
|
||||
dCcD_MTRL_UNK_5,
|
||||
dCcD_MTRL_UNK_6,
|
||||
dCcD_MTRL_UNK_7,
|
||||
};
|
||||
|
||||
enum dCcG_At_Spl {
|
||||
/* 0x0 */ dCcG_At_Spl_UNK_0,
|
||||
/* 0x1 */ dCcG_At_Spl_UNK_1,
|
||||
@@ -135,7 +146,7 @@ class dCcD_Stts : public cCcD_Stts, public dCcD_GStts {
|
||||
public:
|
||||
dCcD_Stts() {}
|
||||
/* 80083850 */ virtual cCcD_GStts* GetGStts();
|
||||
/* 80083860 */ void Init(int, int, fopAc_ac_c*);
|
||||
/* 80083860 */ void Init(int weight, int, fopAc_ac_c* pactor);
|
||||
/* 800838F4 */ virtual void Ct();
|
||||
/* 80083928 */ virtual void ClrAt();
|
||||
/* 80083934 */ virtual void ClrTg();
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
/* 800872B0 */ void Move();
|
||||
/* 800872D0 */ void Draw();
|
||||
/* 8008730C */ void MassClear();
|
||||
/* 80087330 */ int ChkAtTgMtrlHit(u8, u8);
|
||||
/* 80087330 */ BOOL ChkAtTgMtrlHit(u8, u8);
|
||||
|
||||
/* 8008640C */ virtual void SetPosCorrect(cCcD_Obj*, cXyz*, cCcD_Obj*, cXyz*, f32);
|
||||
/* 80086240 */ virtual void SetCoGObjInf(bool, bool, cCcD_GObjInf*, cCcD_GObjInf*, cCcD_Stts*,
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
void SetMass(cCcD_Obj* i_obj, u8 i_priority) { mMass_Mng.Set(i_obj, i_priority); }
|
||||
void PrepareMass() { mMass_Mng.Prepare(); }
|
||||
|
||||
static u8 m_mtrl_hit_tbl[64];
|
||||
static bool m_mtrl_hit_tbl[64];
|
||||
|
||||
// /* 0x0000 */ cCcS mCCcS;
|
||||
/* 0x284C */ dCcMassS_Mng mMass_Mng;
|
||||
|
||||
@@ -98,6 +98,8 @@ inline void mDoAud_sceneBgmStart() {
|
||||
Z2AudioMgr::getInterface()->sceneBgmStart();
|
||||
}
|
||||
|
||||
inline void mDoAud_seDeleteObject(Vec*) {}
|
||||
|
||||
inline void mDoAud_load2ndDynamicWave() {
|
||||
Z2AudioMgr::getInterface()->load2ndDynamicWave();
|
||||
}
|
||||
|
||||
@@ -2,6 +2,43 @@
|
||||
#define D_A_OBJ_BRG_H
|
||||
|
||||
#include "f_op/f_op_actor_mng.h"
|
||||
#include "d/bg/d_bg_w_sv.h"
|
||||
#include "d/cc/d_cc_d.h"
|
||||
|
||||
struct br_s {
|
||||
/* 0x000 */ J3DModel* mpBridgeModel;
|
||||
/* 0x004 */ J3DModel* mpKnotModels[2];
|
||||
/* 0x00C */ JPABaseEmitter* field_0xc;
|
||||
/* 0x010 */ JPABaseEmitter* field_0x10;
|
||||
/* 0x014 */ mDoExt_3DlineMat1_c field_0x014;
|
||||
/* 0x050 */ cXyz field_0x050[3];
|
||||
/* 0x074 */ cXyz field_0x074[3];
|
||||
/* 0x098 */ cXyz field_0x098[2];
|
||||
/* 0x0B0 */ cXyz field_0x0b0;
|
||||
/* 0x0BC */ cXyz field_0x0bc;
|
||||
/* 0x0C8 */ cXyz field_0x0c8;
|
||||
/* 0x0D4 */ csXyz field_0x0d4;
|
||||
/* 0x0DC */ f32 field_0x0dc;
|
||||
/* 0x0E0 */ f32 field_0x0e0;
|
||||
/* 0x0E4 */ f32 field_0x0e4;
|
||||
/* 0x0E8 */ f32 field_0x0e8;
|
||||
/* 0x0EC */ f32 field_0x0ec;
|
||||
/* 0x0F0 */ s16 field_0x0f0;
|
||||
/* 0x0F2 */ s16 field_0x0f2;
|
||||
/* 0x0F4 */ s16 field_0x0f4;
|
||||
/* 0x0F6 */ s16 field_0x0f6;
|
||||
/* 0x0F8 */ s16 field_0x0f8;
|
||||
/* 0x0FA */ s16 field_0x0fa;
|
||||
/* 0x0FC */ s16 field_0x0fc;
|
||||
/* 0x0FE */ s16 field_0x0fe[2];
|
||||
/* 0x104 */ dCcD_Cyl mCyl[2];
|
||||
/* 0x37C */ dKy_tevstr_c mTevstr;
|
||||
/* 0x704 */ s8 field_0x704;
|
||||
/* 0x705 */ s8 field_0x705;
|
||||
/* 0x706 */ u8 field_0x706;
|
||||
/* 0x707 */ u8 field_0x707;
|
||||
/* 0x708 */ u8 field_0x708;
|
||||
};
|
||||
|
||||
/**
|
||||
* @ingroup actors-objects
|
||||
@@ -12,17 +49,51 @@
|
||||
*
|
||||
*/
|
||||
class obj_brg_class : public fopAc_ac_c {
|
||||
private:
|
||||
/* 0x568 */ u8 field_0x568[0xb1f8 - 0x568];
|
||||
public:
|
||||
/* 0x0568 */ request_of_phase_process_class mPhase;
|
||||
/* 0x0570 */ br_s mBr[24];
|
||||
/* 0xAE90 */ mDoExt_3DlineMat1_c field_0xae90;
|
||||
/* 0xAECC */ dBgWSv* mpBgW;
|
||||
/* 0xAED0 */ int field_0xaed0;
|
||||
/* 0xAED4 */ int field_0xaed4;
|
||||
/* 0xAED8 */ int field_0xaed8;
|
||||
/* 0xAEDC */ f32 field_0xaedc;
|
||||
/* 0xAEE0 */ f32 field_0xaee0;
|
||||
/* 0xAEE4 */ f32 field_0xaee4;
|
||||
/* 0xAEE8 */ f32 field_0xaee8;
|
||||
/* 0xAEEC */ f32 field_0xaeec;
|
||||
/* 0xAEF0 */ f32 field_0xaef0;
|
||||
/* 0xAEF4 */ f32 field_0xaef4;
|
||||
/* 0xAEF8 */ cXyz mEndPos;
|
||||
/* 0xAF04 */ cXyz field_0xaf04;
|
||||
/* 0xAF10 */ cXyz field_0xaf10;
|
||||
/* 0xAF1C */ s16 field_0xaf1c;
|
||||
/* 0xAF1E */ s16 field_0xaf1e;
|
||||
/* 0xAF20 */ s16 field_0xaf20;
|
||||
/* 0xAF22 */ s16 field_0xaf22;
|
||||
/* 0xAF24 */ s16 field_0xaf24;
|
||||
/* 0xAF26 */ s16 field_0xaf26;
|
||||
/* 0xAF28 */ s16 field_0xaf28;
|
||||
/* 0xAF2A */ u8 field_0xAF2A[0xAF2C - 0xAF2A];
|
||||
/* 0xAF2C */ s16 field_0xaf2c;
|
||||
/* 0xAF2E */ s16 field_0xaf2e;
|
||||
/* 0xAF30 */ f32 field_0xaf30;
|
||||
/* 0xAF34 */ dCcD_Cyl mCyl[2];
|
||||
/* 0xB1AC */ dCcD_Stts mCcStts;
|
||||
/* 0xB1E8 */ u8 mType;
|
||||
/* 0xB1E9 */ u8 field_0xb1e9;
|
||||
/* 0xB1EA */ s8 field_0xb1ea;
|
||||
/* 0xB1EB */ s8 field_0xb1eb;
|
||||
/* 0xB1EC */ s8 field_0xb1ec;
|
||||
/* 0xB1ED */ s8 field_0xb1ed;
|
||||
/* 0xB1EE */ u8 field_0xB1EE[0xB1EF - 0xB1EE];
|
||||
/* 0xB1EF */ s8 field_0xb1ef;
|
||||
/* 0xB1F0 */ s8 field_0xb1f0;
|
||||
/* 0xB1F1 */ u8 field_0xb1f1;
|
||||
/* 0xB1F2 */ u8 field_0xb1f2[0xb1f8 - 0xB1F2];
|
||||
};
|
||||
|
||||
STATIC_ASSERT(sizeof(obj_brg_class) == 0xb1f8);
|
||||
|
||||
struct br_s {
|
||||
public:
|
||||
/* 80BC1F54 */ ~br_s();
|
||||
/* 80BC2000 */ br_s();
|
||||
};
|
||||
|
||||
|
||||
#endif /* D_A_OBJ_BRG_H */
|
||||
|
||||
+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;
|
||||
}
|
||||
|
||||
+215
-140
@@ -4,6 +4,12 @@
|
||||
*/
|
||||
|
||||
#include "SSystem/SComponent/c_cc_s.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);
|
||||
|
||||
/* 80264A6C-80264A94 25F3AC 0028+00 0/0 1/1 0/0 .text __ct__4cCcSFv */
|
||||
cCcS::cCcS() {}
|
||||
@@ -50,27 +56,43 @@ WeightType cCcS::GetWt(u8 param_0) const {
|
||||
/* 80264BA8-80264C5C 25F4E8 00B4+00 0/0 7/7 454/454 .text Set__4cCcSFP8cCcD_Obj */
|
||||
void cCcS::Set(cCcD_Obj* obj) {
|
||||
if (obj->ChkAtSet()) {
|
||||
if (mObjAtCount < ARRAY_SIZE(mpObjAt)) {
|
||||
if (mObjAtCount >= ARRAY_SIZE(mpObjAt)) {
|
||||
OS_REPORT("\x1b[43;30m");
|
||||
OS_REPORT("cCcS::Set AT Overflow.Now Max is %d.\n", ARRAY_SIZE(mpObjAt));
|
||||
OS_REPORT("\x1b[m");
|
||||
} else {
|
||||
mpObjAt[mObjAtCount] = obj;
|
||||
mObjAtCount++;
|
||||
}
|
||||
}
|
||||
|
||||
if (obj->ChkTgSet()) {
|
||||
if (mObjTgCount < ARRAY_SIZE(mpObjTg)) {
|
||||
if (mObjTgCount >= ARRAY_SIZE(mpObjTg)) {
|
||||
OS_REPORT("\x1b[43;30m");
|
||||
OS_REPORT("cCcS::Set TG Overflow.Now Max is %d.\n", ARRAY_SIZE(mpObjTg));
|
||||
OS_REPORT("\x1b[m");
|
||||
} else {
|
||||
mpObjTg[mObjTgCount] = obj;
|
||||
mObjTgCount++;
|
||||
}
|
||||
}
|
||||
|
||||
if (obj->ChkCoSet()) {
|
||||
if (mObjCoCount < ARRAY_SIZE(mpObjCo)) {
|
||||
if (mObjCoCount >= ARRAY_SIZE(mpObjCo)) {
|
||||
OS_REPORT("\x1b[43;30m");
|
||||
OS_REPORT("cCcS::Set CO Overflow.Now Max is %d.\n", ARRAY_SIZE(mpObjCo));
|
||||
OS_REPORT("\x1b[m");
|
||||
} else {
|
||||
mpObjCo[mObjCoCount] = obj;
|
||||
mObjCoCount++;
|
||||
}
|
||||
}
|
||||
|
||||
if (mObjCount < ARRAY_SIZE(mpObj)) {
|
||||
if (mObjCount >= ARRAY_SIZE(mpObj)) {
|
||||
OS_REPORT("\x1b[43;30m");
|
||||
OS_REPORT("cCcS::Set SET Overflow.Now Max is %d.\n", ARRAY_SIZE(mpObj));
|
||||
OS_REPORT("\x1b[m");
|
||||
} else {
|
||||
mpObj[mObjCount] = obj;
|
||||
mObjCount++;
|
||||
}
|
||||
@@ -119,16 +141,17 @@ void cCcS::ClrAtHitInf() {
|
||||
}
|
||||
|
||||
/* 80264E2C-80264F40 25F76C 0114+00 1/1 0/0 0/0 .text ChkNoHitAtTg__4cCcSFP8cCcD_ObjP8cCcD_Obj */
|
||||
bool cCcS::ChkNoHitAtTg(cCcD_Obj* obj1, cCcD_Obj* obj2) {
|
||||
fopAc_ac_c* ac1 = obj1->GetAc();
|
||||
fopAc_ac_c* ac2 = obj2->GetAc();
|
||||
if ((ac1 != NULL && ac2 != NULL && ac1 == ac2) || (obj1->GetAtGrp() & obj2->GetTgGrp()) == 0 ||
|
||||
(obj1->GetAtType() & obj2->GetTgType()) == 0)
|
||||
bool cCcS::ChkNoHitAtTg(cCcD_Obj* pat_obj, cCcD_Obj* ptg_obj) {
|
||||
fopAc_ac_c* pat_ac = pat_obj->GetAc();
|
||||
fopAc_ac_c* ptg_ac = ptg_obj->GetAc();
|
||||
if ((pat_ac != NULL && ptg_ac != NULL && pat_ac == ptg_ac) ||
|
||||
(pat_obj->GetAtGrp() & ptg_obj->GetTgGrp()) == 0 ||
|
||||
(pat_obj->GetAtType() & ptg_obj->GetTgType()) == 0)
|
||||
{
|
||||
return 1;
|
||||
return true;
|
||||
} else {
|
||||
return ChkNoHitGAtTg(obj1->GetGObjInf(), obj2->GetGObjInf(), obj1->GetStts()->GetGStts(),
|
||||
obj2->GetStts()->GetGStts());
|
||||
return ChkNoHitGAtTg(pat_obj->GetGObjInf(), ptg_obj->GetGObjInf(),
|
||||
pat_obj->GetStts()->GetGStts(), ptg_obj->GetStts()->GetGStts());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,48 +160,52 @@ void cCcS::ChkAtTg() {
|
||||
cCcD_Obj** objTgEnd = mpObjTg + mObjTgCount;
|
||||
ClrAtHitInf();
|
||||
ClrTgHitInf();
|
||||
for (cCcD_Obj** pObjAt = mpObjAt; pObjAt < mpObjAt + mObjAtCount; ++pObjAt) {
|
||||
if (*pObjAt == NULL || !(*pObjAt)->ChkAtSet())
|
||||
for (cCcD_Obj** pat_obj = mpObjAt; pat_obj < mpObjAt + mObjAtCount; ++pat_obj) {
|
||||
if (*pat_obj == NULL || !(*pat_obj)->ChkAtSet())
|
||||
continue;
|
||||
|
||||
cCcD_ShapeAttr* atShapeAttr = (*pObjAt)->GetShapeAttr();
|
||||
for (cCcD_Obj** pObjTg = mpObjTg; pObjTg < objTgEnd; ++pObjTg) {
|
||||
if (*pObjTg == NULL || !(*pObjTg)->ChkTgSet())
|
||||
cCcD_ShapeAttr* pat_sa = (*pat_obj)->GetShapeAttr();
|
||||
JUT_ASSERT(pat_sa != 0);
|
||||
|
||||
for (cCcD_Obj** ptg_obj = mpObjTg; ptg_obj < objTgEnd; ++ptg_obj) {
|
||||
if (*ptg_obj == NULL || !(*ptg_obj)->ChkTgSet())
|
||||
continue;
|
||||
if (!(*pObjAt)->GetDivideInfo().Chk((*pObjTg)->GetDivideInfo()))
|
||||
if (!(*pat_obj)->GetDivideInfo().Chk((*ptg_obj)->GetDivideInfo()))
|
||||
continue;
|
||||
if (ChkNoHitAtTg(*pObjAt, *pObjTg))
|
||||
if (ChkNoHitAtTg(*pat_obj, *ptg_obj))
|
||||
continue;
|
||||
|
||||
cCcD_ShapeAttr* tgShapeAttr = (*pObjTg)->GetShapeAttr();
|
||||
cCcD_ShapeAttr* ptg_sa = (*ptg_obj)->GetShapeAttr();
|
||||
JUT_ASSERT(ptg_sa != 0);
|
||||
|
||||
static cXyz cross;
|
||||
bool didCross = atShapeAttr->CrossAtTg(*tgShapeAttr, &cross);
|
||||
bool anyBsRevHit = (*pObjAt)->ChkBsRevHit() || (*pObjTg)->ChkBsRevHit();
|
||||
bool didCross = pat_sa->CrossAtTg(*ptg_sa, &cross);
|
||||
bool anyBsRevHit = (*pat_obj)->ChkBsRevHit() || (*ptg_obj)->ChkBsRevHit();
|
||||
if (!anyBsRevHit && didCross) {
|
||||
SetAtTgCommonHitInf(*pObjAt, *pObjTg, &cross);
|
||||
SetAtTgCommonHitInf(*pat_obj, *ptg_obj, &cross);
|
||||
} else if (anyBsRevHit && !didCross) {
|
||||
cCcD_ShapeAttr* atShape2 = (*pObjAt)->GetShapeAttr();
|
||||
if (atShape2 == NULL) {
|
||||
cCcD_ShapeAttr* pat_sa = (*pat_obj)->GetShapeAttr();
|
||||
if (pat_sa == NULL) {
|
||||
cross.set(0.0f, 0.0f, 0.0f);
|
||||
} else {
|
||||
atShape2->GetWorkAab().CalcCenter(&cross);
|
||||
pat_sa->GetWorkAab().CalcCenter(&cross);
|
||||
}
|
||||
|
||||
SetAtTgCommonHitInf(*pObjAt, *pObjTg, &cross);
|
||||
SetAtTgCommonHitInf(*pat_obj, *ptg_obj, &cross);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 8026515C-80265230 25FA9C 00D4+00 1/1 0/0 0/0 .text ChkNoHitCo__4cCcSFP8cCcD_ObjP8cCcD_Obj */
|
||||
bool cCcS::ChkNoHitCo(cCcD_Obj* obj1, cCcD_Obj* obj2) {
|
||||
fopAc_ac_c* ac1 = obj1->GetAc();
|
||||
fopAc_ac_c* ac2 = obj2->GetAc();
|
||||
if (!(((ac1 == NULL || ac2 == NULL) || ac1 != ac2 || obj1->ChkCoSameActorHit() ||
|
||||
obj2->ChkCoSameActorHit()) &&
|
||||
(obj1->GetCoIGrp() & (obj2->GetCoVsGrp() >> 3)) &&
|
||||
((obj1->GetCoVsGrp() >> 3) & obj2->GetCoIGrp() && !ChkNoHitGCo(obj1, obj2))))
|
||||
bool cCcS::ChkNoHitCo(cCcD_Obj* pco1_obj, cCcD_Obj* pco2_obj) {
|
||||
fopAc_ac_c* ac1 = pco1_obj->GetAc();
|
||||
fopAc_ac_c* ac2 = pco2_obj->GetAc();
|
||||
if (!(((ac1 == NULL || ac2 == NULL) || ac1 != ac2 || pco1_obj->ChkCoSameActorHit() ||
|
||||
pco2_obj->ChkCoSameActorHit()) &&
|
||||
(pco1_obj->GetCoIGrp() & (pco2_obj->GetCoVsGrp() >> 3)) &&
|
||||
((pco1_obj->GetCoVsGrp() >> 3) & pco2_obj->GetCoIGrp() &&
|
||||
!ChkNoHitGCo(pco1_obj, pco2_obj))))
|
||||
{
|
||||
return true;
|
||||
} else {
|
||||
@@ -193,25 +220,29 @@ void cCcS::ChkCo() {
|
||||
return;
|
||||
|
||||
cCcD_Obj** objCoEnd = mpObjCo + mObjCoCount;
|
||||
for (cCcD_Obj** objCo1 = mpObjCo; objCo1 < objCoEnd - 1; ++objCo1) {
|
||||
if (*objCo1 == NULL || !(*objCo1)->ChkCoSet())
|
||||
for (cCcD_Obj** pco1_obj = mpObjCo; pco1_obj < objCoEnd - 1; ++pco1_obj) {
|
||||
if (*pco1_obj == NULL || !(*pco1_obj)->ChkCoSet())
|
||||
continue;
|
||||
|
||||
cCcD_ShapeAttr* co1ShapeAttr = (*objCo1)->GetShapeAttr();
|
||||
for (cCcD_Obj** objCo2 = objCo1 + 1; objCo2 < objCoEnd; ++objCo2) {
|
||||
if (*objCo2 == NULL || !(*objCo2)->ChkCoSet())
|
||||
cCcD_ShapeAttr* pco1_sa = (*pco1_obj)->GetShapeAttr();
|
||||
JUT_ASSERT(pco1_sa != 0);
|
||||
|
||||
for (cCcD_Obj** pco2_obj = pco1_obj + 1; pco2_obj < objCoEnd; ++pco2_obj) {
|
||||
if (*pco2_obj == NULL || !(*pco2_obj)->ChkCoSet())
|
||||
continue;
|
||||
if (!(*objCo1)->GetDivideInfo().Chk((*objCo2)->GetDivideInfo()))
|
||||
if (!(*pco1_obj)->GetDivideInfo().Chk((*pco2_obj)->GetDivideInfo()))
|
||||
continue;
|
||||
if (ChkNoHitCo(*objCo1, *objCo2))
|
||||
if (ChkNoHitCo(*pco1_obj, *pco2_obj))
|
||||
continue;
|
||||
|
||||
cCcD_ShapeAttr* co2ShapeAttr = (*objCo2)->GetShapeAttr();
|
||||
f32 crossLen;
|
||||
if (co1ShapeAttr->CrossCo(*co2ShapeAttr, &crossLen)) {
|
||||
cXyz& obj2CoCP = co2ShapeAttr->GetCoCP();
|
||||
cXyz& obj1CoCP = co1ShapeAttr->GetCoCP();
|
||||
SetCoCommonHitInf(*objCo1, &obj1CoCP, *objCo2, &obj2CoCP, crossLen);
|
||||
cCcD_ShapeAttr* pco2_sa = (*pco2_obj)->GetShapeAttr();
|
||||
JUT_ASSERT(pco2_sa != 0);
|
||||
|
||||
f32 cross_len;
|
||||
if (pco1_sa->CrossCo(*pco2_sa, &cross_len)) {
|
||||
cXyz& co2_center = pco2_sa->GetCoCP();
|
||||
cXyz& co1_center = pco1_sa->GetCoCP();
|
||||
SetCoCommonHitInf(*pco1_obj, &co1_center, *pco2_obj, &co2_center, cross_len);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -219,76 +250,83 @@ void cCcS::ChkCo() {
|
||||
|
||||
/* 802653A0-802653C8 25FCE0 0028+00 1/0 0/0 0/0 .text
|
||||
* CalcTgPlusDmg__4cCcSFP8cCcD_ObjP8cCcD_ObjP9cCcD_SttsP9cCcD_Stts */
|
||||
void cCcS::CalcTgPlusDmg(cCcD_Obj* obj1, cCcD_Obj* obj2, cCcD_Stts* stts1, cCcD_Stts* stts2) {
|
||||
stts2->PlusDmg(obj1->GetAtAtp());
|
||||
void cCcS::CalcTgPlusDmg(cCcD_Obj* pat_obj, cCcD_Obj* ptg_obj, cCcD_Stts* pat_stts,
|
||||
cCcD_Stts* ptg_stts) {
|
||||
ptg_stts->PlusDmg(pat_obj->GetAtAtp());
|
||||
}
|
||||
|
||||
/* 802653C8-802655E4 25FD08 021C+00 1/1 0/0 0/0 .text
|
||||
* SetAtTgCommonHitInf__4cCcSFP8cCcD_ObjP8cCcD_ObjP4cXyz */
|
||||
void cCcS::SetAtTgCommonHitInf(cCcD_Obj* obj1, cCcD_Obj* obj2, cXyz* pXyz) {
|
||||
cCcD_Stts* obj1Stts = obj1->GetStts();
|
||||
cCcD_Stts* obj2Stts = obj2->GetStts();
|
||||
if (!ChkAtTgHitAfterCross(!obj2->ChkTgNoAtHitInfSet(), !obj1->ChkAtNoTgHitInfSet(),
|
||||
obj1->GetGObjInf(), obj2->GetGObjInf(), obj1Stts, obj2Stts,
|
||||
obj1Stts->GetGStts(), obj2Stts->GetGStts()))
|
||||
void cCcS::SetAtTgCommonHitInf(cCcD_Obj* pat_obj, cCcD_Obj* ptg_obj, cXyz* pcross) {
|
||||
cCcD_Stts* pat_stts = pat_obj->GetStts();
|
||||
cCcD_Stts* ptg_stts = ptg_obj->GetStts();
|
||||
if (!ChkAtTgHitAfterCross(!ptg_obj->ChkTgNoAtHitInfSet(), !pat_obj->ChkAtNoTgHitInfSet(),
|
||||
pat_obj->GetGObjInf(), ptg_obj->GetGObjInf(), pat_stts, ptg_stts,
|
||||
pat_stts->GetGStts(), ptg_stts->GetGStts()))
|
||||
{
|
||||
if (!obj2->ChkTgNoAtHitInfSet()) {
|
||||
obj1->SetAtHit(obj2);
|
||||
if (!ptg_obj->ChkTgNoAtHitInfSet()) {
|
||||
pat_obj->SetAtHit(ptg_obj);
|
||||
}
|
||||
|
||||
bool tmp = !(obj1->ChkAtNoTgHitInfSet() ||
|
||||
(obj1->ChkAtType(AT_TYPE_SLINGSHOT) && obj2->ChkTgNoSlingHitInfSet()));
|
||||
bool tmp = !(pat_obj->ChkAtNoTgHitInfSet() ||
|
||||
(pat_obj->ChkAtType(AT_TYPE_SLINGSHOT) && ptg_obj->ChkTgNoSlingHitInfSet()));
|
||||
if (tmp) {
|
||||
obj2->SetTgHit(obj1);
|
||||
CalcTgPlusDmg(obj1, obj2, obj1Stts, obj2Stts);
|
||||
ptg_obj->SetTgHit(pat_obj);
|
||||
CalcTgPlusDmg(pat_obj, ptg_obj, pat_stts, ptg_stts);
|
||||
}
|
||||
|
||||
SetAtTgGObjInf(!obj2->ChkTgNoAtHitInfSet(), tmp, obj1, obj2, obj1->GetGObjInf(),
|
||||
obj2->GetGObjInf(), obj1Stts, obj2Stts, obj1Stts->GetGStts(),
|
||||
obj2Stts->GetGStts(), pXyz);
|
||||
SetAtTgGObjInf(!ptg_obj->ChkTgNoAtHitInfSet(), tmp, pat_obj, ptg_obj, pat_obj->GetGObjInf(),
|
||||
ptg_obj->GetGObjInf(), pat_stts, ptg_stts, pat_stts->GetGStts(),
|
||||
ptg_stts->GetGStts(), pcross);
|
||||
}
|
||||
}
|
||||
|
||||
/* 802655E4-80265750 25FF24 016C+00 1/1 0/0 0/0 .text
|
||||
* SetCoCommonHitInf__4cCcSFP8cCcD_ObjP4cXyzP8cCcD_ObjP4cXyzf */
|
||||
void cCcS::SetCoCommonHitInf(cCcD_Obj* obj1, cXyz* xyz1, cCcD_Obj* obj2, cXyz* xyz2, f32 crossLen) {
|
||||
bool obj2CoHitInfSet = !obj2->ChkCoNoCoHitInfSet();
|
||||
bool obj1CoHitInfSet = !obj1->ChkCoNoCoHitInfSet();
|
||||
if (obj2CoHitInfSet) {
|
||||
obj1->SetCoHit(obj2);
|
||||
void cCcS::SetCoCommonHitInf(cCcD_Obj* pco1_obj, cXyz* ppos1, cCcD_Obj* pco2_obj, cXyz* ppos2,
|
||||
f32 cross_len) {
|
||||
bool co2_inf_set = !pco2_obj->ChkCoNoCoHitInfSet();
|
||||
bool co1_inf_set = !pco1_obj->ChkCoNoCoHitInfSet();
|
||||
if (co2_inf_set) {
|
||||
pco1_obj->SetCoHit(pco2_obj);
|
||||
}
|
||||
|
||||
if (obj1CoHitInfSet) {
|
||||
obj2->SetCoHit(obj1);
|
||||
if (co1_inf_set) {
|
||||
pco2_obj->SetCoHit(pco1_obj);
|
||||
}
|
||||
|
||||
if (obj2CoHitInfSet && obj1CoHitInfSet) {
|
||||
SetPosCorrect(obj1, xyz1, obj2, xyz2, crossLen);
|
||||
if (co2_inf_set && co1_inf_set) {
|
||||
SetPosCorrect(pco1_obj, ppos1, pco2_obj, ppos2, cross_len);
|
||||
}
|
||||
|
||||
cCcD_Stts* obj1Stts = obj1->GetStts();
|
||||
cCcD_Stts* obj2Stts = obj2->GetStts();
|
||||
SetCoGObjInf(obj2CoHitInfSet, obj1CoHitInfSet, obj1->GetGObjInf(), obj2->GetGObjInf(), obj1Stts,
|
||||
obj2Stts, obj1Stts->GetGStts(), obj2Stts->GetGStts());
|
||||
cCcD_Stts* pco1_stts = pco1_obj->GetStts();
|
||||
cCcD_Stts* pco2_stts = pco2_obj->GetStts();
|
||||
SetCoGObjInf(co2_inf_set, co1_inf_set, pco1_obj->GetGObjInf(), pco2_obj->GetGObjInf(),
|
||||
pco1_stts, pco2_stts, pco1_stts->GetGStts(), pco2_stts->GetGStts());
|
||||
}
|
||||
|
||||
/* 80265750-80265BB4 260090 0464+00 1/0 0/0 0/0 .text
|
||||
* SetPosCorrect__4cCcSFP8cCcD_ObjP4cXyzP8cCcD_ObjP4cXyzf */
|
||||
void cCcS::SetPosCorrect(cCcD_Obj* obj1, cXyz* xyz1, cCcD_Obj* obj2, cXyz* xyz2, f32 crossLen) {
|
||||
if (obj1->ChkCoNoCrr() || obj2->ChkCoNoCrr())
|
||||
void cCcS::SetPosCorrect(cCcD_Obj* pco1_obj, cXyz* ppos1, cCcD_Obj* pco2_obj, cXyz* ppos2,
|
||||
f32 cross_len) {
|
||||
CHECK_FLOAT_CLASS(616, cross_len);
|
||||
CHECK_FLOAT_RANGE(617, cross_len);
|
||||
|
||||
if (pco1_obj->ChkCoNoCrr() || pco2_obj->ChkCoNoCrr())
|
||||
return;
|
||||
if (obj1->GetStts() == NULL || obj2->GetStts() == NULL)
|
||||
if (pco1_obj->GetStts() == NULL || pco2_obj->GetStts() == NULL)
|
||||
return;
|
||||
if (obj1->GetStts()->GetAc() != NULL && obj1->GetStts()->GetAc() == obj2->GetStts()->GetAc())
|
||||
if (pco1_obj->GetStts()->GetAc() != NULL &&
|
||||
pco1_obj->GetStts()->GetAc() == pco2_obj->GetStts()->GetAc())
|
||||
return;
|
||||
|
||||
if (!(fabsf(crossLen) < (1.0f / 125.0f))) {
|
||||
SetCoGCorrectProc(obj1, obj2);
|
||||
bool bothCoSph3DCrr = obj1->ChkCoSph3DCrr() && obj2->ChkCoSph3DCrr();
|
||||
WeightType obj1WeightType = GetWt(obj1->GetStts()->GetWeightUc());
|
||||
WeightType obj2WeightType = GetWt(obj2->GetStts()->GetWeightUc());
|
||||
f32 obj1SrcWeight = obj1->GetStts()->GetWeightF();
|
||||
f32 obj2SrcWeight = obj2->GetStts()->GetWeightF();
|
||||
if (!(fabsf(cross_len) < (1.0f / 125.0f))) {
|
||||
SetCoGCorrectProc(pco1_obj, pco2_obj);
|
||||
bool bothCoSph3DCrr = pco1_obj->ChkCoSph3DCrr() && pco2_obj->ChkCoSph3DCrr();
|
||||
WeightType obj1WeightType = GetWt(pco1_obj->GetStts()->GetWeightUc());
|
||||
WeightType obj2WeightType = GetWt(pco2_obj->GetStts()->GetWeightUc());
|
||||
f32 obj1SrcWeight = pco1_obj->GetStts()->GetWeightF();
|
||||
f32 obj2SrcWeight = pco2_obj->GetStts()->GetWeightF();
|
||||
f32 combinedWeight = obj1SrcWeight + obj2SrcWeight;
|
||||
|
||||
f32 obj2Weight, obj1Weight;
|
||||
@@ -328,54 +366,86 @@ void cCcS::SetPosCorrect(cCcD_Obj* obj1, cXyz* xyz1, cCcD_Obj* obj2, cXyz* xyz2,
|
||||
}
|
||||
|
||||
f32 objDistLen;
|
||||
Vec obj1Move;
|
||||
Vec obj2Move;
|
||||
Vec vec1;
|
||||
Vec vec2;
|
||||
Vec objsDist;
|
||||
if (bothCoSph3DCrr) {
|
||||
VECSubtract(xyz2, xyz1, &objsDist);
|
||||
VECSubtract(ppos2, ppos1, &objsDist);
|
||||
objDistLen = VECMag(&objsDist);
|
||||
} else {
|
||||
objsDist.x = xyz2->x - xyz1->x;
|
||||
objsDist.x = ppos2->x - ppos1->x;
|
||||
objsDist.y = 0;
|
||||
objsDist.z = xyz2->z - xyz1->z;
|
||||
objsDist.z = ppos2->z - ppos1->z;
|
||||
objDistLen = sqrtf(objsDist.x * objsDist.x + objsDist.z * objsDist.z);
|
||||
}
|
||||
|
||||
if (!cM3d_IsZero(objDistLen)) {
|
||||
if (bothCoSph3DCrr) {
|
||||
VECScale(&objsDist, &objsDist, crossLen / objDistLen);
|
||||
VECScale(&objsDist, &objsDist, cross_len / objDistLen);
|
||||
obj2Weight *= -1;
|
||||
VECScale(&objsDist, &obj1Move, obj2Weight);
|
||||
VECScale(&objsDist, &obj2Move, obj1Weight);
|
||||
VECScale(&objsDist, &vec1, obj2Weight);
|
||||
VECScale(&objsDist, &vec2, obj1Weight);
|
||||
} else {
|
||||
f32 pushFactor = crossLen / objDistLen;
|
||||
f32 pushFactor = cross_len / objDistLen;
|
||||
objsDist.x *= pushFactor;
|
||||
objsDist.z *= pushFactor;
|
||||
obj1Move.x = -objsDist.x * obj2Weight;
|
||||
obj1Move.y = 0;
|
||||
obj1Move.z = -objsDist.z * obj2Weight;
|
||||
obj2Move.x = objsDist.x * obj1Weight;
|
||||
obj2Move.y = 0;
|
||||
obj2Move.z = objsDist.z * obj1Weight;
|
||||
vec1.x = -objsDist.x * obj2Weight;
|
||||
vec1.y = 0;
|
||||
vec1.z = -objsDist.z * obj2Weight;
|
||||
vec2.x = objsDist.x * obj1Weight;
|
||||
vec2.y = 0;
|
||||
vec2.z = objsDist.z * obj1Weight;
|
||||
}
|
||||
} else {
|
||||
obj1Move.y = 0;
|
||||
obj1Move.z = 0;
|
||||
obj2Move.y = 0;
|
||||
obj2Move.z = 0;
|
||||
if (!cM3d_IsZero(crossLen)) {
|
||||
obj1Move.x = -crossLen * obj2Weight;
|
||||
obj2Move.x = crossLen * obj1Weight;
|
||||
vec1.y = 0;
|
||||
vec1.z = 0;
|
||||
vec2.y = 0;
|
||||
vec2.z = 0;
|
||||
if (!cM3d_IsZero(cross_len)) {
|
||||
vec1.x = -cross_len * obj2Weight;
|
||||
vec2.x = cross_len * obj1Weight;
|
||||
} else {
|
||||
obj1Move.x = -obj2Weight;
|
||||
obj2Move.x = obj1Weight;
|
||||
vec1.x = -obj2Weight;
|
||||
vec2.x = obj1Weight;
|
||||
}
|
||||
}
|
||||
|
||||
obj1->GetStts()->PlusCcMove(obj1Move.x, obj1Move.y, obj1Move.z);
|
||||
obj2->GetStts()->PlusCcMove(obj2Move.x, obj2Move.y, obj2Move.z);
|
||||
VECAdd(xyz1, &obj1Move, xyz1);
|
||||
VECAdd(xyz2, &obj2Move, xyz2);
|
||||
CHECK_FLOAT_CLASS(767, vec1.x);
|
||||
CHECK_FLOAT_CLASS(768, vec1.y);
|
||||
CHECK_FLOAT_CLASS(769, vec1.z);
|
||||
|
||||
CHECK_FLOAT_CLASS(771, vec2.x);
|
||||
CHECK_FLOAT_CLASS(772, vec2.y);
|
||||
CHECK_FLOAT_CLASS(773, vec2.z);
|
||||
|
||||
CHECK_FLOAT_RANGE(775, vec1.x);
|
||||
CHECK_FLOAT_RANGE(776, vec1.y);
|
||||
CHECK_FLOAT_RANGE(777, vec1.z);
|
||||
|
||||
CHECK_FLOAT_RANGE(779, vec2.x);
|
||||
CHECK_FLOAT_RANGE(780, vec2.y);
|
||||
CHECK_FLOAT_RANGE(781, vec2.z);
|
||||
|
||||
pco1_obj->GetStts()->PlusCcMove(vec1.x, vec1.y, vec1.z);
|
||||
pco2_obj->GetStts()->PlusCcMove(vec2.x, vec2.y, vec2.z);
|
||||
(*ppos1) += vec1;
|
||||
(*ppos2) += vec2;
|
||||
|
||||
CHECK_FLOAT_CLASS(790, ppos1->x);
|
||||
CHECK_FLOAT_CLASS(791, ppos1->y);
|
||||
CHECK_FLOAT_CLASS(792, ppos1->z);
|
||||
|
||||
CHECK_FLOAT_CLASS(794, ppos2->x);
|
||||
CHECK_FLOAT_CLASS(795, ppos2->y);
|
||||
CHECK_FLOAT_CLASS(796, ppos2->z);
|
||||
|
||||
CHECK_FLOAT_RANGE(798, ppos1->x);
|
||||
CHECK_FLOAT_RANGE(799, ppos1->y);
|
||||
CHECK_FLOAT_RANGE(800, ppos1->z);
|
||||
|
||||
CHECK_FLOAT_RANGE(802, ppos2->x);
|
||||
CHECK_FLOAT_RANGE(803, ppos2->y);
|
||||
CHECK_FLOAT_RANGE(804, ppos2->z);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -383,20 +453,25 @@ void cCcS::SetPosCorrect(cCcD_Obj* obj1, cXyz* xyz1, cCcD_Obj* obj2, cXyz* xyz2,
|
||||
void cCcS::CalcArea() {
|
||||
cM3dGAab aab;
|
||||
aab.ClearForMinMax();
|
||||
for (cCcD_Obj** pObj = mpObj; pObj < mpObj + mObjCount; ++pObj) {
|
||||
if (*pObj != NULL) {
|
||||
cCcD_ShapeAttr* objShape = (*pObj)->GetShapeAttr();
|
||||
objShape->CalcAabBox();
|
||||
aab.SetMinMax(objShape->GetWorkAab());
|
||||
for (cCcD_Obj** pset_obj = mpObj; pset_obj < mpObj + mObjCount; ++pset_obj) {
|
||||
if (*pset_obj != NULL) {
|
||||
cCcD_ShapeAttr* pset_sa = (*pset_obj)->GetShapeAttr();
|
||||
JUT_ASSERT(pset_sa != 0);
|
||||
|
||||
pset_sa->CalcAabBox();
|
||||
aab.SetMinMax(pset_sa->GetWorkAab());
|
||||
}
|
||||
}
|
||||
|
||||
mDivideArea.SetArea(aab);
|
||||
for (cCcD_Obj** pObj = mpObj; pObj < mpObj + mObjCount; ++pObj) {
|
||||
if (*pObj != NULL) {
|
||||
const cCcD_ShapeAttr* objShape = (*pObj)->GetShapeAttr();
|
||||
cCcD_DivideInfo* divideInfo = &(*pObj)->GetDivideInfo();
|
||||
mDivideArea.CalcDivideInfo(divideInfo, objShape->GetWorkAab(), (*pObj)->ChkBsRevHit());
|
||||
for (cCcD_Obj** pset_obj = mpObj; pset_obj < mpObj + mObjCount; ++pset_obj) {
|
||||
if (*pset_obj != NULL) {
|
||||
const cCcD_ShapeAttr* pset_sa = (*pset_obj)->GetShapeAttr();
|
||||
JUT_ASSERT(pset_sa != 0);
|
||||
|
||||
cCcD_DivideInfo* divideInfo = &(*pset_obj)->GetDivideInfo();
|
||||
mDivideArea.CalcDivideInfo(divideInfo, pset_sa->GetWorkAab(),
|
||||
(*pset_obj)->ChkBsRevHit());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -439,41 +514,41 @@ void cCcS::DrawClear() {
|
||||
|
||||
/* 80265DF4-80265DF8 260734 0004+00 1/0 1/0 0/0 .text
|
||||
* SetCoGCorrectProc__4cCcSFP8cCcD_ObjP8cCcD_Obj */
|
||||
void cCcS::SetCoGCorrectProc(cCcD_Obj* param_0, cCcD_Obj* param_1) {}
|
||||
void cCcS::SetCoGCorrectProc(cCcD_Obj* pco1_obj, cCcD_Obj* pco2_obj) {}
|
||||
|
||||
/* 80265DF8-80265DFC 260738 0004+00 1/0 0/0 0/0 .text
|
||||
* SetCoGObjInf__4cCcSFbbP12cCcD_GObjInfP12cCcD_GObjInfP9cCcD_SttsP9cCcD_SttsP10cCcD_GSttsP10cCcD_GStts
|
||||
*/
|
||||
void cCcS::SetCoGObjInf(bool param_0, bool param_1, cCcD_GObjInf* param_2, cCcD_GObjInf* param_3,
|
||||
cCcD_Stts* param_4, cCcD_Stts* param_5, cCcD_GStts* param_6,
|
||||
cCcD_GStts* param_7) {}
|
||||
void cCcS::SetCoGObjInf(bool co2_set, bool co1_set, cCcD_GObjInf* pco1_gobj,
|
||||
cCcD_GObjInf* pco2_gobj, cCcD_Stts* pco1_stts, cCcD_Stts* pco2_stts,
|
||||
cCcD_GStts* pco1_gstts, cCcD_GStts* pco2_gstts) {}
|
||||
|
||||
/* 80265DFC-80265E00 26073C 0004+00 1/0 0/0 0/0 .text
|
||||
* SetAtTgGObjInf__4cCcSFbbP8cCcD_ObjP8cCcD_ObjP12cCcD_GObjInfP12cCcD_GObjInfP9cCcD_SttsP9cCcD_SttsP10cCcD_GSttsP10cCcD_GSttsP4cXyz
|
||||
*/
|
||||
void cCcS::SetAtTgGObjInf(bool param_0, bool param_1, cCcD_Obj* param_2, cCcD_Obj* param_3,
|
||||
cCcD_GObjInf* param_4, cCcD_GObjInf* param_5, cCcD_Stts* param_6,
|
||||
cCcD_Stts* param_7, cCcD_GStts* param_8, cCcD_GStts* param_9,
|
||||
cXyz* param_10) {}
|
||||
void cCcS::SetAtTgGObjInf(bool param_0, bool param_1, cCcD_Obj* pat_obj, cCcD_Obj* ptg_obj,
|
||||
cCcD_GObjInf* pat_gobj, cCcD_GObjInf* ptg_gobj, cCcD_Stts* pat_stts,
|
||||
cCcD_Stts* ptg_stts, cCcD_GStts* pat_gstts, cCcD_GStts* ptg_gstts,
|
||||
cXyz* pcross) {}
|
||||
|
||||
/* 80265E00-80265E08 260740 0008+00 1/0 0/0 0/0 .text
|
||||
* ChkNoHitGAtTg__4cCcSFPC12cCcD_GObjInfPC12cCcD_GObjInfP10cCcD_GSttsP10cCcD_GStts */
|
||||
bool cCcS::ChkNoHitGAtTg(cCcD_GObjInf const* param_0, cCcD_GObjInf const* param_1,
|
||||
cCcD_GStts* param_2, cCcD_GStts* param_3) {
|
||||
bool cCcS::ChkNoHitGAtTg(const cCcD_GObjInf* pat_gobj, const cCcD_GObjInf* ptg_gobj,
|
||||
cCcD_GStts* pat_gstts, cCcD_GStts* ptg_gstts) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* 80265E08-80265E10 260748 0008+00 1/0 0/0 0/0 .text
|
||||
* ChkAtTgHitAfterCross__4cCcSFbbPC12cCcD_GObjInfPC12cCcD_GObjInfP9cCcD_SttsP9cCcD_SttsP10cCcD_GSttsP10cCcD_GStts
|
||||
*/
|
||||
bool cCcS::ChkAtTgHitAfterCross(bool param_0, bool param_1, cCcD_GObjInf const* param_2,
|
||||
cCcD_GObjInf const* param_3, cCcD_Stts* param_4, cCcD_Stts* param_5,
|
||||
cCcD_GStts* param_6, cCcD_GStts* param_7) {
|
||||
bool cCcS::ChkAtTgHitAfterCross(bool param_0, bool param_1, const cCcD_GObjInf* pat_gobj,
|
||||
const cCcD_GObjInf* ptg_gobj, cCcD_Stts* pat_stts, cCcD_Stts* ptg_stts,
|
||||
cCcD_GStts* pat_gstts, cCcD_GStts* ptg_gstts) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* 80265E10-80265E18 260750 0008+00 1/0 0/0 0/0 .text ChkNoHitGCo__4cCcSFP8cCcD_ObjP8cCcD_Obj */
|
||||
bool cCcS::ChkNoHitGCo(cCcD_Obj* param_0, cCcD_Obj* param_1) {
|
||||
bool cCcS::ChkNoHitGCo(cCcD_Obj* pco1_obj, cCcD_Obj* pco2_obj) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -768,7 +768,7 @@ void daArrow_c::arrowShooting() {
|
||||
}
|
||||
|
||||
if (mArrowType == 2) {
|
||||
field_0x688.SetAtMtrl(04);
|
||||
field_0x688.SetAtMtrl(dCcD_MTRL_LIGHT);
|
||||
field_0x688.OnAtNoHitMark();
|
||||
} else {
|
||||
if (mArrowType == 4) {
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct request_of_phase_process_class {};
|
||||
|
||||
struct mDoLib_clipper {
|
||||
static u8 mClipper[92];
|
||||
static f32 mSystemFar;
|
||||
@@ -303,7 +301,6 @@ extern "C" void _restgpr_27();
|
||||
extern "C" void _restgpr_28();
|
||||
extern "C" void _restgpr_29();
|
||||
extern "C" extern void* g_fopAc_Method[8];
|
||||
extern "C" extern void* g_fpcLf_Method[5 + 1 /* padding */];
|
||||
extern "C" extern void* __vt__8dCcD_Sph[36];
|
||||
extern "C" extern void* __vt__8dCcD_Cyl[36];
|
||||
extern "C" extern void* __vt__9dCcD_Stts[11];
|
||||
|
||||
@@ -330,7 +330,7 @@ void daNbomb_c::tgHitCallback(dCcD_GObjInf* i_hitObj) {
|
||||
procCarryInit();
|
||||
onStateFlg0(FLG0_SET_HOOKSHOT_OFFSET);
|
||||
} else if (i_hitObj->ChkAtType(0x200)) {
|
||||
if (i_hitObj->GetAtMtrl() == 3 && !checkStateCarry() && !checkStateExplode() &&
|
||||
if (i_hitObj->GetAtMtrl() == dCcD_MTRL_WIND && !checkStateCarry() && !checkStateExplode() &&
|
||||
fopAcM_GetParam(this) != PRM_FLOWER_BOMB)
|
||||
{
|
||||
cLib_addCalcPos(&field_0xc20, *i_hitObj->GetAtVecP() * 2.0f, 0.5f, 10.0f, 1.0f);
|
||||
@@ -340,7 +340,7 @@ void daNbomb_c::tgHitCallback(dCcD_GObjInf* i_hitObj) {
|
||||
onStateFlg0(FLG0_BOMB_HIT);
|
||||
}
|
||||
|
||||
if (i_hitObj->GetAtMtrl() == 2) {
|
||||
if (i_hitObj->GetAtMtrl() == dCcD_MTRL_ICE) {
|
||||
setFreeze();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct request_of_phase_process_class {};
|
||||
|
||||
struct csXyz {};
|
||||
|
||||
struct mDoMtx_stack_c {
|
||||
@@ -582,7 +580,6 @@ extern "C" void _restgpr_27();
|
||||
extern "C" void _restgpr_28();
|
||||
extern "C" void _restgpr_29();
|
||||
extern "C" extern void* g_fopAc_Method[8];
|
||||
extern "C" extern void* g_fpcLf_Method[5 + 1 /* padding */];
|
||||
extern "C" extern void* __vt__8dCcD_Cyl[36];
|
||||
extern "C" extern void* __vt__9dCcD_Stts[11];
|
||||
extern "C" u8 item_info__10dItem_data[1020 + 4 /* padding */];
|
||||
|
||||
@@ -854,7 +854,7 @@ static int daE_ARROW_Create(fopAc_ac_c* i_this) {
|
||||
a_this->mCcAtSph.SetAtHitCallback(atHit_CB);
|
||||
|
||||
if (a_this->mArrowType == ARROW_TYPE_FIRE) {
|
||||
a_this->mCcAtSph.SetAtMtrl(1);
|
||||
a_this->mCcAtSph.SetAtMtrl(dCcD_MTRL_FIRE);
|
||||
}
|
||||
|
||||
a_this->mCcAtSph.StartCAt(a_this->current.pos);
|
||||
|
||||
@@ -2044,10 +2044,10 @@ static cPhs__Step daE_BA_Create(fopAc_ac_c* i_this) {
|
||||
_this->mSph.SetStts(&_this->mStts);
|
||||
if (_this->mType == e_ba_class::TYPE_FIRE) {
|
||||
_this->mSph.SetAtType(0x100);
|
||||
_this->mSph.SetAtMtrl(1);
|
||||
_this->mSph.SetAtMtrl(dCcD_MTRL_FIRE);
|
||||
} else if (_this->mType == e_ba_class::TYPE_ICE) {
|
||||
_this->mSph.SetAtType(0x100);
|
||||
_this->mSph.SetAtMtrl(2);
|
||||
_this->mSph.SetAtMtrl(dCcD_MTRL_ICE);
|
||||
}
|
||||
|
||||
_this->mAcch.Set(fopAcM_GetPosition_p(_this), fopAcM_GetOldPosition_p(_this), _this,
|
||||
|
||||
@@ -1868,7 +1868,7 @@ s32 daE_FZ_c::create() {
|
||||
mAtSph.SetAtSpl(dCcG_At_Spl_UNK_1);
|
||||
setActionMode(ACT_ROLLMOVE,0);
|
||||
} else {
|
||||
mAtSph.SetAtMtrl(2);
|
||||
mAtSph.SetAtMtrl(dCcD_MTRL_ICE);
|
||||
mRadiusBase = 1.0f;
|
||||
cM_rnd() < 0.5f ? setActionMode(ACT_WAIT,0) : setActionMode(ACT_MOVE,0);
|
||||
}
|
||||
|
||||
@@ -1072,7 +1072,7 @@ s32 daE_FZ_c::create() {
|
||||
mAtSph.SetAtSpl(dCcG_At_Spl_UNK_1);
|
||||
setActionMode(ACT_ROLLMOVE,0);
|
||||
} else {
|
||||
mAtSph.SetAtMtrl(2);
|
||||
mAtSph.SetAtMtrl(dCcD_MTRL_ICE);
|
||||
mRadiusBase = 1.0f;
|
||||
cM_rnd() < 0.5f ? setActionMode(ACT_WAIT,0) : setActionMode(ACT_MOVE,0);
|
||||
}
|
||||
|
||||
@@ -1695,7 +1695,8 @@ extern "C" asm void __dt__8cM3dGAabFv() {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm br_s::~br_s() {
|
||||
extern "C" asm void __dt__4br_sFv() {
|
||||
// asm br_s::~br_s() {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/obj/d_a_obj_brg/d_a_obj_brg/__dt__4br_sFv.s"
|
||||
}
|
||||
@@ -1705,7 +1706,8 @@ asm br_s::~br_s() {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm br_s::br_s() {
|
||||
extern "C" asm void __ct__4br_sFv() {
|
||||
// asm br_s::br_s() {
|
||||
nofralloc
|
||||
#include "asm/rel/d/a/obj/d_a_obj_brg/d_a_obj_brg/__ct__4br_sFv.s"
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -85,13 +85,13 @@ cPhs__Step daLv1Cdl00_c::create() {
|
||||
if (!mSwType) {
|
||||
if (mIsSwitch) {
|
||||
mIsLit = true;
|
||||
mCyl.SetAtMtrl(1);
|
||||
mCyl.SetAtMtrl(dCcD_MTRL_FIRE);
|
||||
setLight();
|
||||
}
|
||||
} else {
|
||||
if (!mIsSwitch) {
|
||||
mIsLit = true;
|
||||
mCyl.SetAtMtrl(1);
|
||||
mCyl.SetAtMtrl(dCcD_MTRL_FIRE);
|
||||
setLight();
|
||||
}
|
||||
}
|
||||
@@ -160,18 +160,18 @@ int daLv1Cdl00_c::Execute() {
|
||||
u8 sw = fopAcM_isSwitch(this, fopAcM_GetParam(this) & 0xff);
|
||||
if (mIsSwitch != sw) {
|
||||
mIsLit = false;
|
||||
mCyl.SetAtMtrl(0);
|
||||
mCyl.SetAtMtrl(dCcD_MTRL_NONE);
|
||||
cutLight();
|
||||
if (!mSwType) {
|
||||
if (sw) {
|
||||
mIsLit = true;
|
||||
mCyl.SetAtMtrl(1);
|
||||
mCyl.SetAtMtrl(dCcD_MTRL_FIRE);
|
||||
setLight();
|
||||
}
|
||||
} else {
|
||||
if (!sw) {
|
||||
mIsLit = true;
|
||||
mCyl.SetAtMtrl(1);
|
||||
mCyl.SetAtMtrl(dCcD_MTRL_FIRE);
|
||||
setLight();
|
||||
}
|
||||
}
|
||||
@@ -192,9 +192,9 @@ int daLv1Cdl00_c::Execute() {
|
||||
|
||||
if (mCyl.ChkTgHit()) {
|
||||
dCcD_GObjInf* gobj = mCyl.GetTgHitGObj();
|
||||
if (gobj->GetAtType() == AT_TYPE_LANTERN_SWING && gobj->GetAtMtrl() == 1 && !mIsLit) {
|
||||
if (gobj->GetAtType() == AT_TYPE_LANTERN_SWING && gobj->GetAtMtrl() == dCcD_MTRL_FIRE && !mIsLit) {
|
||||
mIsLit = true;
|
||||
mCyl.SetAtMtrl(1);
|
||||
mCyl.SetAtMtrl(dCcD_MTRL_FIRE);
|
||||
if (!mSwType) {
|
||||
fopAcM_onSwitch(this, fopAcM_GetParam(this) & 0xff);
|
||||
} else {
|
||||
@@ -203,9 +203,9 @@ int daLv1Cdl00_c::Execute() {
|
||||
mDoAud_seStart(0x80017, &mTorchPos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(this)));
|
||||
setLight();
|
||||
}
|
||||
if (gobj->GetAtType() == AT_TYPE_BOOMERANG && gobj->GetAtMtrl() == 3 && mIsLit == true) {
|
||||
if (gobj->GetAtType() == AT_TYPE_BOOMERANG && gobj->GetAtMtrl() == dCcD_MTRL_WIND && mIsLit == true) {
|
||||
mIsLit = false;
|
||||
mCyl.SetAtMtrl(0);
|
||||
mCyl.SetAtMtrl(dCcD_MTRL_NONE);
|
||||
if (!mSwType) {
|
||||
fopAcM_offSwitch(this, fopAcM_GetParam(this) & 0xff);
|
||||
} else {
|
||||
|
||||
@@ -156,12 +156,12 @@ int daLv1Cdl01_c::Execute(f32 (**param_0)[3][4]) {
|
||||
|
||||
if (mCyl.ChkTgHit()) {
|
||||
dCcD_GObjInf* gobj = mCyl.GetTgHitGObj();
|
||||
if (gobj->GetAtType() == AT_TYPE_LANTERN_SWING && gobj->GetAtMtrl() == 1 && !mIsLit) {
|
||||
if (gobj->GetAtType() == AT_TYPE_LANTERN_SWING && gobj->GetAtMtrl() == dCcD_MTRL_FIRE && !mIsLit) {
|
||||
mIsLit = true;
|
||||
setLight();
|
||||
mDoAud_seStart(0x80017, &mTorchPos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(this)));
|
||||
}
|
||||
if (gobj->GetAtType() == AT_TYPE_BOOMERANG && gobj->GetAtMtrl() == 3 && mIsLit == true) {
|
||||
if (gobj->GetAtType() == AT_TYPE_BOOMERANG && gobj->GetAtMtrl() == dCcD_MTRL_WIND && mIsLit == true) {
|
||||
mTimer = 30;
|
||||
mIsLit = false;
|
||||
mDoAud_seStart(0x80019, &mTorchPos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(this)));
|
||||
|
||||
@@ -123,14 +123,14 @@ cPhs__Step daLv2Candle_c::create() {
|
||||
mSw = getSw();
|
||||
if (mSw == 0xff) {
|
||||
mIsLit = true;
|
||||
mCyl.SetAtMtrl(1);
|
||||
mCyl.SetAtMtrl(dCcD_MTRL_FIRE);
|
||||
setLight();
|
||||
} else {
|
||||
mIsSwitch = isSwitch();
|
||||
mIsLit = false;
|
||||
if (mIsSwitch) {
|
||||
mIsLit = true;
|
||||
mCyl.SetAtMtrl(1);
|
||||
mCyl.SetAtMtrl(dCcD_MTRL_FIRE);
|
||||
setLight();
|
||||
}
|
||||
}
|
||||
@@ -252,7 +252,7 @@ int daLv2Candle_c::Execute() {
|
||||
mTimer--;
|
||||
if (mTimer == 0) {
|
||||
mIsLit = true;
|
||||
mCyl.SetAtMtrl(1);
|
||||
mCyl.SetAtMtrl(dCcD_MTRL_FIRE);
|
||||
setLight();
|
||||
}
|
||||
}
|
||||
@@ -261,13 +261,13 @@ int daLv2Candle_c::Execute() {
|
||||
if (mIsSwitch) {
|
||||
if (mIsLit == false) {
|
||||
mIsLit = true;
|
||||
mCyl.SetAtMtrl(1);
|
||||
mCyl.SetAtMtrl(dCcD_MTRL_FIRE);
|
||||
setLight();
|
||||
}
|
||||
} else {
|
||||
if (mIsLit == true) {
|
||||
mIsLit = false;
|
||||
mCyl.SetAtMtrl(0);
|
||||
mCyl.SetAtMtrl(dCcD_MTRL_NONE);
|
||||
cutLight();
|
||||
}
|
||||
}
|
||||
@@ -297,9 +297,9 @@ int daLv2Candle_c::Execute() {
|
||||
|
||||
if (mCyl.ChkTgHit()) {
|
||||
dCcD_GObjInf* gobj = mCyl.GetTgHitGObj();
|
||||
if (gobj->GetAtType() == AT_TYPE_LANTERN_SWING && gobj->GetAtMtrl() == 1 && !mIsLit) {
|
||||
if (gobj->GetAtType() == AT_TYPE_LANTERN_SWING && gobj->GetAtMtrl() == dCcD_MTRL_FIRE && !mIsLit) {
|
||||
mIsLit = true;
|
||||
mCyl.SetAtMtrl(1);
|
||||
mCyl.SetAtMtrl(dCcD_MTRL_FIRE);
|
||||
if (!mSwType) {
|
||||
fopAcM_onSwitch(this, mSw);
|
||||
} else {
|
||||
@@ -308,10 +308,10 @@ int daLv2Candle_c::Execute() {
|
||||
mDoAud_seStart(0x80017, &mTorchPos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(this)));
|
||||
setLight();
|
||||
}
|
||||
if (gobj->GetAtType() == AT_TYPE_BOOMERANG && gobj->GetAtMtrl() == 3 &&
|
||||
if (gobj->GetAtType() == AT_TYPE_BOOMERANG && gobj->GetAtMtrl() == dCcD_MTRL_WIND &&
|
||||
mIsLit == true && getOffType() == 1) {
|
||||
mIsLit = false;
|
||||
mCyl.SetAtMtrl(0);
|
||||
mCyl.SetAtMtrl(dCcD_MTRL_NONE);
|
||||
cutLight();
|
||||
mDoAud_seStart(0x80019, &mTorchPos, 0, dComIfGp_getReverb(fopAcM_GetRoomNo(this)));
|
||||
if (mSw == 0xff) {
|
||||
|
||||
@@ -1633,7 +1633,7 @@ int daObjMovebox::Act_c::Execute(Mtx** param_0) {
|
||||
dCcD_GObjInf* hit_obj = mCcCyl.GetTgHitGObj();
|
||||
|
||||
if (mCcCyl.ChkTgHit() && hit_obj != NULL) {
|
||||
if (!hit_obj->ChkAtType(AT_TYPE_LANTERN_SWING) && hit_obj->GetAtMtrl() == 1) {
|
||||
if (!hit_obj->ChkAtType(AT_TYPE_LANTERN_SWING) && hit_obj->GetAtMtrl() == dCcD_MTRL_FIRE) {
|
||||
u32 params;
|
||||
daObjBurnBox_c::make_prm_burnbox(¶ms, 1);
|
||||
|
||||
|
||||
@@ -193,7 +193,7 @@ void daObjSwPr_c::execute_type_boomerang() {
|
||||
cCcD_Obj* tg_obj = mCyl1.GetTgHitObj();
|
||||
|
||||
if (tg_obj != NULL && ((tg_obj->ChkAtType(AT_TYPE_40) && mCyl1.GetTgHitGObj() != NULL &&
|
||||
mCyl1.GetTgHitGObj()->GetAtMtrl() == 3) ||
|
||||
mCyl1.GetTgHitGObj()->GetAtMtrl() == dCcD_MTRL_WIND) ||
|
||||
tg_obj->ChkAtType(AT_TYPE_BOOMERANG)))
|
||||
{
|
||||
start_rotate = true;
|
||||
@@ -240,7 +240,7 @@ void daObjSwPr_c::execute_type_wind() {
|
||||
|
||||
if (mCyl2.ChkTgHit()) {
|
||||
if (mCyl2.GetTgHitGObj() != NULL) {
|
||||
if (mCyl2.GetTgHitGObj()->GetAtMtrl() == 3 && mCyl2.GetTgHitObj() != NULL) {
|
||||
if (mCyl2.GetTgHitGObj()->GetAtMtrl() == dCcD_MTRL_WIND && mCyl2.GetTgHitObj() != NULL) {
|
||||
target_speed = 7000;
|
||||
mRotateInitSpeed = 7000;
|
||||
var_r29 = 1;
|
||||
@@ -258,7 +258,7 @@ void daObjSwPr_c::execute_type_wind() {
|
||||
}
|
||||
|
||||
if (mCyl1.ChkTgHit()) {
|
||||
if (mCyl1.GetTgHitGObj() != NULL && mCyl1.GetTgHitGObj()->GetAtMtrl() == 3) {
|
||||
if (mCyl1.GetTgHitGObj() != NULL && mCyl1.GetTgHitGObj()->GetAtMtrl() == dCcD_MTRL_WIND) {
|
||||
cCcD_Obj* tg_obj = mCyl1.GetTgHitObj();
|
||||
|
||||
if (tg_obj != NULL &&
|
||||
|
||||
@@ -125,12 +125,12 @@ static void damage_check(obj_web0_class* i_this) {
|
||||
}
|
||||
|
||||
if (i_this->mSphCc.GetTgHitObj()->ChkAtType(AT_TYPE_LANTERN_SWING) &&
|
||||
static_cast<dCcD_GObjInf*>(i_this->mSphCc.GetTgHitObj())->GetAtMtrl() != 1) {
|
||||
static_cast<dCcD_GObjInf*>(i_this->mSphCc.GetTgHitObj())->GetAtMtrl() != dCcD_MTRL_FIRE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (i_this->mSphCc.GetTgHitObj()->ChkAtType(AT_TYPE_BOMB) ||
|
||||
static_cast<dCcD_GObjInf*>(i_this->mSphCc.GetTgHitObj())->GetAtMtrl() == 1) {
|
||||
static_cast<dCcD_GObjInf*>(i_this->mSphCc.GetTgHitObj())->GetAtMtrl() == dCcD_MTRL_FIRE) {
|
||||
i_this->mDeleteTimer = 1;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ static void action(obj_web1_class* i_this) {
|
||||
i_this->mActionMode = 10;
|
||||
}
|
||||
|
||||
if (i_this->mCylCc.GetTgHitGObj()->GetAtMtrl() == 1) {
|
||||
if (i_this->mCylCc.GetTgHitGObj()->GetAtMtrl() == dCcD_MTRL_FIRE) {
|
||||
i_this->mActionMode = 10;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +95,6 @@ extern "C" void _savegpr_29();
|
||||
extern "C" void _restgpr_28();
|
||||
extern "C" void _restgpr_29();
|
||||
extern "C" extern void* g_fopAc_Method[8];
|
||||
extern "C" extern void* g_fpcLf_Method[5 + 1 /* padding */];
|
||||
extern "C" extern void* __vt__8dCcD_Cyl[36];
|
||||
extern "C" extern void* __vt__9dCcD_Stts[11];
|
||||
extern "C" extern void* __vt__12cCcD_CylAttr[25];
|
||||
|
||||
@@ -119,7 +119,7 @@ void daAlink_c::setCopyRodModel() {
|
||||
mAtCps[0].SetAtHitMark(1);
|
||||
mAtCps[0].OnAtSetBit();
|
||||
mAtCps[0].SetAtHitCallback(NULL);
|
||||
mAtCps[0].SetAtMtrl(0);
|
||||
mAtCps[0].SetAtMtrl(dCcD_MTRL_NONE);
|
||||
mHeldItemModel->setBaseTRMtx(mpLinkModel->getAnmMtx(field_0x30c0));
|
||||
mHeldItemModel->calc();
|
||||
}
|
||||
|
||||
@@ -87,9 +87,9 @@ void daAlink_c::initCutTurnAt(f32 param_0, int param_1) {
|
||||
|
||||
u8 mtrl;
|
||||
if (!checkNoResetFlg3(FLG3_UNK_100000)) {
|
||||
mtrl = 0;
|
||||
mtrl = dCcD_MTRL_NONE;
|
||||
} else {
|
||||
mtrl = 4;
|
||||
mtrl = dCcD_MTRL_LIGHT;
|
||||
}
|
||||
field_0xFB8.SetAtMtrl(mtrl);
|
||||
field_0xFB8.SetR(param_0);
|
||||
@@ -244,14 +244,14 @@ void daAlink_c::setCylAtParam(u32 i_AtType, dCcG_At_Spl i_spl, u8 i_hitMark, u8
|
||||
u8 mtrl;
|
||||
if (i_AtType & 2) {
|
||||
if (checkNoResetFlg3(FLG3_UNK_100000)) {
|
||||
mtrl = 4;
|
||||
mtrl = dCcD_MTRL_LIGHT;
|
||||
} else {
|
||||
mtrl = 0;
|
||||
mtrl = dCcD_MTRL_NONE;
|
||||
}
|
||||
} else if (mEquipItem == WATER_BOTTLE) {
|
||||
mtrl = 6;
|
||||
mtrl = dCcD_MTRL_UNK_6;
|
||||
} else {
|
||||
mtrl = 0;
|
||||
mtrl = dCcD_MTRL_NONE;
|
||||
}
|
||||
|
||||
mAtCyl.SetAtType(i_AtType);
|
||||
@@ -302,9 +302,9 @@ void daAlink_c::setSwordAtParam(dCcG_At_Spl i_spl, u8 i_hitMark, u8 i_AtSe, int
|
||||
|
||||
u8 mtrl;
|
||||
if (checkNoResetFlg3(FLG3_UNK_100000)) {
|
||||
mtrl = 4;
|
||||
mtrl = dCcD_MTRL_LIGHT;
|
||||
} else {
|
||||
mtrl = 0;
|
||||
mtrl = dCcD_MTRL_NONE;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
|
||||
@@ -287,7 +287,7 @@ void daAlink_c::setHookshotModel() {
|
||||
mAtCps[0].SetAtHitMark(1);
|
||||
mAtCps[0].OnAtSetBit();
|
||||
mAtCps[0].SetAtHitCallback(daAlink_hookshotAtHitCallBack);
|
||||
mAtCps[0].SetAtMtrl(0);
|
||||
mAtCps[0].SetAtMtrl(dCcD_MTRL_NONE);
|
||||
mpHookSound->init(&mHookshotTopPos, 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -370,7 +370,7 @@ void daAlink_c::initKandelaarSwing() {
|
||||
field_0xFB8.SetAtHitMark(0);
|
||||
field_0xFB8.SetAtSe(dCcD_SE_NONE);
|
||||
field_0xFB8.SetAtAtp(0);
|
||||
field_0xFB8.SetAtMtrl(1);
|
||||
field_0xFB8.SetAtMtrl(dCcD_MTRL_FIRE);
|
||||
}
|
||||
|
||||
/* 80111440-801115CC 10BD80 018C+00 2/1 0/0 0/0 .text procKandelaarSwingInit__9daAlink_cFv */
|
||||
|
||||
@@ -829,7 +829,7 @@ int daAlink_c::procFrontRollInit() {
|
||||
field_0xFB8.SetAtHitMark(1);
|
||||
field_0xFB8.SetAtSe(9);
|
||||
field_0xFB8.SetAtAtp(2);
|
||||
field_0xFB8.SetAtMtrl(0);
|
||||
field_0xFB8.SetAtMtrl(dCcD_MTRL_NONE);
|
||||
field_0xFB8.ResetAtHit();
|
||||
field_0xFB8.SetR(daAlinkHIO_frontRoll_c0::m.mBootsAttackRadius);
|
||||
field_0xFB8.OnAtSetBit();
|
||||
|
||||
+101
-99
@@ -202,38 +202,36 @@ bool dCcS::ChkShield(cCcD_Obj* i_atObj, cCcD_Obj* i_tgObj, dCcD_GObjInf* i_atObj
|
||||
|
||||
/* 800861B0-800861B4 080AF0 0004+00 1/0 0/0 0/0 .text
|
||||
* CalcTgPlusDmg__4dCcSFP8cCcD_ObjP8cCcD_ObjP9cCcD_SttsP9cCcD_Stts */
|
||||
void dCcS::CalcTgPlusDmg(cCcD_Obj* param_0, cCcD_Obj* param_1, cCcD_Stts* param_2,
|
||||
cCcD_Stts* param_3) {
|
||||
/* empty function */
|
||||
}
|
||||
void dCcS::CalcTgPlusDmg(cCcD_Obj* i_atObj, cCcD_Obj* i_tgObj, cCcD_Stts* i_atStts,
|
||||
cCcD_Stts* i_tgStts) {}
|
||||
|
||||
/* 800861B4-80086240 080AF4 008C+00 1/0 0/0 0/0 .text
|
||||
* ChkAtTgHitAfterCross__4dCcSFbbPC12cCcD_GObjInfPC12cCcD_GObjInfP9cCcD_SttsP9cCcD_SttsP10cCcD_GSttsP10cCcD_GStts
|
||||
*/
|
||||
bool dCcS::ChkAtTgHitAfterCross(bool i_setAt, bool i_setTg, cCcD_GObjInf const* i_atObjInf,
|
||||
cCcD_GObjInf const* i_tgObjInf, cCcD_Stts* param_4,
|
||||
cCcD_Stts* param_5, cCcD_GStts* param_6, cCcD_GStts* param_7) {
|
||||
cCcD_GObjInf const* i_tgObjInf, cCcD_Stts* i_atStts,
|
||||
cCcD_Stts* i_tgStts, cCcD_GStts* i_atGStts, cCcD_GStts* i_tgGStts) {
|
||||
dCcD_GObjInf* atObjInf = (dCcD_GObjInf*)i_atObjInf;
|
||||
dCcD_GObjInf* tgObjInf = (dCcD_GObjInf*)i_tgObjInf;
|
||||
|
||||
u32 tgApid = param_4->GetApid();
|
||||
u32 atApid = param_5->GetApid();
|
||||
fpc_ProcID tgApid = i_atStts->GetApid();
|
||||
fpc_ProcID atApid = i_tgStts->GetApid();
|
||||
|
||||
if (i_setAt) {
|
||||
static_cast<dCcD_GStts*>(param_6)->SetAtApid(atApid);
|
||||
static_cast<dCcD_GStts*>(i_atGStts)->SetAtApid(atApid);
|
||||
|
||||
if (atObjInf->ChkAtNoConHit() && !tgObjInf->ChkTgStopNoConHit()) {
|
||||
if (static_cast<dCcD_GStts*>(param_6)->GetAtOldApid() == param_5->GetApid()) {
|
||||
if (static_cast<dCcD_GStts*>(i_atGStts)->GetAtOldApid() == i_tgStts->GetApid()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (i_setTg) {
|
||||
static_cast<dCcD_GStts*>(param_7)->SetTgApid(tgApid);
|
||||
static_cast<dCcD_GStts*>(i_tgGStts)->SetTgApid(tgApid);
|
||||
|
||||
if (tgObjInf->ChkTgNoConHit() && !atObjInf->ChkAtStopNoConHit()) {
|
||||
if (static_cast<dCcD_GStts*>(param_7)->GetTgOldApid() == param_4->GetApid()) {
|
||||
if (static_cast<dCcD_GStts*>(i_tgGStts)->GetTgOldApid() == i_atStts->GetApid()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -247,40 +245,40 @@ bool dCcS::ChkAtTgHitAfterCross(bool i_setAt, bool i_setTg, cCcD_GObjInf const*
|
||||
*/
|
||||
// weird reg alloc
|
||||
#ifdef NONMATCHING
|
||||
void dCcS::SetCoGObjInf(bool param_0, bool param_1, cCcD_GObjInf* param_2, cCcD_GObjInf* param_3,
|
||||
cCcD_Stts* param_4, cCcD_Stts* param_5, cCcD_GStts* param_6,
|
||||
cCcD_GStts* param_7) {
|
||||
if (param_0) {
|
||||
static_cast<dCcD_GObjInf*>(param_2)->SetCoHitApid(param_5->GetApid());
|
||||
void dCcS::SetCoGObjInf(bool i_co2Set, bool i_co1Set, cCcD_GObjInf* i_co1Obj, cCcD_GObjInf* i_co2Obj,
|
||||
cCcD_Stts* i_co1Stts, cCcD_Stts* i_co2Stts, cCcD_GStts* i_co1GStts,
|
||||
cCcD_GStts* i_co2GStts) {
|
||||
if (i_co2Set) {
|
||||
static_cast<dCcD_GObjInf*>(i_co1Obj)->SetCoHitApid(i_co2Stts->GetApid());
|
||||
|
||||
if (static_cast<dCcD_GStts*>(param_7)->ChkNoActor()) {
|
||||
static_cast<dCcD_GObjInf*>(param_2)->OnCoHitNoActor();
|
||||
if (static_cast<dCcD_GStts*>(i_co2GStts)->ChkNoActor()) {
|
||||
static_cast<dCcD_GObjInf*>(i_co1Obj)->OnCoHitNoActor();
|
||||
}
|
||||
}
|
||||
|
||||
if (param_1) {
|
||||
static_cast<dCcD_GObjInf*>(param_3)->SetCoHitApid(param_4->GetApid());
|
||||
if (i_co1Set) {
|
||||
static_cast<dCcD_GObjInf*>(i_co2Obj)->SetCoHitApid(i_co1Stts->GetApid());
|
||||
|
||||
if (static_cast<dCcD_GStts*>(param_6)->ChkNoActor()) {
|
||||
static_cast<dCcD_GObjInf*>(param_3)->OnCoHitNoActor();
|
||||
if (static_cast<dCcD_GStts*>(i_co1GStts)->ChkNoActor()) {
|
||||
static_cast<dCcD_GObjInf*>(i_co2Obj)->OnCoHitNoActor();
|
||||
}
|
||||
}
|
||||
|
||||
if (param_0) {
|
||||
dCcD_HitCallback cb = static_cast<dCcD_GObjInf*>(param_2)->GetCoHitCallback();
|
||||
if (i_co2Set) {
|
||||
dCcD_HitCallback cb = static_cast<dCcD_GObjInf*>(i_co1Obj)->GetCoHitCallback();
|
||||
|
||||
if (cb != NULL) {
|
||||
cb(param_2->GetAc(), static_cast<dCcD_GObjInf*>(param_2), param_3->GetAc(),
|
||||
static_cast<dCcD_GObjInf*>(param_3));
|
||||
cb(i_co1Obj->GetAc(), static_cast<dCcD_GObjInf*>(i_co1Obj), i_co2Obj->GetAc(),
|
||||
static_cast<dCcD_GObjInf*>(i_co2Obj));
|
||||
}
|
||||
}
|
||||
|
||||
if (param_1) {
|
||||
dCcD_HitCallback cb = static_cast<dCcD_GObjInf*>(param_3)->GetCoHitCallback();
|
||||
if (i_co1Set) {
|
||||
dCcD_HitCallback cb = static_cast<dCcD_GObjInf*>(i_co2Obj)->GetCoHitCallback();
|
||||
|
||||
if (cb != NULL) {
|
||||
cb(param_3->GetAc(), static_cast<dCcD_GObjInf*>(param_3), param_2->GetAc(),
|
||||
static_cast<dCcD_GObjInf*>(param_2));
|
||||
cb(i_co2Obj->GetAc(), static_cast<dCcD_GObjInf*>(i_co2Obj), i_co1Obj->GetAc(),
|
||||
static_cast<dCcD_GObjInf*>(i_co1Obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -343,11 +341,10 @@ int dCcS::GetRank(u8 weight) {
|
||||
}
|
||||
|
||||
/* 80086404-8008640C 080D44 0008+00 1/0 0/0 0/0 .text ChkNoHitGCo__4dCcSFP8cCcD_ObjP8cCcD_Obj */
|
||||
bool dCcS::ChkNoHitGCo(cCcD_Obj* param_0, cCcD_Obj* param_1) {
|
||||
bool dCcS::ChkNoHitGCo(cCcD_Obj* i_co1Obj, cCcD_Obj* i_co2Obj) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803AC328-803AC3A4 009448 0079+03 1/1 0/0 0/0 .data rank_tbl */
|
||||
static u8 rank_tbl[11][11] = {
|
||||
0x00, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x64, 0x00, 0x32, 0x64, 0x64, 0x64,
|
||||
@@ -362,93 +359,93 @@ static u8 rank_tbl[11][11] = {
|
||||
|
||||
/* 8008640C-80086754 080D4C 0348+00 1/0 0/0 0/0 .text
|
||||
* SetPosCorrect__4dCcSFP8cCcD_ObjP4cXyzP8cCcD_ObjP4cXyzf */
|
||||
void dCcS::SetPosCorrect(cCcD_Obj* param_0, cXyz* param_1, cCcD_Obj* param_2, cXyz* param_3,
|
||||
f32 param_4) {
|
||||
if (param_0->ChkCoNoCrr() || param_2->ChkCoNoCrr()) {
|
||||
void dCcS::SetPosCorrect(cCcD_Obj* i_co1Obj, cXyz* i_pos1, cCcD_Obj* i_co2Obj, cXyz* i_pos2,
|
||||
f32 i_cross_len) {
|
||||
if (i_co1Obj->ChkCoNoCrr() || i_co2Obj->ChkCoNoCrr()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (param_0->GetStts() == NULL || param_2->GetStts() == NULL) {
|
||||
if (i_co1Obj->GetStts() == NULL || i_co2Obj->GetStts() == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (cM3d_IsZero(param_4)) {
|
||||
if (cM3d_IsZero(i_cross_len)) {
|
||||
return;
|
||||
}
|
||||
|
||||
SetCoGCorrectProc(param_0, param_2);
|
||||
SetCoGCorrectProc(i_co1Obj, i_co2Obj);
|
||||
|
||||
bool bvar2 = false;
|
||||
if (param_0->ChkCoSph3DCrr() && param_2->ChkCoSph3DCrr()) {
|
||||
if (i_co1Obj->ChkCoSph3DCrr() && i_co2Obj->ChkCoSph3DCrr()) {
|
||||
bvar2 = true;
|
||||
}
|
||||
|
||||
if ((param_0->GetStts()->GetWeightUc() == 0 && param_2->GetStts()->GetWeightUc() == 0) ||
|
||||
(param_0->GetStts()->GetWeightUc() == 0xFF && param_2->GetStts()->GetWeightUc() == 0xFF))
|
||||
if ((i_co1Obj->GetStts()->GetWeightUc() == 0 && i_co2Obj->GetStts()->GetWeightUc() == 0) ||
|
||||
(i_co1Obj->GetStts()->GetWeightUc() == 0xFF && i_co2Obj->GetStts()->GetWeightUc() == 0xFF))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int weight1 = GetRank(param_0->GetStts()->GetWeightUc());
|
||||
int weight2 = GetRank(param_2->GetStts()->GetWeightUc());
|
||||
u8 rank = rank_tbl[weight1][weight2];
|
||||
int co1_rank = GetRank(i_co1Obj->GetStts()->GetWeightUc());
|
||||
int co2_rank = GetRank(i_co2Obj->GetStts()->GetWeightUc());
|
||||
u8 rank = rank_tbl[co1_rank][co2_rank];
|
||||
|
||||
f32 fvar1 = rank * 0.01f;
|
||||
f32 fvar2 = (u8)(100 - rank) * 0.01f;
|
||||
|
||||
cXyz local_b0;
|
||||
cXyz local_bc;
|
||||
cXyz co1_move;
|
||||
cXyz co2_move;
|
||||
Vec local_c8;
|
||||
|
||||
f32 fvar14;
|
||||
if (bvar2) {
|
||||
VECSubtract(param_3, param_1, &local_c8);
|
||||
VECSubtract(i_pos2, i_pos1, &local_c8);
|
||||
fvar14 = VECMag(&local_c8);
|
||||
} else {
|
||||
local_c8.x = param_3->x - param_1->x;
|
||||
local_c8.x = i_pos2->x - i_pos1->x;
|
||||
local_c8.y = 0.0f;
|
||||
local_c8.z = param_3->z - param_1->z;
|
||||
local_c8.z = i_pos2->z - i_pos1->z;
|
||||
fvar14 = JMAFastSqrt((local_c8.x * local_c8.x) + (local_c8.z * local_c8.z));
|
||||
}
|
||||
|
||||
if (!cM3d_IsZero(fvar14)) {
|
||||
if (bvar2) {
|
||||
VECScale(&local_c8, &local_c8, param_4 / fvar14);
|
||||
VECScale(&local_c8, &local_c8, i_cross_len / fvar14);
|
||||
fvar1 *= -1.0f;
|
||||
VECScale(&local_c8, &local_b0, fvar1);
|
||||
VECScale(&local_c8, &local_bc, fvar2);
|
||||
VECScale(&local_c8, &co1_move, fvar1);
|
||||
VECScale(&local_c8, &co2_move, fvar2);
|
||||
} else {
|
||||
fvar14 = param_4 / fvar14;
|
||||
fvar14 = i_cross_len / fvar14;
|
||||
local_c8.x *= fvar14;
|
||||
local_c8.z *= fvar14;
|
||||
|
||||
local_b0.x = -local_c8.x * fvar1;
|
||||
local_b0.y = 0.0f;
|
||||
local_b0.z = -local_c8.z * fvar1;
|
||||
co1_move.x = -local_c8.x * fvar1;
|
||||
co1_move.y = 0.0f;
|
||||
co1_move.z = -local_c8.z * fvar1;
|
||||
|
||||
local_bc.x = local_c8.x * fvar2;
|
||||
local_bc.y = 0.0f;
|
||||
local_bc.z = local_c8.z * fvar2;
|
||||
co2_move.x = local_c8.x * fvar2;
|
||||
co2_move.y = 0.0f;
|
||||
co2_move.z = local_c8.z * fvar2;
|
||||
}
|
||||
} else {
|
||||
local_b0.y = 0.0f;
|
||||
local_b0.z = 0.0f;
|
||||
local_bc.y = 0.0f;
|
||||
local_bc.z = 0.0f;
|
||||
co1_move.y = 0.0f;
|
||||
co1_move.z = 0.0f;
|
||||
co2_move.y = 0.0f;
|
||||
co2_move.z = 0.0f;
|
||||
|
||||
if (!cM3d_IsZero(param_4)) {
|
||||
local_b0.x = -param_4 * fvar1;
|
||||
local_bc.x = param_4 * fvar2;
|
||||
if (!cM3d_IsZero(i_cross_len)) {
|
||||
co1_move.x = -i_cross_len * fvar1;
|
||||
co2_move.x = i_cross_len * fvar2;
|
||||
} else {
|
||||
local_b0.x = -fvar1;
|
||||
local_bc.x = fvar2;
|
||||
co1_move.x = -fvar1;
|
||||
co2_move.x = fvar2;
|
||||
}
|
||||
}
|
||||
|
||||
param_0->GetStts()->PlusCcMove(local_b0.x, local_b0.y, local_b0.z);
|
||||
param_2->GetStts()->PlusCcMove(local_bc.x, local_bc.y, local_bc.z);
|
||||
*param_1 += local_b0;
|
||||
*param_3 += local_bc;
|
||||
i_co1Obj->GetStts()->PlusCcMove(co1_move.x, co1_move.y, co1_move.z);
|
||||
i_co2Obj->GetStts()->PlusCcMove(co2_move.x, co2_move.y, co2_move.z);
|
||||
*i_pos1 += co1_move;
|
||||
*i_pos2 += co2_move;
|
||||
}
|
||||
|
||||
/* 80086754-8008685C 081094 0108+00 1/0 0/0 0/0 .text
|
||||
@@ -567,35 +564,35 @@ asm void dCcS::ProcAtTgHitmark(bool param_0, bool param_1, cCcD_Obj* param_2, cC
|
||||
/* 80086AC0-80086D8C 081400 02CC+00 1/0 0/0 0/0 .text
|
||||
* SetAtTgGObjInf__4dCcSFbbP8cCcD_ObjP8cCcD_ObjP12cCcD_GObjInfP12cCcD_GObjInfP9cCcD_SttsP9cCcD_SttsP10cCcD_GSttsP10cCcD_GSttsP4cXyz
|
||||
*/
|
||||
void dCcS::SetAtTgGObjInf(bool i_setAt, bool i_setTg, cCcD_Obj* param_2, cCcD_Obj* param_3,
|
||||
cCcD_GObjInf* i_atObjInf, cCcD_GObjInf* i_tgObjInf, cCcD_Stts* param_6,
|
||||
cCcD_Stts* param_7, cCcD_GStts* param_8, cCcD_GStts* param_9,
|
||||
void dCcS::SetAtTgGObjInf(bool i_setAt, bool i_setTg, cCcD_Obj* i_atObj, cCcD_Obj* i_tgObj,
|
||||
cCcD_GObjInf* i_atObjInf, cCcD_GObjInf* i_tgObjInf, cCcD_Stts* i_atStts,
|
||||
cCcD_Stts* i_tgStts, cCcD_GStts* i_atGStts, cCcD_GStts* i_tgGStts,
|
||||
cXyz* i_hitPos) {
|
||||
dCcD_GObjInf* atObjInf = (dCcD_GObjInf*)i_atObjInf;
|
||||
dCcD_GObjInf* tgObjInf = (dCcD_GObjInf*)i_tgObjInf;
|
||||
dCcD_GStts* stts1 = (dCcD_GStts*)param_8;
|
||||
dCcD_GStts* stts2 = (dCcD_GStts*)param_9;
|
||||
dCcD_GStts* at_gstts = (dCcD_GStts*)i_atGStts;
|
||||
dCcD_GStts* tg_gstts = (dCcD_GStts*)i_tgGStts;
|
||||
|
||||
bool chk_shield = ChkShield(param_2, param_3, atObjInf, tgObjInf, i_hitPos);
|
||||
bool chk_shield = ChkShield(i_atObj, i_tgObj, atObjInf, tgObjInf, i_hitPos);
|
||||
|
||||
if (i_setAt) {
|
||||
atObjInf->SetAtHitPos(*i_hitPos);
|
||||
atObjInf->SetAtRVec(*tgObjInf->GetTgVecP());
|
||||
|
||||
if (stts1 != NULL && stts1->GetTgSpl() == 0) {
|
||||
stts1->SetTgSpl(tgObjInf->GetTgSpl());
|
||||
if (at_gstts != NULL && at_gstts->GetTgSpl() == 0) {
|
||||
at_gstts->SetTgSpl(tgObjInf->GetTgSpl());
|
||||
}
|
||||
|
||||
atObjInf->SetAtHitApid(param_7->GetApid());
|
||||
atObjInf->SetAtHitApid(i_tgStts->GetApid());
|
||||
|
||||
if (chk_shield || tgObjInf->GetTgHitMark() == 8 && atObjInf->GetAtMtrl() != 2 &&
|
||||
if (chk_shield || tgObjInf->GetTgHitMark() == 8 && atObjInf->GetAtMtrl() != dCcD_MTRL_ICE &&
|
||||
(atObjInf->GetAtSpl() == 0 || atObjInf->GetAtSpl() == 5 ||
|
||||
atObjInf->GetAtSpl() == 8))
|
||||
{
|
||||
atObjInf->OnAtShieldHit();
|
||||
}
|
||||
|
||||
if (stts2->ChkNoActor()) {
|
||||
if (tg_gstts->ChkNoActor()) {
|
||||
atObjInf->OnAtHitNoActor();
|
||||
}
|
||||
}
|
||||
@@ -604,19 +601,19 @@ void dCcS::SetAtTgGObjInf(bool i_setAt, bool i_setTg, cCcD_Obj* param_2, cCcD_Ob
|
||||
tgObjInf->SetTgHitPos(*i_hitPos);
|
||||
tgObjInf->SetTgRVec(*atObjInf->GetAtVecP());
|
||||
|
||||
if (stts2 != NULL && stts1->GetAtSpl() == 0) {
|
||||
stts2->SetAtSpl(atObjInf->GetAtSpl());
|
||||
if (tg_gstts != NULL && at_gstts->GetAtSpl() == 0) {
|
||||
tg_gstts->SetAtSpl(atObjInf->GetAtSpl());
|
||||
}
|
||||
|
||||
tgObjInf->SetTgHitApid(param_6->GetApid());
|
||||
tgObjInf->SetTgHitApid(i_atStts->GetApid());
|
||||
|
||||
if (chk_shield) {
|
||||
tgObjInf->OnTgShieldHit();
|
||||
} else {
|
||||
param_7->PlusDmg(param_2->GetAtAtp());
|
||||
i_tgStts->PlusDmg(i_atObj->GetAtAtp());
|
||||
}
|
||||
|
||||
if (stts1->ChkNoActor()) {
|
||||
if (at_gstts->ChkNoActor()) {
|
||||
tgObjInf->OnTgHitNoActor();
|
||||
}
|
||||
}
|
||||
@@ -641,8 +638,8 @@ void dCcS::SetAtTgGObjInf(bool i_setAt, bool i_setTg, cCcD_Obj* param_2, cCcD_Ob
|
||||
atObjInf->SetAtEffCounterTimer();
|
||||
tgObjInf->SetTgEffCounterTimer();
|
||||
|
||||
ProcAtTgHitmark(i_setAt, i_setTg, param_2, param_3, atObjInf, tgObjInf, param_6, param_7,
|
||||
stts1, stts2, i_hitPos, chk_shield);
|
||||
ProcAtTgHitmark(i_setAt, i_setTg, i_atObj, i_tgObj, atObjInf, tgObjInf, i_atStts, i_tgStts,
|
||||
at_gstts, tg_gstts, i_hitPos, chk_shield);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -753,17 +750,22 @@ void dCcS::MassClear() {
|
||||
mMass_Mng.Clear();
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803AC3A4-803AC3E4 0094C4 0040+00 1/1 0/0 0/0 .data m_mtrl_hit_tbl__4dCcS */
|
||||
u8 dCcS::m_mtrl_hit_tbl[64] = {
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01,
|
||||
// clang-format off
|
||||
bool dCcS::m_mtrl_hit_tbl[64] = {
|
||||
true, true, true, true, true, true, true, true,
|
||||
false, true, false, false, false, false, false, false,
|
||||
false, false, true, false, false, false, false, false,
|
||||
false, false, false, true, false, false, false, false,
|
||||
false, false, false, false, true, false, false, false,
|
||||
false, false, false, false, false, true, false, false,
|
||||
false, false, false, false, false, false, true, false,
|
||||
true, true, true, true, false, true, true, true,
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
/* 80087330-8008734C 081C70 001C+00 1/1 0/0 0/0 .text ChkAtTgMtrlHit__4dCcSFUcUc */
|
||||
int dCcS::ChkAtTgMtrlHit(u8 i_atMtrl, u8 i_tgMtrl) {
|
||||
BOOL dCcS::ChkAtTgMtrlHit(u8 i_atMtrl, u8 i_tgMtrl) {
|
||||
return m_mtrl_hit_tbl[i_atMtrl + i_tgMtrl * 8];
|
||||
}
|
||||
|
||||
@@ -774,7 +776,7 @@ bool dCcS::ChkNoHitGAtTg(cCcD_GObjInf const* i_atObjInf, cCcD_GObjInf const* i_t
|
||||
dCcD_GObjInf* atObjInf = (dCcD_GObjInf*)i_atObjInf;
|
||||
dCcD_GObjInf* tgObjInf = (dCcD_GObjInf*)i_tgObjInf;
|
||||
|
||||
if (tgObjInf->ChkTgWolfSpNoDamage() && atObjInf->GetAtMtrl() == 0 &&
|
||||
if (tgObjInf->ChkTgWolfSpNoDamage() && atObjInf->GetAtMtrl() == dCcD_MTRL_NONE &&
|
||||
atObjInf->GetAtType() &
|
||||
(AT_TYPE_CSTATUE_BOSS_SWING | AT_TYPE_1000 | AT_TYPE_800 | AT_TYPE_CSTATUE_SWING))
|
||||
{
|
||||
|
||||
@@ -419,7 +419,7 @@ fopAc_ac_c* cc_at_check(fopAc_ac_c* i_enemy, dCcU_AtInfo* i_AtInfo) {
|
||||
i_AtInfo->mAttackPower = 0;
|
||||
}
|
||||
|
||||
if (static_cast<dCcD_GObjInf*>(i_AtInfo->mpCollider)->GetAtMtrl() == 4) {
|
||||
if (static_cast<dCcD_GObjInf*>(i_AtInfo->mpCollider)->GetAtMtrl() == dCcD_MTRL_LIGHT) {
|
||||
if (fopAcM_GetName(i_enemy) == PROC_B_GND) {
|
||||
i_AtInfo->mAttackPower = 0;
|
||||
} else if (fopAcM_GetName(i_enemy) != PROC_B_ZANT) {
|
||||
|
||||
Reference in New Issue
Block a user