Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
d_bg_w_base.h
Go to the documentation of this file.
1#ifndef D_BG_D_BG_W_BASE_H
2#define D_BG_D_BG_W_BASE_H
3
7#include <dolphin/gx.h>
8#include "f_pc/f_pc_base.h"
9
10class cBgS_GndChk;
11class cBgS_LinChk;
12class cBgS_ShdwDraw;
13class dBgS_Acch;
14struct dBgS_CaptPoly;
15class dBgS_RoofChk;
16class dBgS_SphChk;
17class dBgS_SplGrpChk;
18class fopAc_ac_c;
19
26
27class dBgW_Base : public cBgW_BgId {
28public:
37
38 enum PRIORITY {
40 };
41
42 typedef fopAc_ac_c* (*PushPull_CallBack)(fopAc_ac_c*, fopAc_ac_c*, s16,
44
45 dBgW_Base();
46 void ClrDBgWBase();
48
49 virtual ~dBgW_Base();
50 virtual bool ChkMemoryError();
51 virtual bool ChkNotReady() const = 0;
52 virtual bool ChkLock() const = 0;
53 virtual bool ChkMoveBg() const = 0;
54 virtual u32 ChkMoveFlag() const = 0;
55 virtual cM3dGPla GetTriPla(cBgS_PolyInfo const&) const = 0;
56 virtual bool GetTriPnt(cBgS_PolyInfo const&, cXyz*, cXyz*, cXyz*) const = 0;
57 virtual cM3dGAab* GetBnd() const = 0;
58 virtual u32 GetGrpInf(cBgS_PolyInfo const&) const = 0;
59 virtual void OffMoveFlag() = 0;
60 virtual void GetTopUnder(f32*, f32*) const = 0;
61 virtual void SetOldShapeAngleY(s16);
62 virtual bool LineCheck(cBgS_LinChk*) = 0;
63 virtual bool GroundCross(cBgS_GndChk*) = 0;
64 virtual void ShdwDraw(cBgS_ShdwDraw*) = 0;
65 virtual void CaptPoly(dBgS_CaptPoly&) = 0;
66 virtual bool WallCorrect(dBgS_Acch*) = 0;
67 virtual bool WallCorrectSort(dBgS_Acch*) = 0;
68 virtual bool RoofChk(dBgS_RoofChk*) = 0;
69 virtual bool SplGrpChk(dBgS_SplGrpChk*) = 0;
70 virtual bool SphChk(dBgS_SphChk*, void*) = 0;
71 virtual int GetGrpRoomIndex(cBgS_PolyInfo const&) const = 0;
72 virtual int GetExitId(cBgS_PolyInfo const&) = 0;
73 virtual int GetPolyColor(cBgS_PolyInfo const&) = 0;
74 virtual BOOL GetHorseNoEntry(cBgS_PolyInfo const&) = 0;
75 virtual int GetSpecialCode(cBgS_PolyInfo const&) = 0;
76 virtual int GetSpecialCode(int) = 0;
77 virtual int GetMagnetCode(cBgS_PolyInfo const&) = 0;
78 virtual u32 GetPolyObjThrough(int) = 0;
79 virtual u32 GetPolyCamThrough(int) = 0;
80 virtual u32 GetPolyLinkThrough(int) = 0;
81 virtual u32 GetPolyArrowThrough(int) = 0;
82 virtual u32 GetPolyHSStick(int) = 0;
83 virtual u32 GetPolyBoomerangThrough(int) = 0;
84 virtual u32 GetPolyRopeThrough(int) = 0;
85 virtual u32 GetPolyBombThrough(int) = 0;
86 virtual bool GetShdwThrough(int) = 0;
87 virtual u32 GetUnderwaterRoofCode(int) = 0;
88 virtual int GetMonkeyBarsCode(cBgS_PolyInfo const&) = 0;
89 virtual int GetLinkNo(cBgS_PolyInfo const&) = 0;
90 virtual int GetWallCode(cBgS_PolyInfo const&) = 0;
91 virtual int GetPolyAtt0(cBgS_PolyInfo const&) = 0;
92 virtual int GetPolyAtt1(cBgS_PolyInfo const&) = 0;
93 virtual int GetGroundCode(cBgS_PolyInfo const&) = 0;
94 virtual u32 GetIronBallThrough(int) = 0;
95 virtual u32 GetAttackThrough(int) = 0;
96 virtual int GetCamMoveBG(cBgS_PolyInfo const&) = 0;
97 virtual int GetRoomCamId(cBgS_PolyInfo const&) = 0;
98 virtual int GetRoomPathId(cBgS_PolyInfo const&) = 0;
99 virtual int GetRoomPathPntNo(cBgS_PolyInfo const&) = 0;
101 virtual int GetGrpSoundId(cBgS_PolyInfo const&) = 0;
102 virtual void CrrPos(cBgS_PolyInfo const&, void*, bool, cXyz*, csXyz*, csXyz*) = 0;
103 virtual void TransPos(cBgS_PolyInfo const&, void*, bool, cXyz*, csXyz*, csXyz*) = 0;
104 virtual void MatrixCrrPos(cBgS_PolyInfo const&, void*, bool, cXyz*, csXyz*, csXyz*) = 0;
105 virtual void CallRideCallBack(fopAc_ac_c*, fopAc_ac_c*);
107
108 #if DEBUG
109 virtual void DebugDraw() {}
110 virtual void DrawPoly(cBgS_PolyInfo const& param_0, GXColor const& param_1) {}
111 virtual void DebugBox() {}
112 #endif
113
116 int GetRoomId() { return m_roomId; }
117 bool chkStickWall() { return field_0xb & 1; }
118 bool chkStickRoof() { return field_0xb & 2; }
119 bool ChkPushPullOk() const { return m_pushPull_Ok; }
121 void SetRoomId(int id) { m_roomId = id; }
122 bool ChkPriority(int prio) { return m_priority == prio; }
123 void SetPriority(PRIORITY priority) { m_priority = priority; }
124 void onStickWall() { field_0xb |= 1; }
125 void onStickRoof() { field_0xb |= 2; }
126 void OnPushPullOk() { m_pushPull_Ok = true; }
127 void OffPushPullOk() { m_pushPull_Ok = false; }
128
129private:
130 /* 0x08 */ u8 m_priority;
131 /* 0x09 */ u8 m_roomId;
132 /* 0x0A */ u8 field_0xa;
133 /* 0x0B */ u8 field_0xb;
137 /* 0x14 */ bool m_pushPull_Ok;
138}; // Size: 0x18
139
140#endif /* D_BG_D_BG_W_BASE_H */
Definition c_bg_s_gnd_chk.h:8
Definition c_bg_s_lin_chk.h:8
Definition c_bg_s_poly_info.h:7
Definition c_bg_s_shdw_draw.h:12
Definition c_bg_w.h:6
Definition c_m3d_g_aab.h:9
Definition c_m3d_g_pla.h:8
Definition c_sxyz.h:10
Definition d_bg_s_acch.h:62
Definition d_bg_s_roof_chk.h:8
Definition d_bg_s_sph_chk.h:13
Definition d_bg_s_spl_grp_chk.h:8
Definition d_bg_w_base.h:27
virtual bool ChkMemoryError()
Definition d_bg_w_base.cpp:27
u8 field_0xa
Definition d_bg_w_base.h:132
virtual int GetWallCode(cBgS_PolyInfo const &)=0
void ClrDBgWBase()
Definition d_bg_w_base.cpp:16
int GetRoomId()
Definition d_bg_w_base.h:116
virtual int GetGroundCode(cBgS_PolyInfo const &)=0
bool chkStickRoof()
Definition d_bg_w_base.h:118
void SetPushPullCallback(PushPull_CallBack i_callBack)
Definition d_bg_w_base.h:120
virtual void CallRideCallBack(fopAc_ac_c *, fopAc_ac_c *)
Definition d_bg_w_base.cpp:31
void onStickWall()
Definition d_bg_w_base.h:124
virtual void DebugBox()
Definition d_bg_w_base.h:111
virtual bool ChkNotReady() const =0
virtual void GetTopUnder(f32 *, f32 *) const =0
PushPull_CallBack GetPushPullCallback() const
Definition d_bg_w_base.h:114
s16 m_diff_ShapeAngleY
Definition d_bg_w_base.h:135
virtual u32 GetPolyHSStick(int)=0
virtual cM3dGPla GetTriPla(cBgS_PolyInfo const &) const =0
virtual u32 GetPolyCamThrough(int)=0
virtual int GetRoomPathId(cBgS_PolyInfo const &)=0
void CalcDiffShapeAngleY(s16)
Definition d_bg_w_base.cpp:35
virtual bool GetShdwThrough(int)=0
virtual u32 GetUnderwaterRoofCode(int)=0
virtual int GetCamMoveBG(cBgS_PolyInfo const &)=0
virtual void DrawPoly(cBgS_PolyInfo const &param_0, GXColor const &param_1)
Definition d_bg_w_base.h:110
virtual int GetSpecialCode(int)=0
virtual int GetRoomCamId(cBgS_PolyInfo const &)=0
virtual bool LineCheck(cBgS_LinChk *)=0
virtual u32 GetPolyLinkThrough(int)=0
virtual void DebugDraw()
Definition d_bg_w_base.h:109
virtual int GetLinkNo(cBgS_PolyInfo const &)=0
virtual bool ChkMoveBg() const =0
void SetPriority(PRIORITY priority)
Definition d_bg_w_base.h:123
s16 GetDiffShapeAngleY()
Definition d_bg_w_base.h:115
virtual u32 ChkMoveFlag() const =0
virtual int GetMonkeyBarsCode(cBgS_PolyInfo const &)=0
virtual BOOL GetHorseNoEntry(cBgS_PolyInfo const &)=0
virtual int GetPolyAtt1(cBgS_PolyInfo const &)=0
virtual bool RoofChk(dBgS_RoofChk *)=0
virtual bool WallCorrect(dBgS_Acch *)=0
virtual bool WallCorrectSort(dBgS_Acch *)=0
virtual int GetPolyColor(cBgS_PolyInfo const &)=0
void onStickRoof()
Definition d_bg_w_base.h:125
virtual void CrrPos(cBgS_PolyInfo const &, void *, bool, cXyz *, csXyz *, csXyz *)=0
virtual int GetRoomPathPntNo(cBgS_PolyInfo const &)=0
void SetRoomId(int id)
Definition d_bg_w_base.h:121
virtual int GetMagnetCode(cBgS_PolyInfo const &)=0
virtual void CallArrowStickCallBack(fopAc_ac_c *, fopAc_ac_c *, cXyz &)
Definition d_bg_w_base.cpp:33
virtual u32 GetPolyObjThrough(int)=0
virtual u32 GetIronBallThrough(int)=0
virtual int GetSpecialCode(cBgS_PolyInfo const &)=0
virtual int GetGrpSoundId(cBgS_PolyInfo const &)=0
virtual bool SplGrpChk(dBgS_SplGrpChk *)=0
virtual u32 GetPolyArrowThrough(int)=0
virtual void ShdwDraw(cBgS_ShdwDraw *)=0
virtual int GetGrpRoomIndex(cBgS_PolyInfo const &) const =0
virtual int GetExitId(cBgS_PolyInfo const &)=0
virtual bool GroundCross(cBgS_GndChk *)=0
virtual bool GetTriPnt(cBgS_PolyInfo const &, cXyz *, cXyz *, cXyz *) const =0
dBgW_Base()
Definition d_bg_w_base.cpp:10
u8 m_roomId
Definition d_bg_w_base.h:131
virtual u32 GetGrpInf(cBgS_PolyInfo const &) const =0
bool ChkPriority(int prio)
Definition d_bg_w_base.h:122
virtual u32 GetPolyRopeThrough(int)=0
virtual void CaptPoly(dBgS_CaptPoly &)=0
virtual cM3dGAab * GetBnd() const =0
u8 m_priority
Definition d_bg_w_base.h:130
fopAc_ac_c *(*) PushPull_CallBack(fopAc_ac_c *, fopAc_ac_c *, s16, dBgW_Base::PushPullLabel)
Definition d_bg_w_base.h:42
virtual void SetOldShapeAngleY(s16)
Definition d_bg_s.cpp:319
virtual void OffMoveFlag()=0
u8 field_0xb
Definition d_bg_w_base.h:133
virtual u32 GetPolyBoomerangThrough(int)=0
PushPullLabel
Definition d_bg_w_base.h:29
@ PPLABEL_PULL
Definition d_bg_w_base.h:32
@ PPLABEL_NONE
Definition d_bg_w_base.h:30
@ PPLABEL_4
Definition d_bg_w_base.h:34
@ PPLABEL_PUSH
Definition d_bg_w_base.h:31
@ PPLABEL_HEAVY
Definition d_bg_w_base.h:35
@ PPLABEL_3
Definition d_bg_w_base.h:33
s16 m_old_ShapeAngleY
Definition d_bg_w_base.h:134
PRIORITY
Definition d_bg_w_base.h:38
@ PRIORITY_0
Definition d_bg_w_base.h:39
virtual u32 GetPolyBombThrough(int)=0
bool m_pushPull_Ok
Definition d_bg_w_base.h:137
virtual u8 GetPolyGrpRoomInfId(cBgS_PolyInfo const &)=0
virtual bool ChkLock() const =0
virtual u32 GetAttackThrough(int)=0
virtual ~dBgW_Base()
Definition d_bg_w_base.cpp:14
bool chkStickWall()
Definition d_bg_w_base.h:117
virtual void MatrixCrrPos(cBgS_PolyInfo const &, void *, bool, cXyz *, csXyz *, csXyz *)=0
virtual bool SphChk(dBgS_SphChk *, void *)=0
bool ChkPushPullOk() const
Definition d_bg_w_base.h:119
void OnPushPullOk()
Definition d_bg_w_base.h:126
virtual int GetPolyAtt0(cBgS_PolyInfo const &)=0
void OffPushPullOk()
Definition d_bg_w_base.h:127
PushPull_CallBack m_pushPull_Callback
Definition d_bg_w_base.h:136
virtual void TransPos(cBgS_PolyInfo const &, void *, bool, cXyz *, csXyz *, csXyz *)=0
Definition f_op_actor.h:243
static u16 const id[4]
Definition d_a_obj_smtile.cpp:269
dBgW_SpecialCode
Definition d_bg_w_base.h:20
@ dBgW_SPCODE_LIGHT_SNOW
Definition d_bg_w_base.h:22
@ dBgW_SPCODE_ICE
Definition d_bg_w_base.h:24
@ dBgW_SPCODE_HEAVY_SNOW
Definition d_bg_w_base.h:23
@ dBgW_SPCODE_NORMAL
Definition d_bg_w_base.h:21
int BOOL
Definition types.h:33
unsigned long u32
Definition types.h:12
signed short int s16
Definition types.h:9
float f32
Definition types.h:25
unsigned char u8
Definition types.h:8
Definition GXStruct.h:30
Definition c_xyz.h:7
Definition d_bg_s_cap_poly.h:11