diff options
| author | lepelog <lepelog@users.noreply.github.com> | 2021-04-08 22:18:35 +0200 |
|---|---|---|
| committer | lepelog <lepelog@users.noreply.github.com> | 2021-04-08 22:18:35 +0200 |
| commit | 10734701d5116e6073f32eed8a0faaabec59caca (patch) | |
| tree | b67f3e731d65c6a7b7fcd5437a0178e72af875ad /include/SSystem/SComponent | |
| parent | 745c9eb2cd67796986d44fc765406b08e2fe55b0 (diff) | |
more SComponent
Diffstat (limited to 'include/SSystem/SComponent')
| -rw-r--r-- | include/SSystem/SComponent/c_API_controller_pad.h | 37 | ||||
| -rw-r--r-- | include/SSystem/SComponent/c_bg_s_chk.h | 14 | ||||
| -rw-r--r-- | include/SSystem/SComponent/c_bg_s_gnd_chk.h | 13 | ||||
| -rw-r--r-- | include/SSystem/SComponent/c_bg_s_lin_chk.h | 10 | ||||
| -rw-r--r-- | include/SSystem/SComponent/c_bg_s_poly_info.h | 19 | ||||
| -rw-r--r-- | include/SSystem/SComponent/c_bg_s_shdw_draw.h | 14 | ||||
| -rw-r--r-- | include/SSystem/SComponent/c_bg_w.h | 15 | ||||
| -rw-r--r-- | include/SSystem/SComponent/c_m2d.h | 4 | ||||
| -rw-r--r-- | include/SSystem/SComponent/c_m3d.h | 48 |
9 files changed, 147 insertions, 27 deletions
diff --git a/include/SSystem/SComponent/c_API_controller_pad.h b/include/SSystem/SComponent/c_API_controller_pad.h index 56ba9e95a7..1036ccab71 100644 --- a/include/SSystem/SComponent/c_API_controller_pad.h +++ b/include/SSystem/SComponent/c_API_controller_pad.h @@ -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
\ No newline at end of file diff --git a/include/SSystem/SComponent/c_bg_s_chk.h b/include/SSystem/SComponent/c_bg_s_chk.h index 49c4922789..2e379ef228 100644 --- a/include/SSystem/SComponent/c_bg_s_chk.h +++ b/include/SSystem/SComponent/c_bg_s_chk.h @@ -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 */ diff --git a/include/SSystem/SComponent/c_bg_s_gnd_chk.h b/include/SSystem/SComponent/c_bg_s_gnd_chk.h index 30063c014d..009ce54f0e 100644 --- a/include/SSystem/SComponent/c_bg_s_gnd_chk.h +++ b/include/SSystem/SComponent/c_bg_s_gnd_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 */ diff --git a/include/SSystem/SComponent/c_bg_s_lin_chk.h b/include/SSystem/SComponent/c_bg_s_lin_chk.h index 398aef6fee..e75008e92d 100644 --- a/include/SSystem/SComponent/c_bg_s_lin_chk.h +++ b/include/SSystem/SComponent/c_bg_s_lin_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 */ diff --git a/include/SSystem/SComponent/c_bg_s_poly_info.h b/include/SSystem/SComponent/c_bg_s_poly_info.h index 9da29950b8..ed0ca41b60 100644 --- a/include/SSystem/SComponent/c_bg_s_poly_info.h +++ b/include/SSystem/SComponent/c_bg_s_poly_info.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 */ diff --git a/include/SSystem/SComponent/c_bg_s_shdw_draw.h b/include/SSystem/SComponent/c_bg_s_shdw_draw.h index e935c65193..ddbafac5d3 100644 --- a/include/SSystem/SComponent/c_bg_s_shdw_draw.h +++ b/include/SSystem/SComponent/c_bg_s_shdw_draw.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 */ diff --git a/include/SSystem/SComponent/c_bg_w.h b/include/SSystem/SComponent/c_bg_w.h index ff54875936..b46c178241 100644 --- a/include/SSystem/SComponent/c_bg_w.h +++ b/include/SSystem/SComponent/c_bg_w.h @@ -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 */ diff --git a/include/SSystem/SComponent/c_m2d.h b/include/SSystem/SComponent/c_m2d.h index 334e3d0445..9e90110960 100644 --- a/include/SSystem/SComponent/c_m2d.h +++ b/include/SSystem/SComponent/c_m2d.h @@ -3,4 +3,8 @@ #include "dolphin/types.h" +struct cM2dGCir; + +void cM2d_CrossCirLin(cM2dGCir&, float, float, float, float, float*, float*); + #endif /* C_M2D_H */ diff --git a/include/SSystem/SComponent/c_m3d.h b/include/SSystem/SComponent/c_m3d.h index 85e1e019e2..81d18507cb 100644 --- a/include/SSystem/SComponent/c_m3d.h +++ b/include/SSystem/SComponent/c_m3d.h @@ -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*); |
