summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/SSystem/SComponent/c_bg_s_poly_info.h1
-rw-r--r--include/SSystem/SComponent/c_bg_w.h101
-rw-r--r--include/d/actor/d_a_player.h6
-rw-r--r--include/d/d_bg_s.h74
-rw-r--r--include/d/d_bg_s_movebg_actor.h38
-rw-r--r--include/d/d_bg_w.h64
6 files changed, 238 insertions, 46 deletions
diff --git a/include/SSystem/SComponent/c_bg_s_poly_info.h b/include/SSystem/SComponent/c_bg_s_poly_info.h
index 2d2da649..6844dcd7 100644
--- a/include/SSystem/SComponent/c_bg_s_poly_info.h
+++ b/include/SSystem/SComponent/c_bg_s_poly_info.h
@@ -2,6 +2,7 @@
#define C_BG_S_POLY_INFO_H
#include "dolphin/types.h"
+#include "global.h"
class cBgW;
class cBgS_PolyInfo {
diff --git a/include/SSystem/SComponent/c_bg_w.h b/include/SSystem/SComponent/c_bg_w.h
index 44a27105..9bd6781e 100644
--- a/include/SSystem/SComponent/c_bg_w.h
+++ b/include/SSystem/SComponent/c_bg_w.h
@@ -1,16 +1,16 @@
#ifndef C_BG_W_H
#define C_BG_W_H
-#include "dolphin/types.h"
+#include "SSystem/SComponent/c_xyz.h"
+#include "dolphin/mtx/mtx.h"
class cBgW_BgId {
private:
- /* 0x0 */ u16 m_id;
+ /* 0x0 */ int m_id;
/* 0x4 vtable */
public:
void Release();
- bool ChkUsed() const;
void Regist(int);
virtual ~cBgW_BgId() {}
@@ -19,10 +19,99 @@ public:
void Ct() { m_id = 0x100; }
u16 GetId() const { return m_id; }
+ bool ChkUsed() const {
+ if (m_id >= 0 && m_id < 0x100) {
+ return true;
+ }
+ return false;
+ }
};
-bool cBgW_CheckBGround(float a1);
-bool cBgW_CheckBRoof(float a1);
-bool cBgW_CheckBWall(float a1);
+class cBgW_TriElm;
+class cBgW_RwgElm;
+class cBgW_BlkElm;
+class cBgW_GrpElm;
+class cBgW_NodeTree;
+class cBgD_t;
+class cBgS_LinChk;
+class cBgS_GndChk;
+class cBgS_ShdwDraw;
+class cBgS_PolyPassChk;
+class cBgS_GrpPassChk;
+
+class cBgW : public cBgW_BgId {
+public:
+ enum Flags_e {
+ MOVE_BG_e = 0x1,
+ NO_VTX_TBL_e = 0x10,
+ GLOBAL_e = 0x20,
+ LOCK_e = 0x80,
+ };
+
+ cBgW();
+
+ void FreeArea();
+ void GlobalVtx();
+ void SetVtx();
+
+ void SetTri();
+ void BlckConnect(u16*, int*, int);
+ void MakeBlckTransMinMax(cXyz*, cXyz*);
+ void MakeBlckMinMax(int, cXyz*, cXyz*);
+ void MakeBlckBnd(int, cXyz*, cXyz*);
+ void MakeNodeTreeRp(int);
+ void MakeNodeTreeGrpRp(int);
+ void MakeNodeTree();
+ void ChkMemoryError();
+ bool Set(cBgD_t*, u32, f32(*)[3][4]);
+ void RwgLineCheck(u16, cBgS_LinChk*);
+ void LineCheckRp(cBgS_LinChk*, int);
+ void LineCheckGrpRp(cBgS_LinChk*, int, int);
+ void RwgGroundCheckCommon(f32, u16, cBgS_GndChk*);
+ void RwgGroundCheckGnd(u16, cBgS_GndChk*);
+ void RwgGroundCheckWall(u16, cBgS_GndChk*);
+ void GroundCrossRp(cBgS_GndChk*, int);
+ void GroundCrossGrpRp(cBgS_GndChk*, int, int);
+ void CopyOldMtx();
+ void Move();
+ void RwgShdwDraw(int, cBgS_ShdwDraw*);
+ void ShdwDrawRp(cBgS_ShdwDraw*, int);
+ void ShdwDrawGrpRp(cBgS_ShdwDraw*, int);
+ void GetTrans(cXyz*) const;
+ void GetTriPnt(int, cXyz*, cXyz*, cXyz*) const;
+ void GetTopUnder(f32*, f32*) const;
+
+ virtual ~cBgW();
+ virtual void GetGrpToRoomIndex(int) const;
+ virtual void CalcPlane();
+ virtual void ClassifyPlane();
+ virtual void ChkPolyThrough(int, cBgS_PolyPassChk*);
+ virtual void ChkShdwDrawThrough(int, cBgS_PolyPassChk*);
+ virtual void ChkGrpThrough(int, cBgS_GrpPassChk*, int);
+
+ /* 0x08 */ Mtx* mpModelMtx;
+ /* 0x0C */ Mtx mOldMtx;
+ /* 0x3C */ Mtx mCurMtx;
+ /* 0x6C */ u8 mFlags;
+ /* 0x6D */ u8 mbNeedsFullTransform;
+ /* 0x6E */ u8 field_0x6E[0x74 - 0x6E];
+ /* 0x74 */ u8 mMoveCounter;
+ /* 0x75 */ u8 mWallCorrectPriority;
+ /* 0x76 */ u8 field_0x76[0x78 - 0x76];
+ /* 0x78 */ int mIgnorePlaneType;
+ /* 0x7C */ cXyz mTransVel;
+ /* 0x88 */ cBgW_TriElm* mpTriElm;
+ /* 0x8C */ cBgW_RwgElm* mpRwg;
+ /* 0x90 */ cXyz* mpVtxTbl;
+ /* 0x94 */ cBgD_t* mpBgDt;
+ /* 0x98 */ cBgW_BlkElm* mpBlk;
+ /* 0x9C */ cBgW_GrpElm* mpGrp;
+ /* 0xA0 */ cBgW_NodeTree* mpNodeTree;
+ /* 0xA4 */ int mRootGrpIdx;
+};
+
+bool cBgW_CheckBGround(f32 a1);
+bool cBgW_CheckBRoof(f32 a1);
+bool cBgW_CheckBWall(f32 a1);
#endif /* C_BG_W_H */
diff --git a/include/d/actor/d_a_player.h b/include/d/actor/d_a_player.h
index d0740134..85019ec6 100644
--- a/include/d/actor/d_a_player.h
+++ b/include/d/actor/d_a_player.h
@@ -11,6 +11,7 @@
#include "d/d_drawlist.h"
#include "f_op/f_op_actor_mng.h"
#include "m_Do/m_Do_ext.h"
+#include "d/d_bg_w.h"
class mDoExt_MtxCalcOldFrame;
class daPy_matAnm_c;
@@ -242,11 +243,6 @@ struct MagicArmorAuraEntry {
class daPy_anmIndex_c;
-class dBgW {
-public:
- enum PushPullLabel {};
-};
-
class daPy_lk_c : public daPy_py_c {
public:
enum HEAP_TYPE {};
diff --git a/include/d/d_bg_s.h b/include/d/d_bg_s.h
index d1867580..e98560b1 100644
--- a/include/d/d_bg_s.h
+++ b/include/d/d_bg_s.h
@@ -1,9 +1,10 @@
#ifndef D_BG_D_BG_S_H
#define D_BG_D_BG_S_H
-#include "global.h"
#include "SSystem/SComponent/c_sxyz.h"
#include "SSystem/SComponent/c_xyz.h"
+#include "d/d_bg_w.h"
+#include "global.h"
class cBgS_LinChk;
class cBgS_GndChk;
@@ -12,7 +13,6 @@ class cM3dGPla;
class cBgS_ShdwDraw;
class dBgW;
class fopAc_ac_c;
-class dBgW_Base;
class dBgS_Acch;
class dBgS_RoofChk;
class dBgS_SplGrpChk;
@@ -20,19 +20,19 @@ class dBgS_SphChk;
class cBgS_ChkElm {
public:
- /* 0x00 */ dBgW_Base* m_bgw_base_ptr;
+ /* 0x00 */ cBgW* m_bgw_base_ptr;
/* 0x04 */ bool m_used;
/* 0x08 */ u32 m_actor_id;
/* 0x0C */ fopAc_ac_c* m_actor_ptr;
/* 0x10 vtable */
public:
- cBgS_ChkElm() { this->Init(); }
+ cBgS_ChkElm() { Init(); }
void Init();
void Release();
virtual ~cBgS_ChkElm() {}
- virtual void Regist2(dBgW_Base*, unsigned int, void*);
+ virtual void Regist2(cBgW*, u32, void*);
bool ChkUsed() const { return m_used; }
}; // Size: 0x14
@@ -55,7 +55,7 @@ public:
f32 GroundCross(cBgS_GndChk*);
static void* ConvDzb(void*);
fopAc_ac_c* GetActorPointer(int) const;
- dBgW_Base* GetBgWPointer(cBgS_PolyInfo&) const;
+ cBgW* GetBgWPointer(cBgS_PolyInfo&) const;
bool ChkPolySafe(cBgS_PolyInfo&);
void GetTriGrp(int, int) const;
void GetGrpToRoomId(int, int) const;
@@ -76,43 +76,47 @@ class dBgS : public cBgS {
public:
dBgS() {}
~dBgS() {}
+
void Ct();
void Dt();
void ClrMoveFlag();
void Move();
- bool Regist(dBgW_Base*, fopAc_ac_c*);
- bool ChkMoveBG(cBgS_PolyInfo const&);
- bool ChkMoveBG_NoDABg(cBgS_PolyInfo const&);
- s32 GetExitId(cBgS_PolyInfo const&);
- s32 GetPolyColor(cBgS_PolyInfo const&);
- BOOL GetHorseNoEntry(cBgS_PolyInfo const&);
- int GetSpecialCode(cBgS_PolyInfo const&);
- int GetMagnetCode(cBgS_PolyInfo const&);
- int GetMonkeyBarsCode(cBgS_PolyInfo const&);
- u32 GetUnderwaterRoofCode(cBgS_PolyInfo const&);
- s32 GetWallCode(cBgS_PolyInfo const&);
- int GetPolyAtt0(cBgS_PolyInfo const&);
- int GetPolyAtt1(cBgS_PolyInfo const&);
- int GetGroundCode(cBgS_PolyInfo const&);
- s32 GetCamMoveBG(cBgS_PolyInfo const&);
- s32 GetRoomCamId(cBgS_PolyInfo const&);
- s32 GetRoomPathId(cBgS_PolyInfo const&);
- s32 GetRoomPathPntNo(cBgS_PolyInfo const&);
- u8 GetGrpSoundId(cBgS_PolyInfo const&);
- u32 ChkGrpInf(cBgS_PolyInfo const&, u32);
- s32 GetRoomId(cBgS_PolyInfo const&);
- bool GetPolyAttackThrough(cBgS_PolyInfo const&);
- u32 ChkPolyHSStick(cBgS_PolyInfo const&);
+ bool Regist(cBgW*, fopAc_ac_c*);
+ bool ChkMoveBG(cBgS_PolyInfo&);
+ bool ChkMoveBG_NoDABg(cBgS_PolyInfo&);
+ int GetPolyId0(int, int, int, u32, u32);
+ int GetPolyCamId(int, int);
+ int GetMtrlSndId(cBgS_PolyInfo&);
+ int GetExitId(cBgS_PolyInfo&);
+ int GetPolyColor(cBgS_PolyInfo&);
+ int GetGrpRoomInfId(cBgS_PolyInfo&);
+ u8 GetGrpSoundId(cBgS_PolyInfo&);
+ u32 ChkGrpInf(cBgS_PolyInfo&, u32);
+ int GetPolyId1(int, int, int, u32, u32);
+ void GetLinkNo(cBgS_PolyInfo&);
+ int GetWallCode(cBgS_PolyInfo&);
+ int GetSpecialCode(cBgS_PolyInfo&);
+ void GetAttributeCodeDirect(cBgS_PolyInfo&);
+ void GetAttributeCode(cBgS_PolyInfo&);
+ void GetGroundCode(cBgS_PolyInfo&);
+ void GetPolyId2(int, int, int, u32, u32);
+ int GetCamMoveBG(cBgS_PolyInfo&);
+ int GetRoomCamId(cBgS_PolyInfo&);
+ int GetRoomPathId(cBgS_PolyInfo&);
+ int GetRoomPathPntNo(cBgS_PolyInfo&);
+ int GetRoomId(cBgS_PolyInfo&);
+ u32 ChkPolyHSStick(cBgS_PolyInfo&);
+ void LineCrossNonMoveBG(cBgS_LinChk*);
void WallCorrect(dBgS_Acch*);
- void WallCorrectSort(dBgS_Acch*);
f32 RoofChk(dBgS_RoofChk*);
bool SplGrpChk(dBgS_SplGrpChk*);
bool SphChk(dBgS_SphChk*, void*);
- void MoveBgCrrPos(cBgS_PolyInfo const&, bool, cXyz*, csXyz*, csXyz*, bool, bool);
- void MoveBgTransPos(cBgS_PolyInfo const&, bool, cXyz*, csXyz*, csXyz*);
- void MoveBgMatrixCrrPos(cBgS_PolyInfo const&, bool, cXyz*, csXyz*, csXyz*);
- void RideCallBack(cBgS_PolyInfo const&, fopAc_ac_c*);
- void ArrowStickCallBack(cBgS_PolyInfo const&, fopAc_ac_c*, cXyz&);
+ void WallCrrPos(dBgS_CrrPos*);
+ void MoveBgCrrPos(cBgS_PolyInfo&, bool, cXyz*, csXyz*, csXyz*);
+ void MoveBgTransPos(cBgS_PolyInfo&, bool, cXyz*, csXyz*, csXyz*);
+ void MoveBgMatrixCrrPos(cBgS_PolyInfo&, bool, cXyz*, csXyz*, csXyz*);
+ void RideCallBack(cBgS_PolyInfo&, fopAc_ac_c*);
+ void PushPullCallBack(cBgS_PolyInfo&, fopAc_ac_c*, short, dBgW::PushPullLabel);
bool WaterChk(dBgS_SplGrpChk* chk) { return SplGrpChk(chk); }
}; // Size: 0x1404
diff --git a/include/d/d_bg_s_movebg_actor.h b/include/d/d_bg_s_movebg_actor.h
new file mode 100644
index 00000000..2451c2dc
--- /dev/null
+++ b/include/d/d_bg_s_movebg_actor.h
@@ -0,0 +1,38 @@
+#ifndef D_BG_S_MOVEBG_ACTOR_H
+#define D_BG_S_MOVEBG_ACTOR_H
+
+#include "SSystem/SComponent/c_bg_s_poly_info.h"
+#include "f_op/f_op_actor_mng.h"
+
+class dBgW;
+typedef void (*MoveBGActor_SetFunc)(dBgW*, void*, cBgS_PolyInfo&, bool, cXyz*, csXyz*,
+ csXyz*);
+
+class dBgS_MoveBgActor : public fopAc_ac_c {
+public:
+ /* 0x290 */ dBgW* mpBgW;
+ /* 0x294 */ Mtx mBgMtx;
+
+ dBgS_MoveBgActor();
+ int MoveBGCreateHeap();
+ int MoveBGCreate(char const*, int, MoveBGActor_SetFunc, u32);
+ int MoveBGDelete();
+ int MoveBGExecute();
+
+ int MoveBGDraw() { return Draw(); }
+
+ virtual int CreateHeap() { return 1; }
+ virtual int Create() { return 1; }
+ virtual int Execute(Mtx**) { return 1; }
+ virtual int Draw() { return 1; }
+ virtual int Delete() { return 1; }
+ virtual int IsDelete() { return 1; }
+ virtual int ToFore() { return 1; }
+ virtual int ToBack() { return 1; }
+
+ static const char* m_name;
+ static int m_dzb_id;
+ static MoveBGActor_SetFunc m_set_func;
+};
+
+#endif /* D_BG_S_MOVEBG_ACTOR_H */ \ No newline at end of file
diff --git a/include/d/d_bg_w.h b/include/d/d_bg_w.h
new file mode 100644
index 00000000..d00ee31c
--- /dev/null
+++ b/include/d/d_bg_w.h
@@ -0,0 +1,64 @@
+#ifndef D_BG_W_H
+#define D_BG_W_H
+
+#include "SSystem/SComponent/c_bg_w.h"
+
+class dBgS_Acch;
+class cM3dGPla;
+class dBgS_RoofChk;
+class dBgS_SplGrpChk;
+class dBgS_SphChk;
+class cM3dGTri;
+class dBgS_CrrPos;
+
+class dBgW;
+typedef void (*dBgW_CrrFunc)(dBgW*, void*, cBgS_PolyInfo&, bool, cXyz*, csXyz*, csXyz*);
+
+class dBgW : public cBgW {
+public:
+ enum PushPullLabel {};
+
+ dBgW();
+
+ void Move();
+ void positionWallCorrect(dBgS_Acch*, f32, cM3dGPla&, cXyz*, f32);
+ void RwgWallCorrect(dBgS_Acch*, u16);
+ void WallCorrectRp(dBgS_Acch*, int);
+ void WallCorrectGrpRp(dBgS_Acch*, int, int);
+ void RwgRoofChk(u16, dBgS_RoofChk*);
+ void RoofChkRp(dBgS_RoofChk*, int);
+ void RoofChkGrpRp(dBgS_RoofChk*, int, int);
+ void RwgSplGrpChk(u16, dBgS_SplGrpChk*);
+ void SplGrpChkRp(dBgS_SplGrpChk*, int);
+ void SplGrpChkGrpRp(dBgS_SplGrpChk*, int, int);
+ void RwgSphChk(u16, dBgS_SphChk*, void*);
+ void SphChkRp(dBgS_SphChk*, void*, int);
+ void SphChkGrpRp(dBgS_SphChk*, void*, int, int);
+ void positionWallCrrPos(cM3dGTri&, dBgS_CrrPos*, cXyz*, f32, f32);
+ void RwgWallCrrPos(u16, dBgS_CrrPos*);
+ void WallCrrPosRp(dBgS_CrrPos*, int);
+ void WallCrrPosGrpRp(dBgS_CrrPos*, int, int);
+ void WallCrrPos(dBgS_CrrPos*);
+ void ChangeAttributeCodeByPathPntNo(int, u32);
+
+ virtual ~dBgW() {}
+ virtual void ChkPolyThrough(int, cBgS_PolyPassChk*);
+ virtual void ChkShdwDrawThrough(int, cBgS_PolyPassChk*);
+ virtual void ChkGrpThrough(int, cBgS_GrpPassChk*, int);
+ virtual void CrrPos(cBgS_PolyInfo&, void*, bool, cXyz*, csXyz*, csXyz*);
+ virtual void TransPos(cBgS_PolyInfo&, void*, bool, cXyz*, csXyz*, csXyz*);
+ virtual void MatrixCrrPos(cBgS_PolyInfo&, void*, bool, cXyz*, csXyz*, csXyz*);
+
+ void SetCrrFunc(dBgW_CrrFunc func) { m_crr_func = func; }
+
+ /* 0xA8 */ dBgW_CrrFunc m_crr_func;
+ /* 0xAC */ s16 mOldRotY;
+ /* 0xAE */ s16 mRotYDelta;
+ /* 0xB0 */ void* mpRideCb;
+ /* 0xB4 */ void* mpPushPullCb;
+ /* 0xB8 */ s16 mRoomNo;
+ /* 0xBA */ u8 mFlag;
+ /* 0xBB */ u8 mRoomNo2;
+};
+
+#endif /* D_BG_W_H */ \ No newline at end of file