more SComponent

This commit is contained in:
lepelog
2021-04-08 22:18:35 +02:00
parent 745c9eb2cd
commit 10734701d5
72 changed files with 723 additions and 2120 deletions
@@ -1,6 +1,37 @@
#ifndef C_API_CONTROLLER_PAD_H
#define C_API_CONTROLLER_PAD_H
#ifndef C_API_CONTROLLER_PAD_
#define C_API_CONTROLLER_PAD_
#include "dolphin/types.h"
#endif /* C_API_CONTROLLER_PAD_H */
struct interface_of_controller_pad {
f32 mMainStickPosX;
f32 mMainStickPosY;
f32 mMainStickValue;
s16 mMainStickAngle;
u8 field_0xe;
u8 field_0xf;
f32 mCStickPosX;
f32 mCStickPosY;
f32 mCStickValue;
s16 mCStickAngle;
u8 field_0x1e;
u8 field_0x1f;
f32 mAnalogA;
f32 mAnalogB;
f32 mTriggerLeft;
f32 mTriggerRight;
u32 mButtonFlags;
u32 mPressedButtonFlags;
s8 mGamepadErrorFlags;
u8 field_0x39;
u8 field_0x3a;
u8 field_0x3b;
u8 field_0x3c;
u8 field_0x3d;
u8 field_0x3e;
u8 field_0x3f;
};
void cAPICPad_recalibrate(void);
#endif
+14
View File
@@ -3,4 +3,18 @@
#include "dolphin/types.h"
class cBgS_Chk {
private:
/* 0x0 */ u32 unk_0x00;
/* 0x4 */ u32 unk_0x04;
/* 0x8 */ u32 unk_0x08;
/* 0xC */ u8 unk_0x0C;
/* 0x10 */ // __vtable__
public:
cBgS_Chk(void);
virtual ~cBgS_Chk(void);
void SetExtChk(cBgS_Chk&);
bool ChkSameActorPid(unsigned int) const;
};
#endif /* C_BG_S_CHK_H */
@@ -2,5 +2,18 @@
#define C_BG_S_GND_CHK_H
#include "dolphin/types.h"
#include "SSystem/SComponent/c_bg_s_chk.h"
#include "SSystem/SComponent/c_xyz.h"
class cBgS_GndChk : public cBgS_Chk {
private:
// poly info
public:
cBgS_GndChk(void);
virtual ~cBgS_GndChk(void);
void SetPos(const Vec*);
void SetPos(const cXyz*);
void PreCheck(void);
};
#endif /* C_BG_S_GND_CHK_H */
@@ -2,5 +2,15 @@
#define C_BG_S_LIN_CHK_H
#include "dolphin/types.h"
#include "SSystem/SComponent/c_xyz.h"
class cBgS_LinChk {
public:
cBgS_LinChk(void);
~cBgS_LinChk(void);
void ct(void);
void Set2(const cXyz*, const cXyz*, unsigned int);
void PreCalc(void);
};
#endif /* C_BG_S_LIN_CHK_H */
@@ -3,4 +3,23 @@
#include "dolphin/types.h"
class cBgS_PolyInfo {
private:
/* 0x00 */ u16 mPolyIndex;
/* 0x02 */ u16 unk_0x02;
/* 0x04 */ void* unk_0x04;
/* 0x08 */ u32 unk_0x08;
public:
cBgS_PolyInfo(void);
virtual ~cBgS_PolyInfo(void);
bool ChkSetInfo(void) const;
void ClearPi(void);
void SetPolyInfo(const cBgS_PolyInfo&);
void SetActorInfo(int, void*, unsigned int);
bool ChkSafe(const void*, unsigned int) const;
void SetPolyIndex(int);
bool ChkBgIndex(void) const;
};
#endif /* C_BG_S_POLY_INFO_H */
@@ -2,5 +2,19 @@
#define C_BG_S_SHDW_DRAW_H
#include "dolphin/types.h"
#include "SSystem/SComponent/c_m3d_g_pla.h"
#include "SSystem/SComponent/c_xyz.h"
struct cBgD_Vtx_t;
typedef int (*cBgS_ShdwDraw_Callback)(class cBgS_ShdwDraw*, cBgD_Vtx_t*, int, int, int, cM3dGPla*);
class cBgS_ShdwDraw {
public:
cBgS_ShdwDraw(void);
~cBgS_ShdwDraw(void);
void Set(cXyz&, cXyz&);
void SetCallback(cBgS_ShdwDraw_Callback);
};
#endif /* C_BG_S_SHDW_DRAW_H */
+15
View File
@@ -3,4 +3,19 @@
#include "dolphin/types.h"
class cBgW_BgId {
public:
void Regist(int a1);
void Release();
unsigned int ChkUsed() const;
private:
unsigned short mId;
};
bool cBgW_CheckBGround(float a1);
bool cBgW_CheckBRoof(float a1);
bool cBgW_CheckBWall(float a1);
#endif /* C_BG_W_H */
+4
View File
@@ -3,4 +3,8 @@
#include "dolphin/types.h"
struct cM2dGCir;
void cM2d_CrossCirLin(cM2dGCir&, float, float, float, float, float*, float*);
#endif /* C_M2D_H */
+24 -24
View File
@@ -18,7 +18,7 @@ struct Vec;
extern f32 G_CM3D_F_ABS_MIN;
void cM3d_InDivPos1(const Vec*, const Vec*, f32, Vec*);
static void cM3d_InDivPos1(const Vec*, const Vec*, f32, Vec*);
void cM3d_InDivPos2(const Vec*, const Vec*, f32, Vec*);
f32 cM3d_Len2dSq(f32, f32, f32, f32);
bool cM3d_Len2dSqPntAndSegLine(f32, f32, f32, f32, f32, f32, f32*, f32*, f32*);
@@ -30,53 +30,53 @@ void cM3d_CalcPla(const Vec*, const Vec*, const Vec*, Vec*, f32*);
bool cM3d_Cross_AabAab(const cM3dGAab*, const cM3dGAab*);
bool cM3d_Cross_AabCyl(const cM3dGAab*, const cM3dGCyl*);
bool cM3d_Cross_AabSph(const cM3dGAab*, const cM3dGSph*);
int cM3d_Check_LinLin(const cM3dGLin*, const cM3dGLin*, f32*, f32*);
bool cM3d_CrossInfLineVsInfPlane_proc(f32, f32, const Vec*, const Vec*, Vec*);
static int cM3d_Check_LinLin(const cM3dGLin*, const cM3dGLin*, f32*, f32*);
static bool cM3d_CrossInfLineVsInfPlane_proc(f32, f32, const Vec*, const Vec*, Vec*);
bool cM3d_Cross_LinPla(const cM3dGLin*, const cM3dGPla*, Vec*, bool, bool);
bool cM3d_Cross_MinMaxBoxLine(const Vec*, const Vec*, const Vec*, const Vec*);
bool cM3d_InclusionCheckPosIn3PosBox3d(const Vec*, const Vec*, const Vec*, const Vec*, f32);
bool cM3d_InclusionCheckPosIn3PosBox2d(f32, f32, f32, f32, f32, f32, f32, f32, f32);
bool cM3d_CrossX_Tri(const cM3dGTri*, const Vec*, f32);
bool cM3d_CrossX_Tri(const cM3dGTri*, const Vec*);
bool cM3d_CrossX_LinTri_proc(const cM3dGTri*, const Vec*);
static bool cM3d_InclusionCheckPosIn3PosBox3d(const Vec*, const Vec*, const Vec*, const Vec*, f32);
static bool cM3d_InclusionCheckPosIn3PosBox2d(f32, f32, f32, f32, f32, f32, f32, f32, f32);
static bool cM3d_CrossX_Tri(const cM3dGTri*, const Vec*, f32);
static bool cM3d_CrossX_Tri(const cM3dGTri*, const Vec*);
static bool cM3d_CrossX_LinTri_proc(const cM3dGTri*, const Vec*);
bool cM3d_CrossY_Tri(const cM3dGTri*, const Vec*);
bool cM3d_CrossY_LinTri_proc(const cM3dGTri*, const Vec*);
static bool cM3d_CrossY_LinTri_proc(const cM3dGTri*, const Vec*);
bool cM3d_CrossY_Tri(const Vec&, const Vec&, const Vec&, const cM3dGPla&, const Vec*);
bool cM3d_CrossY_Tri_Front(const Vec&, const Vec&, const Vec&, const Vec*);
bool cM3d_CrossY_Tri(const cM3dGTri*, const Vec*, f32*);
bool cM3d_CrossY_Tri(const cM3dGTri*, const Vec*, f32);
bool cM3d_CrossY_Tri(const cM3dGTri*, const Vec*, const cM3d_Range*, f32*);
bool cM3d_CrossZ_Tri(const cM3dGTri*, const Vec*, f32);
bool cM3d_CrossZ_Tri(const cM3dGTri*, const Vec*);
bool cM3d_CrossZ_LinTri_proc(const cM3dGTri*, const Vec*);
static bool cM3d_CrossY_Tri(const cM3dGTri*, const Vec*, f32*);
static bool cM3d_CrossY_Tri(const cM3dGTri*, const Vec*, f32);
static bool cM3d_CrossY_Tri(const cM3dGTri*, const Vec*, const cM3d_Range*, f32*);
static bool cM3d_CrossZ_Tri(const cM3dGTri*, const Vec*, f32);
static bool cM3d_CrossZ_Tri(const cM3dGTri*, const Vec*);
static bool cM3d_CrossZ_LinTri_proc(const cM3dGTri*, const Vec*);
bool cM3d_Cross_LinTri(const cM3dGLin*, const cM3dGTri*, Vec*, bool, bool);
bool cM3d_Cross_LinTri_Easy(const cM3dGTri*, const Vec*);
bool cM3d_Cross_SphPnt(const cM3dGSph*, const Vec*);
static bool cM3d_Cross_LinTri_Easy(const cM3dGTri*, const Vec*);
static bool cM3d_Cross_SphPnt(const cM3dGSph*, const Vec*);
bool cM3d_Cross_LinSph(const cM3dGLin*, const cM3dGSph*, Vec*);
int cM3d_Cross_LinSph_CrossPos(const cM3dGSph&, const cM3dGLin&, Vec*, Vec*);
bool cM3d_Cross_CylSph(const cM3dGCyl*, const cM3dGSph*, f32*);
bool cM3d_Cross_CylSph(const cM3dGCyl*, const cM3dGSph*, Vec*, f32*);
bool cM3d_Cross_SphSph(const cM3dGSph*, const cM3dGSph*, f32*);
bool cM3d_Cross_SphSph(const cM3dGSph*, const cM3dGSph*, f32*, f32*);
static bool cM3d_Cross_SphSph(const cM3dGSph*, const cM3dGSph*, f32*, f32*);
bool cM3d_Cross_SphSph(const cM3dGSph*, const cM3dGSph*, Vec*);
void cM3d_CalcSphVsTriCrossPoint(const cM3dGSph*, const cM3dGTri*, Vec*);
static void cM3d_CalcSphVsTriCrossPoint(const cM3dGSph*, const cM3dGTri*, Vec*);
bool cM3d_Cross_SphTri(const cM3dGSph*, const cM3dGTri*, Vec*);
bool cM3d_Cross_CylCyl(const cM3dGCyl*, const cM3dGCyl*, f32*);
bool cM3d_Cross_CylCyl(const cM3dGCyl*, const cM3dGCyl*, Vec*);
bool cM3d_Cross_CylTri(const cM3dGCyl*, const cM3dGTri*, Vec*);
int cM3d_Cross_CylLin(const cM3dGCyl*, const cM3dGLin*, Vec*, Vec*);
int cM3d_Cross_CylPntPnt(const cM3dGCyl*, const Vec*, const Vec*, Vec*, Vec*);
bool cM3d_Cross_CylPnt(const cM3dGCyl*, const Vec*);
static int cM3d_Cross_CylPntPnt(const cM3dGCyl*, const Vec*, const Vec*, Vec*, Vec*);
static bool cM3d_Cross_CylPnt(const cM3dGCyl*, const Vec*);
bool cM3d_Cross_CpsCps(const cM3dGCps&, const cM3dGCps&, Vec*);
bool cM3d_Cross_CpsCyl(const cM3dGCps&, const cM3dGCyl&, Vec*);
bool cM3d_Cross_CpsSph_CrossPos(const cM3dGCps&, const cM3dGSph&, const Vec&, Vec*);
static bool cM3d_Cross_CpsSph_CrossPos(const cM3dGCps&, const cM3dGSph&, const Vec&, Vec*);
bool cM3d_Cross_CpsSph(const cM3dGCps&, const cM3dGSph&, Vec*);
bool cM3d_Cross_TriTri(const cM3dGTri&, const cM3dGTri&, Vec*);
bool cM3d_Cross_CpsTri(const cM3dGCps&, cM3dGTri, Vec*);
void cM3d_CalcVecAngle(const Vec&, short*, short*);
void cM3d_CalcVecZAngle(const Vec&, csXyz*);
void cM3d_PlaneCrossLineProcWork(f32, f32, f32, f32, f32, f32, f32, f32*, f32*);
int cM3d_2PlaneCrossLine(const cM3dGPla&, const cM3dGPla&, cM3dGLin*);
static void cM3d_PlaneCrossLineProcWork(f32, f32, f32, f32, f32, f32, f32, f32*, f32*);
static int cM3d_2PlaneCrossLine(const cM3dGPla&, const cM3dGPla&, cM3dGLin*);
bool cM3d_3PlaneCrossPos(const cM3dGPla&, const cM3dGPla&, const cM3dGPla&, Vec*);
f32 cM3d_lineVsPosSuisenCross(const cM3dGLin*, const Vec*, Vec*);
f32 cM3d_lineVsPosSuisenCross(const Vec&, const Vec&, const Vec&, Vec*);