Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions include/SSystem/SComponent/c_bg_s_lin_chk.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class cBgS_LinChk : public cBgS_Chk, public cBgS_PolyInfo {
void SetHit() { mStts |= STTS_HIT; }
u32 ChkHit() const { return mStts & STTS_HIT; }
void SetCross(const cXyz& pos) { mLin.SetEnd(pos); }
cXyz* GetCrossP() { return &mLin.GetEndP(); }
cXyz* GetCrossP() { return mLin.GetEndP(); }
cM3dGLin* GetLinP() { return &mLin; }
bool ChkBackFlag() const { return mBackFlag; }
void OnBackFlag() { mBackFlag = true; }
Expand All @@ -45,13 +45,17 @@ class cBgS_LinChk : public cBgS_Chk, public cBgS_PolyInfo {
bool GetPreWallChk() const { return mPreWallChk; }
bool GetPreGroundChk() const { return mPreGroundChk; }
bool GetPreRoofChk() const { return mPreRoofChk; }
cXyz* GetStartP() { return &mLin.GetStartP(); }
cXyz* GetStartP() { return mLin.GetStartP(); }
void ClrSttsRoofOff() { mStts &= ~STTS_ROOF_OFF; }
void SetSttsRoofOff() { mStts |= STTS_ROOF_OFF; }
void ClrSttsWallOff() { mStts &= ~STTS_WALL_OFF; }
void SetSttsWallOff() { mStts |= STTS_WALL_OFF; }
void ClrSttsGroundOff() { mStts &= ~STTS_GROUND_OFF; }
void SetSttsGroundOff() { mStts |= STTS_GROUND_OFF; }
void ClearCheckIndex() { ClearPi(); }
bool ChkSttsWallOff() const { return (mStts & STTS_WALL_OFF); }
bool ChkSttsGroundOff() const { return (mStts & STTS_GROUND_OFF); }
bool ChkSttsRoofOff() const { return (mStts & STTS_ROOF_OFF); }
};

#endif /* C_BG_S_LIN_CHK_H */
27 changes: 15 additions & 12 deletions include/SSystem/SComponent/c_cc_d.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ class cCcD_Stts {
cXyz* GetCCMoveP() { return &m_cc_move; }
fpc_ProcID GetApid() const { return m_apid; }
u8 GetDmg() const { return m_dmg; }
void ClrCo() { ClrCcMove(); }
}; // Size = 0x1C

STATIC_ASSERT(0x1C == sizeof(cCcD_Stts));
Expand All @@ -213,7 +214,7 @@ class cCcD_ObjCommonBase {
void ct();
void SetSPrm(u32 sprm) { mSPrm = sprm; }
s32 getSPrm() const { return mSPrm; }
void setRPrm(s32 rprm) { mRPrm = rprm; }
void SetRPrm(u32 rprm) { mRPrm = rprm; }
s32 getRPrm() const { return mRPrm; }
cCcD_Obj* GetHitObj() { return mHitObj; }
const cCcD_Obj* GetHitObj() const { return mHitObj; }
Expand All @@ -222,6 +223,9 @@ class cCcD_ObjCommonBase {
void OnSPrmBit(u32 flag) { mSPrm |= flag; }
void OffSPrmBit(u32 flag) { mSPrm &= ~flag; }
u32 ChkSPrm(u32 prm) const { return MskSPrm(prm) != 0; }
void SetHitObj(cCcD_Obj* pobj) { mHitObj = pobj; }
void ClrRPrm(u32 prm) { mRPrm &= ~prm; }
void ClrObj() { mHitObj = NULL; }

void Set(cCcD_SrcObjCommonBase const& src) { mSPrm = src.mSPrm; }
};
Expand All @@ -240,7 +244,7 @@ class cCcD_ObjAt : public cCcD_ObjCommonBase {
void ClrHit();
int GetType() const { return mType; }
u32 GetGrp() const { return MskSPrm(0x1E); }
bool ChkSet() const { return MskSPrm(1); }
BOOL ChkSet() const { return MskSPrm(1); }
u8 GetAtp() const { return mAtp; }
u32 MskType(u32 msk) const { return mType & msk; }
void SetType(u32 type) { mType = type; }
Expand Down Expand Up @@ -269,7 +273,7 @@ class cCcD_ObjTg : public cCcD_ObjCommonBase {
int GetType() const { return mType; }
void SetType(u32 type) { mType = type; }
u32 GetGrp() const { return MskSPrm(0x1E); }
bool ChkSet() const { return MskSPrm(1); }
BOOL ChkSet() const { return MskSPrm(1); }
void ClrSet() { OffSPrmBit(1); }
u32 ChkHit() const { return MskRPrm(1); }

Expand All @@ -289,7 +293,7 @@ class cCcD_ObjCo : public cCcD_ObjCommonBase {
void SetIGrp(u32);
void SetVsGrp(u32);
u32 GetGrp() const { return MskSPrm(0x1E); }
bool ChkSet() const { return MskSPrm(1); }
BOOL ChkSet() const { return MskSPrm(1); }
u32 GetVsGrp() const { return MskSPrm(0x70); }
u32 GetIGrp() const { return MskSPrm(0xE); }
u32 ChkNoCrr() const { return MskSPrm(0x100); }
Expand Down Expand Up @@ -323,19 +327,19 @@ class cCcD_ObjHitInf {
u32 GetCoGrp() const { return mObjCo.GetGrp(); }
int GetTgType() const { return mObjTg.GetType(); }
u32 GetAtType() const { return mObjAt.GetType(); }
bool ChkTgSet() const { return mObjTg.ChkSet(); }
bool ChkAtSet() const { return mObjAt.ChkSet(); }
bool ChkCoSet() const { return mObjCo.ChkSet(); }
u32 ChkCoSameActorHit() const { return mObjCo.ChkCoSameActorHit(); }
BOOL ChkTgSet() const { return mObjTg.ChkSet(); }
BOOL ChkAtSet() const { return mObjAt.ChkSet(); }
BOOL ChkCoSet() const { return mObjCo.ChkSet(); }
u32 ChkCoSameActorHit() { return mObjCo.MskSPrm(0x400); }
void OnCoSameActorHit() { mObjCo.OnCoSameActorHit(); }
void OffCoSameActorHit() { mObjCo.OffCoSameActorHit(); }
u32 GetCoVsGrp() const { return mObjCo.GetVsGrp(); }
u32 GetCoIGrp() const { return mObjCo.GetIGrp(); }
u8 GetAtAtp() const { return mObjAt.GetAtp(); }
u32 ChkAtNoTgHitInfSet() const { return mObjAt.MskSPrm(0x20); }
u32 ChkTgNoAtHitInfSet() const { return mObjTg.MskSPrm(0x20); }
u32 ChkCoNoCoHitInfSet() const { return mObjCo.MskSPrm(0x200); }
bool ChkTgNoSlingHitInfSet() const { return mObjTg.MskSPrm(0x40); }
u32 ChkCoNoCoHitInfSet() { return mObjCo.MskSPrm(0x200); }
BOOL ChkTgNoSlingHitInfSet() { return mObjTg.MskSPrm(0x40); }
void SetAtHit(cCcD_Obj* obj) { mObjAt.SetHit(obj); }
void SetTgHit(cCcD_Obj* obj) { mObjTg.SetHit(obj); }
void SetCoHit(cCcD_Obj* obj) { mObjCo.SetHit(obj); }
Expand Down Expand Up @@ -430,7 +434,6 @@ class cCcD_ShapeAttr {
/* vt[21]*/ virtual void getShapeAccess(cCcD_ShapeAttr::Shape*) const;

cM3dGAab& GetWorkAab() { return mAab; }
cM3dGAab const& GetWorkAab() const { return mAab; }

static cXyz m_virtual_center;
};
Expand All @@ -456,7 +459,7 @@ class cCcD_Obj : public cCcD_ObjHitInf {
void SetStts(cCcD_Stts* stts) { mStts = stts; }
cCcD_DivideInfo& GetDivideInfo() { return mDivideInfo; }
cCcD_DivideInfo* GetPDivideInfo() { return &mDivideInfo; }
int ChkBsRevHit() const { return mFlags & 2; }
int ChkBsRevHit() { return mFlags & 2; }

private:
/* 0x040 */ int mFlags;
Expand Down
2 changes: 1 addition & 1 deletion include/SSystem/SComponent/c_cc_s.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class cCcS {
/* 0x1000 */ cCcD_Obj* mpObjCo[0x100];
/* 0x1400 */ cCcD_Obj* mpObj[0x500];
#if DEBUG
/* 0x2800 */ int m_debug_code;
/* 0x2800 */ u32 m_debug_code;
#endif
/* 0x2800 */ u16 mObjAtCount;
/* 0x2802 */ u16 mObjTgCount;
Expand Down
24 changes: 12 additions & 12 deletions include/SSystem/SComponent/c_m3d_g_aab.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,25 @@ class cM3dGAab {
bool CrossY(const cXyz*) const;
bool UnderPlaneYUnder(f32) const;
bool TopPlaneYUnder(f32) const;
void ClearForMinMax(void);
void ClearForMinMax();
void SetMinMax(const cXyz&);
void SetMinMax(const cM3dGAab&);
void SetMin(const cXyz&);
void SetMax(const cXyz&);
void CalcCenter(cXyz*) const;
void PlusR(f32);
const cXyz* GetMaxP(void) const { return &mMax; }
cXyz* GetMaxP(void) { return &mMax; }
const cXyz* GetMinP(void) const { return &mMin; }
cXyz* GetMinP(void) { return &mMin; }
const f32 GetMaxX(void) const { return mMax.x; }
const f32 GetMaxY(void) const { return mMax.y; }
const f32 GetMaxZ(void) const { return mMax.z; }
const f32 GetMinX(void) const { return mMin.x; }
const f32 GetMinY(void) const { return mMin.y; }
const f32 GetMinZ(void) const { return mMin.z; }
const cXyz* GetMaxP() const { return &mMax; }
cXyz* GetMaxP() { return &mMax; }
const cXyz* GetMinP() const { return &mMin; }
cXyz* GetMinP() { return &mMin; }
const f32 GetMaxX() const { return mMax.x; }
const f32 GetMaxY() const { return mMax.y; }
const f32 GetMaxZ() const { return mMax.z; }
const f32 GetMinX() const { return mMin.x; }
const f32 GetMinY() const { return mMin.y; }
const f32 GetMinZ() const { return mMin.z; }
bool Cross(const cM3dGLin *param_1) const {
return cM3d_Cross_MinMaxBoxLine(GetMinP(), GetMaxP(), (Vec*)&param_1->GetStartP(), (Vec*)&param_1->GetEndP());
return cM3d_Cross_MinMaxBoxLine(GetMinP(), GetMaxP(), param_1->GetStartP(), param_1->GetEndP());
}
bool Cross(const cM3dGAab *param_1) const {
return cM3d_Cross_AabAab(this, param_1);
Expand Down
6 changes: 4 additions & 2 deletions include/SSystem/SComponent/c_m3d_g_cps.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include "SSystem/SComponent/c_m3d.h"
#include "SSystem/SComponent/c_m3d_g_lin.h"
#include "SSystem/SComponent/c_m3d_g_tri.h"

struct cM3dGCpsS {
/* 0x00 */ Vec mStart;
Expand All @@ -14,8 +15,8 @@ class cM3dGCps : public cM3dGLin {
public:
/* 0x1C */ f32 mRadius;

cM3dGCps(void);
virtual ~cM3dGCps(void);
cM3dGCps();
virtual ~cM3dGCps();
void Set(const cXyz&, const cXyz&, f32);
void Set(const cM3dGCpsS&);
void SetCps(const cM3dGCps&);
Expand All @@ -24,6 +25,7 @@ class cM3dGCps : public cM3dGLin {
}
bool Cross(cM3dGCyl const* cyl, cXyz* xyz) const { return cM3d_Cross_CpsCyl(*this, *cyl, xyz); }
bool Cross(cM3dGSph const* sph, cXyz* xyz) const { return cM3d_Cross_CpsSph(*this, *sph, xyz); }
bool Cross(cM3dGTri const& tri, cXyz* xyz) const { return cM3d_Cross_CpsTri(*this, tri, xyz); }
void SetR(f32 r) { mRadius = r; }
f32 GetR() const { return mRadius; }

Expand Down
4 changes: 2 additions & 2 deletions include/SSystem/SComponent/c_m3d_g_cyl.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class cM3dGCyl {

bool Cross(const cM3dGCps* cps, cXyz* xyz) const { return cM3d_Cross_CpsCyl(*cps, *this, xyz); }
bool Cross(const cM3dGTri& tri, cXyz* xyz) const { return cM3d_Cross_CylTri(this, &tri, xyz); }
bool Cross(const cM3dGCyl* other, f32* f) const { return cM3d_Cross_CylCyl(this, other, f); }
bool Cross(const cM3dGSph* sph, f32* f) const { return cM3d_Cross_CylSph(this, sph, f); }
bool cross(const cM3dGCyl* other, f32* f) const { return cM3d_Cross_CylCyl(this, other, f); }
bool cross(const cM3dGSph* sph, f32* f) const { return cM3d_Cross_CylSph(this, sph, f); }
}; // Size = 0x18

STATIC_ASSERT(0x18 == sizeof(cM3dGCyl));
Expand Down
8 changes: 4 additions & 4 deletions include/SSystem/SComponent/c_m3d_g_lin.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ class cM3dGLin {
void SetEnd(const cXyz&);

void set(const Vec& i_start, const Vec& i_end) { SetStartEnd(i_start, i_end); }
const cXyz& GetStartP(void) const { return mStart; }
cXyz& GetStartP(void) { return mStart; }
const cXyz* GetStartP() const { return &mStart; }
cXyz* GetStartP() { return &mStart; }
cXyz& GetStart() { return mStart; }
const cXyz& GetStart() const { return mStart; }

const cXyz& GetEndP(void) const { return mEnd; }
cXyz& GetEndP(void) { return mEnd; }
const cXyz* GetEndP() const { return &mEnd; }
cXyz* GetEndP() { return &mEnd; }
cXyz& GetEnd() { return mEnd; }
const cXyz& GetEnd() const { return mEnd; }
f32 GetLen() const { return PSVECDistance(&mStart, &mEnd); }
Expand Down
5 changes: 3 additions & 2 deletions include/SSystem/SComponent/c_m3d_g_sph.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ class cM3dGSph {
f32 GetCY(void) const { return mCenter.y; }
f32 GetCZ(void) const { return mCenter.z; }

bool Cross(const cM3dGSph* other, f32* f) const { return cM3d_Cross_SphSph(this, other, f); }
bool cross(const cM3dGSph* other, f32* f) const { return cM3d_Cross_SphSph(this, other, f); }
bool Cross(const cM3dGCps* cps, cXyz* xyz) const { return cM3d_Cross_CpsSph(*cps, *this, xyz); }
bool Cross(const cM3dGCyl* cyl, f32* f) const { return cM3d_Cross_CylSph(cyl, this, f); }
bool cross(const cM3dGCyl* cyl, f32* f) const { return cM3d_Cross_CylSph(cyl, this, f); }
bool Cross(const cM3dGTri& tri, cXyz* xyz) const { return cM3d_Cross_SphTri(this, &tri, xyz); }
}; // Size = 0x14

STATIC_ASSERT(0x14 == sizeof(cM3dGSph));
Expand Down
8 changes: 4 additions & 4 deletions include/SSystem/SComponent/c_m3d_g_tri.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ class cM3dGTri : public cM3dGPla {
void setPos(const Vec*, const Vec*, const Vec*);
void setBg(const Vec*, const Vec*, const Vec*, const cM3dGPla*);
void set(const Vec*, const Vec*, const Vec*, const Vec*);
bool Cross(cM3dGCps const& cps, cXyz* xyz) const { return cM3d_Cross_CpsTri(cps, *this, xyz); }
bool Cross(cM3dGCyl const& cyl, cXyz* xyz) const { return this->cross(&cyl, xyz); }
bool Cross(cM3dGSph const& sph, cXyz* xyz) const { return cM3d_Cross_SphTri(&sph, this, xyz); }
bool Cross(cM3dGTri const& other, cXyz* xyz) const {
bool Cross(cM3dGCps const& cps, Vec* xyz) const { return cM3d_Cross_CpsTri(cps, *this, xyz); }
bool Cross(cM3dGCyl const& cyl, Vec* xyz) const { return this->cross(&cyl, xyz); }
bool Cross(cM3dGSph const& sph, Vec* xyz) const { return cM3d_Cross_SphTri(&sph, this, xyz); }
bool Cross(cM3dGTri const& other, Vec* xyz) const {
return cM3d_Cross_TriTri(*this, other, xyz);
}
bool cross(const cM3dGLin* lin, Vec* xyz, bool param_2, bool param_3) const {
Expand Down
10 changes: 5 additions & 5 deletions include/d/d_cc_d.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class dCcD_GAtTgCoCommonBase {
void ClrEffCounter() { mEffCounter = 0; }
u32 GetGFlag() const { return mGFlag; }
u32 GetRPrm() const { return mRPrm; }
u32 MskSPrm(u32 mask) const { return mGFlag & mask; }
u32 MskSPrm(u32 mask) { return mGFlag & mask; }
u32 MskRPrm(u32 mask) const { return mRPrm & mask; }
bool ChkSPrm(u32 mask) { return MskSPrm(mask); }
void OnSPrm(u32 flag) { mGFlag |= flag; }
Expand Down Expand Up @@ -173,7 +173,7 @@ class dCcD_GObjAt : public dCcD_GAtTgCoCommonBase {
u8 GetSe() { return mSe; }
dCcG_At_Spl GetSpl() { return (dCcG_At_Spl)mSpl; }
u8 GetMtrl() { return mMtrl; }
u8 GetHitMark() { return mHitMark; }
int GetHitMark() { return mHitMark; }
void SetRVec(cXyz& vec) { mRVec = vec; }
void SetHitPos(cXyz& pos) { mHitPos = pos; }
cXyz* GetHitPosP() { return &mHitPos; }
Expand Down Expand Up @@ -203,10 +203,10 @@ class dCcD_GObjTg : public dCcD_GAtTgCoCommonBase {
void SetHitMark(CcG_Tg_HitMark mark) { mHitMark = mark; }
s16* GetShieldFrontRangeYAngle() { return mShieldFrontRangeYAngle; }
s16 GetShieldRange() { return mShieldRange; }
u8 GetSpl() { return mSpl; }
int GetSpl() { return mSpl; }
void SetSpl(dCcG_Tg_Spl tg_spl) { mSpl = tg_spl; }
void SetSpl(u8 tg_spl) { mSpl = tg_spl; }
u8 GetHitMark() { return mHitMark; }
int GetHitMark() { return mHitMark; }
void SetRVec(cXyz& vec) { mRVec = vec; }
cXyz* GetVecP() { return &mVec; }
cXyz* GetRVecP() { return &mRVec; }
Expand Down Expand Up @@ -250,7 +250,7 @@ class dCcD_GStts : public cCcD_GStts {
void SetRoomId(int id) { mRoomId = id; }
fpc_ProcID GetAtOldApid() { return mAtOldApid; }
fpc_ProcID GetTgOldApid() { return mTgOldApid; }
bool ChkNoActor() { return field_0x1C & 1;}
BOOL ChkNoActor() { return field_0x1C & 1;}
bool ChkNoneActorPerfTblId() { return field_0x08 == 0xFFFF; }
dCcG_At_Spl GetAtSpl() { return (dCcG_At_Spl)mAt; }
void SetAtSpl(dCcG_At_Spl spl) { mAt = spl; }
Expand Down
8 changes: 4 additions & 4 deletions include/d/d_cc_mass_s.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class dCcMassS_Obj {
private:
/* 0x00 */ cCcD_Obj* mpObj;
/* 0x04 */ u8 mPriority;
/* 0x08 */ dCcMassS_ObjCallback mpCallback;
/* 0x08 */ dCcMassS_ObjCallback mpAreaCheckFunc;
/* 0x0C */ cCcD_DivideInfo mDivideInfo;
/* 0x1C vtable */

Expand All @@ -19,10 +19,10 @@ class dCcMassS_Obj {
void Set(cCcD_Obj* p_obj, u8 priority, dCcMassS_ObjCallback callback);
void Clear();

cCcD_Obj* GetObj() { return mpObj; }
cCcD_Obj* GetObj() const { return mpObj; }
u8 GetPriority() const { return mPriority; }
dCcMassS_ObjCallback GetCallback() const { return mpCallback; }
cCcD_DivideInfo& GetDivideInfo() { return mDivideInfo; }
dCcMassS_ObjCallback GetAreaCheckFunc() const { return mpAreaCheckFunc; }
cCcD_DivideInfo* GetPDivideInfo() { return &mDivideInfo; }
}; // Size = 0x20

STATIC_ASSERT(0x20 == sizeof(dCcMassS_Obj));
Expand Down
12 changes: 11 additions & 1 deletion include/d/d_cc_s.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ class dCcS : public cCcS {
virtual void MoveAfterCheck();
virtual void CalcParticleAngle(dCcD_GObjInf*, cCcD_Stts*, cCcD_Stts*, csXyz*);

#if DEBUG
void OnMassAllTimer() {
m_is_mass_all_timer = 1;
}

void OffMassAllTimer() {
m_is_mass_all_timer = 0;
}
#endif

void SetMass(cCcD_Obj* i_obj, u8 i_priority) { mMass_Mng.Set(i_obj, i_priority); }
void SetMassCam(cM3dGCps& i_cps) { mMass_Mng.SetCam(i_cps); }
u32 GetMassResultCam() { return mMass_Mng.GetResultCam(); }
Expand All @@ -70,7 +80,7 @@ class dCcS : public cCcS {
// /* 0x0000 */ cCcS mCCcS;
/* 0x284C */ dCcMassS_Mng mMass_Mng;
#if DEBUG
/* 0x2AD0 */ u8 field_0x2ad0;
/* 0x2AD0 */ u8 m_is_mass_all_timer;
#endif
}; // Size = 0x2AC4

Expand Down
7 changes: 6 additions & 1 deletion include/d/d_jnt_col.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class dJntCol_c {
void offPassNum(int num) { field_0xc &= ~(1 << num); }
bool checkShieldType(int i) { return getType(i) == 3; }

s8 getType(int i) { return mData[i].mType; }
int getType(int i) { return mData[i].mType; }
int getJntNum(int i) { return (s16)mData[i].mJntNum; }

/* 0x00 */ const dJntColData_c* mData;
Expand Down Expand Up @@ -64,4 +64,9 @@ class dJntCol_HIO_c : public JORReflexible {

};

#if DEBUG
void dJntCol_setDebugHIO();
void dJntCol_deleteDebugHIO();
#endif

#endif /* D_D_JNT_COL_H */
Loading
Loading