mirror of
https://github.com/zeldaret/tp
synced 2026-07-11 15:28:38 -04:00
d_a_npc work
daBaseNpc_c::setBckAnm and J3DAnmTransform* daBaseNpc_c daBaseNpc_c::setBtpAnm daBaseNpc_c::attnSttsOn daBaseNpc_c::orderEvent daBaseNpc_c::setEnvTevColor daBaseNpc_c::setRoomNo daBaseNpc_c::checkEndAnm attempt CheckCreateHeap daNpcF_addIdx daNpcF_subIdx daNpcF_incIdx daNpcF_decIdx daNpcF_ActorMngr_c::initialize() daNpcF_ActorMngr_c::entry cleanup daNpcF_ActorMngr_c::entry daNpcF_ActorMngr_c::remove daNpcF_ActorMngr_c::getActorP daNpcF_MatAnm_c::calc attempt daNpcF_SPCurve_c::initialize minor fixes daNpcF_Path_c::initialize daNpcF_Path_c::setPathInfo daNpcF_Path_c::chkPassed daNpcF_Path_c::reverse daNpcF_Path_c::setNextIdx daNpcF_Path_c::getNextIdx daNpcF_Path_c::getBeforeIdx daNpcF_Path_c::getBeforePos daNpcF_Path_c::getNextPos daNpcT_MatAnm_c::initialize daNpcT_MatAnm_c::calc daNpcT_addIdx daNpcT_subIdx daNpcT_decIdx daNpcT_Path_c::hermite daNpcT_Path_c::initialize daNpcT_Path_c::setPathInfo attempt daNpcT_Path_c::setNextPathInfo daNpcT_Path_c::reverse daNpcT_Path_c::setNextIdx daNpcT_Path_c::getDstPos attempt daNpcT_DmgStagger_c::setParam Add FLOAT_LABEL where possible fopEn_enemy / fix e_wb move jasper's jsystem work over d_attention / d_demo / d_lib work remove asm clean up dolphin files / work on some rels (#212) * d_a_alldie / d_a_tboxSw / d_a_tag_gstart / d_a_tag_hstop * dolphin OS work / cleanup * dolphin GX work / cleanup * finish changing dolphin files to C * more files into C * match rest of MSL_C math functions * more dolphin files converted to C * remove asm * d_bg_w work * remove asm * d_a_alink work / kytag14 initial changes to d_a_e_yc checkpoint until virtual destructor issue is solved daNpcF_Lookat_c::adjustMoveDisAngle daBaseNpc_c::setMtx daBaseNpc_moveBgActor_c::daBaseNpc_moveBgActor_c() daNpcT_c::ctrlFaceMotion daNpcT_c::ctrlMsgAnm attempt daNpcT_c::initTalk daNpcF_clearMessageTmpBit daNpcF_getDistTableIdx daNpcF_offTmpBit daNpcF_onTmpBit daNpcF_chkTmpBit daNpcF_onEvtBit daNpcF_chkEvtBit daNpcF_c::getDistTableIdx daNpcF_chkPointInArea daNpcF_chkDoBtnEqSpeak daNpcF_getPlayerInfoFromPlayerList attempt daNpcF_pntVsLineSegmentLengthSquare2D daNpcF_c::chkPointInArea daNpcF_c::chkPointInArea daNpcF_c::getAttentionPos daNpcT_chkTmpBit daNpcT_offTmpBit daNpcT_onTmpBit daNpcT_chkEvtBit daNpcT_offEvtBit daNpcT_onEvtBit daNpcT_chkDoBtnIsSpeak daNpcT_getDistTableIdx daBaseNpc_acMngr_c::entry daNpcF_c::initTalk undo override
This commit is contained in:
@@ -27,6 +27,7 @@ public:
|
||||
u32 GetActorPid() const { return mActorPid; }
|
||||
void SetPolyPassChk(cBgS_PolyPassChk* p_chk) { mPolyPassChk = p_chk; }
|
||||
void SetGrpPassChk(cBgS_GrpPassChk* p_chk) { mGrpPassChk = p_chk; }
|
||||
cBgS_PolyPassChk* GetPolyPassChk() const { return mPolyPassChk; }
|
||||
|
||||
virtual ~cBgS_Chk(void);
|
||||
}; // Size: 0x14
|
||||
|
||||
@@ -8,15 +8,15 @@
|
||||
#include "dolphin/types.h"
|
||||
|
||||
class cBgS_LinChk : public cBgS_Chk, public cBgS_PolyInfo {
|
||||
private:
|
||||
/* 0x024 */ cM3dGLin mLinP;
|
||||
public:
|
||||
/* 0x024 */ cM3dGLin mLin;
|
||||
/* 0x040 */ cXyz field_0x40;
|
||||
/* 0x04C */ u32 field_0x4c;
|
||||
/* 0x050 */ bool mPreWallChk;
|
||||
/* 0x051 */ bool mPreGroundChk;
|
||||
/* 0x052 */ bool mPreRoofChk;
|
||||
/* 0x053 */ u8 mFrontFlag;
|
||||
/* 0x054 */ u8 mBackFlag;
|
||||
/* 0x053 */ bool mFrontFlag;
|
||||
/* 0x054 */ bool mBackFlag;
|
||||
|
||||
public:
|
||||
cBgS_LinChk();
|
||||
@@ -30,6 +30,13 @@ public:
|
||||
void ClrHit() { field_0x4c &= ~16; }
|
||||
void SetHit() { field_0x4c |= 16; }
|
||||
u32 ChkHit() const { return field_0x4c & 16; }
|
||||
void SetCross(const cXyz& pos) { mLin.SetEnd(pos); }
|
||||
cM3dGLin* GetLinP() { return &mLin; }
|
||||
bool ChkBackFlag() const { return mBackFlag; }
|
||||
bool ChkFrontFlag() const { return mFrontFlag; }
|
||||
bool GetPreWallChk() const { return mPreWallChk; }
|
||||
bool GetPreGroundChk() const { return mPreGroundChk; }
|
||||
bool GetPreRoofChk() const { return mPreRoofChk; }
|
||||
};
|
||||
|
||||
#endif /* C_BG_S_LIN_CHK_H */
|
||||
|
||||
@@ -87,5 +87,9 @@ void cM3d_CrawVec(const Vec&, const Vec&, Vec*);
|
||||
inline bool cM3d_IsZero(f32 f) {
|
||||
return fabsf(f) < G_CM3D_F_ABS_MIN;
|
||||
}
|
||||
// this is the inline cM3d_IsZero but inverted. Sometimes this will get a match where the regular cM3d_IsZero inline won't
|
||||
inline bool cM3d_IsZero_inverted(f32 param_0) {
|
||||
return !(fabsf(param_0) < G_CM3D_F_ABS_MIN);
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -26,12 +26,12 @@ public:
|
||||
void PlusR(f32);
|
||||
const cXyz& getMaxP(void) const { return mMax; }
|
||||
const cXyz& getMinP(void) const { return mMin; }
|
||||
const f32 GetMaxX(void) const { return mMax.GetX(); }
|
||||
const f32 GetMaxY(void) const { return mMax.GetY(); }
|
||||
const f32 GetMaxZ(void) const { return mMax.GetZ(); }
|
||||
const f32 GetMinX(void) const { return mMin.GetX(); }
|
||||
const f32 GetMinY(void) const { return mMin.GetY(); }
|
||||
const f32 GetMinZ(void) const { return mMin.GetZ(); }
|
||||
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; }
|
||||
}; // Size = 0x1C
|
||||
|
||||
STATIC_ASSERT(0x1C == sizeof(cM3dGAab));
|
||||
|
||||
@@ -2,26 +2,34 @@
|
||||
#define C_M3C_G_PLA_H_
|
||||
|
||||
#include "SSystem/SComponent/c_xyz.h"
|
||||
#include "SSystem/SComponent/c_m3d.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
// Plane with a normal
|
||||
class cM3dGPla {
|
||||
public:
|
||||
cXyz mNormal;
|
||||
f32 mD;
|
||||
/* 0x00 */ cXyz mNormal;
|
||||
/* 0x0C */ f32 mD;
|
||||
/* 0x10 vtable */
|
||||
|
||||
cM3dGPla() {}
|
||||
cM3dGPla(const cXyz*, f32);
|
||||
virtual ~cM3dGPla() {}
|
||||
bool crossInfLin(const cXyz&, const cXyz&, cXyz&) const;
|
||||
void SetupNP0(const Vec&, const Vec&);
|
||||
void SetupNP(const Vec&, const Vec&);
|
||||
bool getCrossY(const cXyz&, f32*) const;
|
||||
bool getCrossYLessD(const Vec&, f32*) const;
|
||||
void Set(const cM3dGPla*);
|
||||
void GetNP();
|
||||
|
||||
virtual ~cM3dGPla() {}
|
||||
|
||||
f32 getPlaneFunc(const Vec* pPoint) const { return mD + PSVECDotProduct(&mNormal, pPoint); }
|
||||
const cXyz& GetNP() const { return mNormal; }
|
||||
void GetNP();
|
||||
f32 GetD() const { return mD; }
|
||||
void SetupFrom3Vtx(const Vec* v1, const Vec* v2, const Vec* v3) {
|
||||
cM3d_CalcPla(v1, v2, v3, &mNormal, &mD);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -29,9 +29,9 @@ public:
|
||||
void GetMinMaxCube(cXyz&, cXyz&) const;
|
||||
const cXyz& GetC(void) const { return mCenter; }
|
||||
const f32 GetR(void) const { return mRadius; }
|
||||
f32 GetCX(void) const { return mCenter.GetX(); }
|
||||
f32 GetCY(void) const { return mCenter.GetY(); }
|
||||
f32 GetCZ(void) const { return mCenter.GetZ(); }
|
||||
f32 GetCX(void) const { return mCenter.x; }
|
||||
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 cM3dGCps* cps, cXyz* xyz) const { return cM3d_Cross_CpsSph(*cps, *this, xyz); }
|
||||
|
||||
@@ -27,6 +27,9 @@ public:
|
||||
bool Cross(cM3dGTri const& other, cXyz* xyz) const {
|
||||
return cM3d_Cross_TriTri(*this, other, xyz);
|
||||
}
|
||||
bool cross(const cM3dGLin* lin, Vec* xyz, bool param_2, bool param_3) const {
|
||||
return cM3d_Cross_LinTri(lin, this, xyz, param_2, param_3);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -18,6 +18,18 @@ public:
|
||||
s16 GetX() const { return x; }
|
||||
s16 GetY() const { return y; }
|
||||
s16 GetZ() const { return z; }
|
||||
|
||||
void set(s16 oX, s16 oY, s16 oZ) {
|
||||
x = oX;
|
||||
y = oY;
|
||||
z = oZ;
|
||||
}
|
||||
|
||||
void setall(s16 val) {
|
||||
x = val;
|
||||
y = val;
|
||||
z = val;
|
||||
}
|
||||
};
|
||||
|
||||
#endif /* C_SXYZ_H */
|
||||
|
||||
@@ -41,6 +41,8 @@ struct cXyz : Vec {
|
||||
/* 80266B84 */ cXyz operator*(f32) const;
|
||||
/* 80266BD0 */ cXyz operator*(Vec const&) const;
|
||||
/* 80266C18 */ cXyz operator/(f32) const;
|
||||
/* 800977D8 */ // void operator=(cXyz const&);
|
||||
|
||||
void operator+=(f32 f) {
|
||||
x += f;
|
||||
y += f;
|
||||
@@ -72,6 +74,22 @@ struct cXyz : Vec {
|
||||
/* 80267128 */ s16 atan2sX_Z() const;
|
||||
/* 80267150 */ s16 atan2sY_XZ() const;
|
||||
|
||||
void set(f32 pX, f32 pY, f32 pZ) {
|
||||
x = pX;
|
||||
y = pY;
|
||||
z = pZ;
|
||||
}
|
||||
|
||||
void set(const Vec& other) {
|
||||
x = other.x;
|
||||
y = other.y;
|
||||
z = other.z;
|
||||
}
|
||||
|
||||
f32 getXDiff(const Vec* other) const { return x - other->x; }
|
||||
f32 getYDiff(const Vec* other) const { return y - other->y; }
|
||||
f32 getZDiff(const Vec* other) const { return z - other->z; }
|
||||
|
||||
void setAll(f32 f) { set(f, f, f); }
|
||||
|
||||
void setMin(const cXyz& other) {
|
||||
|
||||
Reference in New Issue
Block a user