Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
d_a_obj_movebox.h
Go to the documentation of this file.
1#ifndef D_A_OBJ_MOVEBOX_H
2#define D_A_OBJ_MOVEBOX_H
3
4#include "d/d_a_obj.h"
6#include "d/d_bg_w.h"
7#include "d/d_com_inf_game.h"
9
10
22namespace daObjMovebox {
23
24enum Type_e { pp_field = 3 };
25
26struct Attr_c {
27 struct sMinMax { // fabricated
30 };
33 /* 0x04 */ s16 mPushMoveTime;
36 /* 0x0A */ s16 mPullMoveTime;
37 /* 0x0C */ f32 mUnitDistance;
38 /* 0x10 */ f32 mShadowSize;
39 /* 0x14 */ f32 mGravity;
42 /* 0x20 */ f32 mFallYInitSpeed;
43 /* 0x24 */ f32 mLandSmokeScale;
56 /* 0x58 */ int field_0x58;
57 /* 0x5C */ int field_0x5c;
58 /* 0x60 */ u32 field_0x60;
59 /* 0x64 */ f32 field_0x64;
60 /* 0x68 */ f32 field_0x68;
61 /* 0x6C */ f32 field_0x6c;
62 /* 0x70 */ f32 field_0x70;
63 /* 0x74 */ f32 field_0x74;
64 /* 0x78 */ f32 field_0x78;
65 /* 0x7C */ u32 field_0x7c;
66 /* 0x80 */ u32 field_0x80;
67 /* 0x84 */ u32 field_0x84;
68 /* 0x88 */ u32 field_0x88;
69 /* 0x8C */ int field_0x8c;
70 /* 0x90 */ sMinMax mCullX;
71 /* 0x94 */ sMinMax mCullY;
72 /* 0x98 */ sMinMax mCullZ;
73 /* 0x9C */ u8 field_0x9c;
74 /* 0x9D */ u8 field_0x9d;
75 /* 0x9E */ u8 field_0x9e;
76};
77
79 Hio_c(daObjMovebox::Type_e);
80 void default_set();
81 void ct();
82 void dt();
84
85 static u8 M_flag_bgc[8];
86 static const char* const M_name[];
87
88 /* 0x4 */ Type_e mType;
89 /* 0x8 */ int mCount;
91};
92
93struct BgcSrc_c {
94 /* 0x0 */ f32 field_0x0;
95 /* 0x4 */ f32 field_0x4;
96 /* 0x8 */ f32 field_0x8;
97 /* 0xC */ f32 field_0xc;
98};
99
100class Act_c;
101
102struct Bgc_c {
103 enum State_e {
112 };
113
114 Bgc_c();
115 void gnd_pos(daObjMovebox::Act_c const*, daObjMovebox::BgcSrc_c const*, int, f32);
116 void wrt_pos(cXyz const&);
117 void wall_pos(daObjMovebox::Act_c const*, daObjMovebox::BgcSrc_c const*, int, s16, f32);
122
123 static const daObjMovebox::BgcSrc_c M_lin5[];
124 static const daObjMovebox::BgcSrc_c M_lin20[];
125
129
130 /* 0x000 */ f32 field_0x0[23];
131 /* 0x05C */ int field_0x5c;
132 /* 0x060 */ f32 field_0x60;
133 /* 0x064 */ cXyz field_0x64[23];
134 /* 0x178 */ int field_0x178;
135 /* 0x17C */ f32 field_0x17c;
136 /* 0x180 */ State_e mState;
137#if DEBUG
138 /* 0x184 */ cXyz field_0x184[92];
139 /* 0x184 */ cXyz field_0x5D4[92];
140 /* 0xA24 */ int field_0xA24;
141 /* 0xA28 */ int field_0xA28;
142#endif
143};
144
145struct Act_c : public dBgS_MoveBgActor {
146 enum Prm_e {
147 PRM_4_e = 0x4,
148 PRM_8_e = 0x8,
149 PRM_18_e = 0x18,
150 PRM_1C_e = 0x1C,
151 };
152
153 int prm_get_swSave1() const;
154 void prmZ_init();
155 void prmX_init();
156 const daObjMovebox::Attr_c& attr() const;
157 void set_mtx();
158 void init_mtx();
159 void path_init();
160 void path_save();
161 static void RideCallBack(dBgW*, fopAc_ac_c*, fopAc_ac_c*);
163 void afl_sway();
164 int check_to_walk();
165 void clr_moment_cnt();
166 bool chk_appear() const;
168 void mode_wait_init();
169 void mode_wait();
170 void mode_walk_init();
171 void mode_walk();
172 void mode_afl_init();
173 void mode_afl();
174 void sound_slip();
175 void sound_limit();
176 void sound_land();
177 void vib_land();
178 void eff_land_smoke();
179
180 virtual int CreateHeap();
181 virtual int Create();
182 virtual int Execute(Mtx**);
183 virtual int Draw();
184 virtual int Delete();
185
186 inline void mode_proc_call();
187 inline int Mthd_Create();
188 inline int Mthd_Delete();
189
190 int prm_get_swSave() const { return daObj::PrmAbstract(this, PRM_8_e, PRM_8_e); }
191 int prmZ_get_swSave2() const { return (u8)(mPrmZ >> 8); }
192 int prm_get_dmy() const { return 0; }
193 int prmZ_get_pathId() const { return mPrmZ & 0xFF; }
195 int prm_get_type() const { return daObj::PrmAbstract(this, PRM_4_e, PRM_18_e); }
196
197 bool is_switch1() const { return fopAcM_isSwitch(this, prm_get_swSave1()); }
198 int is_switch2() const { return fopAcM_isSwitch(this, prmZ_get_swSave2()) != 0; }
199
200 void on_switch1() const { fopAcM_onSwitch(this, prm_get_swSave1()); }
201 void on_switch2() const { fopAcM_onSwitch(this, prmZ_get_swSave2()); }
204
205 int getType() { return prm_get_type(); }
206
207 static const s16 M_dir_base[4];
208 static const char* const M_arcname[8];
209 static const dCcD_SrcCyl M_cyl_src;
210
211 static const daObjMovebox::Attr_c M_attr[8];
212
214 /* 0x5A8 */ J3DModel* mpModel;
215 /* 0x5AC */ int field_0x5ac;
216 /* 0x5B0 */ dCcD_Stts mCcStts;
217 /* 0x5EC */ dCcD_Cyl mCcCyl;
218 /* 0x728 */ Bgc_c mBgc;
219 /* 0x8AC */ int mType;
220 /* 0x8B0 */ u16 mPrmZ;
221 /* 0x8B2 */ u16 mPrmX;
222 /* 0x8B4 */ dPath* mpPath;
223 /* 0x8B8 */ s16 field_0x8b8;
224 /* 0x8BC */ f32 field_0x8bc;
225 /* 0x8C0 */ f32 field_0x8c0;
226 /* 0x8C4 */ f32 field_0x8c4;
227 /* 0x8C8 */ f32 field_0x8c8;
228 /* 0x8CC */ f32 field_0x8cc;
229 /* 0x8D0 */ f32 field_0x8d0;
230 /* 0x8D4 */ f32 field_0x8d4;
231 /* 0x8D8 */ f32 field_0x8d8;
232 /* 0x8DC */ int field_0x8dc;
233 /* 0x8E0 */ int field_0x8e0;
234 /* 0x8E4 */ f32 field_0x8e4;
235 /* 0x8E8 */ int field_0x8e8;
237 /* 0x8F0 */ s16 field_0x8f0[4];
238 /* 0x8F8 */ s16 field_0x8f8;
239 /* 0x8FA */ s16 field_0x8fa;
240 /* 0x8FC */ s16 field_0x8fc;
241 /* 0x8FE */ u8 field_0x8fe;
242 /* 0x8FF */ s8 mReverb;
243 /* 0x900 */ u8 field_0x900;
244 /* 0x901 */ u8 field_0x901;
245 /* 0x902 */ u8 field_0x902;
246 /* 0x904 */ int field_0x904;
247 /* 0x908 */ s8 field_0x908;
248#if DEBUG
249 static daObjMovebox::Hio_c M_hio[];
250#endif
251};
252}; // namespace daObjMovebox
253
255
256#endif /* D_A_OBJ_MOVEBOX_H */
Definition J3DModel.h:43
Definition JORMContext.h:120
Definition JORReflexible.h:43
Definition d_bg_s_movebg_actor.h:11
Definition d_bg_s_gnd_chk.h:19
Definition d_bg_s_lin_chk.h:48
Definition d_bg_s_wtr_chk.h:6
PushPullLabel
Definition d_bg_w_base.h:28
Definition d_bg_w.h:257
Definition d_cc_d.h:461
Definition d_cc_d.h:269
Type_e
Definition d_a_obj_movebox.h:24
@ pp_field
Definition d_a_obj_movebox.h:24
Definition f_op_actor.h:230
STATIC_ASSERT(sizeof(daObjMovebox::Act_c)==0x90C)
f32 Mtx[3][4]
Definition mtx.h:25
signed char s8
Definition types.h:7
unsigned long u32
Definition types.h:12
signed short int s16
Definition types.h:9
float f32
Definition types.h:25
unsigned short int u16
Definition types.h:10
unsigned char u8
Definition types.h:8
BOOL fopAcM_isSwitch(const fopAc_ac_c *i_actor, int sw)
Definition f_op_actor_mng.h:459
void fopAcM_offSwitch(const fopAc_ac_c *i_actor, int sw)
Definition f_op_actor_mng.h:451
void fopAcM_onSwitch(const fopAc_ac_c *i_actor, int sw)
Definition f_op_actor_mng.h:447
Definition d_a_obj_movebox.cpp:70
T PrmAbstract(const fopAc_ac_c *i_actor, T i_nbits, T i_shift)
Definition d_a_obj.h:20
Definition c_xyz.h:7
Definition d_cc_d.h:104
Definition d_path.h:18
Definition d_a_obj_movebox.h:145
void sound_slip()
Definition d_a_obj_movebox.cpp:1124
f32 field_0x8c4
Definition d_a_obj_movebox.h:226
s16 field_0x8f8
Definition d_a_obj_movebox.h:238
void afl_sway()
Definition d_a_obj_movebox.cpp:818
int getType()
Definition d_a_obj_movebox.h:205
void sound_limit()
Definition d_a_obj_movebox.cpp:1137
void mode_afl_init()
Definition d_a_obj_movebox.cpp:1063
dCcD_Cyl mCcCyl
Definition d_a_obj_movebox.h:217
void eff_land_smoke()
Definition d_a_obj_movebox.cpp:1171
Prm_e
Definition d_a_obj_movebox.h:146
@ PRM_18_e
Definition d_a_obj_movebox.h:149
@ PRM_4_e
Definition d_a_obj_movebox.h:147
@ PRM_1C_e
Definition d_a_obj_movebox.h:150
@ PRM_8_e
Definition d_a_obj_movebox.h:148
virtual int Create()
Definition d_a_obj_movebox.cpp:744
virtual int CreateHeap()
Definition d_a_obj_movebox.cpp:628
dCcD_Stts mCcStts
Definition d_a_obj_movebox.h:216
bool chk_appear() const
Definition d_a_obj_movebox.cpp:927
void off_switch1() const
Definition d_a_obj_movebox.h:202
static daObjMovebox::Hio_c M_hio[]
Definition d_a_obj_movebox.h:359
f32 field_0x8e4
Definition d_a_obj_movebox.h:234
const daObjMovebox::Attr_c & attr() const
Definition d_a_obj_movebox.cpp:503
int field_0x904
Definition d_a_obj_movebox.h:246
s8 field_0x908
Definition d_a_obj_movebox.h:247
s8 mReverb
Definition d_a_obj_movebox.h:242
u8 field_0x901
Definition d_a_obj_movebox.h:244
f32 field_0x8c0
Definition d_a_obj_movebox.h:225
static const dCcD_SrcCyl M_cyl_src
Definition d_a_obj_movebox.h:422
void vib_land()
Definition d_a_obj_movebox.cpp:1163
static const daObjMovebox::Attr_c M_attr[8]
Definition d_a_obj_movebox.h:438
u16 mPrmX
Definition d_a_obj_movebox.h:221
void prmX_init()
Definition d_a_obj_movebox.cpp:407
static const char *const M_arcname[8]
Definition d_a_obj_movebox.h:418
int field_0x8dc
Definition d_a_obj_movebox.h:232
Bgc_c mBgc
Definition d_a_obj_movebox.h:218
s16 field_0x8f0[4]
Definition d_a_obj_movebox.h:237
void mode_walk_init()
Definition d_a_obj_movebox.cpp:1001
f32 field_0x8cc
Definition d_a_obj_movebox.h:228
int prm_get_type() const
Definition d_a_obj_movebox.h:195
int mType
Definition d_a_obj_movebox.h:219
int Mthd_Delete()
Definition d_a_obj_movebox.cpp:1377
virtual int Draw()
Definition d_a_obj_movebox.cpp:1296
static fopAc_ac_c * PPCallBack(fopAc_ac_c *, fopAc_ac_c *, s16, dBgW_Base::PushPullLabel)
Definition d_a_obj_movebox.cpp:698
u8 prm_get_answer() const
Definition d_a_obj_movebox.h:194
int field_0x5ac
Definition d_a_obj_movebox.h:215
int is_switch2() const
Definition d_a_obj_movebox.h:198
virtual int Delete()
Definition d_a_obj_movebox.cpp:1340
void mode_wait_init()
Definition d_a_obj_movebox.cpp:949
void on_switch2() const
Definition d_a_obj_movebox.h:201
void clr_moment_cnt()
Definition d_a_obj_movebox.cpp:921
f32 field_0x8d8
Definition d_a_obj_movebox.h:231
int prmZ_get_swSave2() const
Definition d_a_obj_movebox.h:191
f32 field_0x8d4
Definition d_a_obj_movebox.h:230
s16 field_0x8fc
Definition d_a_obj_movebox.h:240
void mode_afl()
Definition d_a_obj_movebox.cpp:1069
void prmZ_init()
Definition d_a_obj_movebox.cpp:391
int field_0x8e0
Definition d_a_obj_movebox.h:233
u8 field_0x8fe
Definition d_a_obj_movebox.h:241
bool is_switch1() const
Definition d_a_obj_movebox.h:197
void mode_wait()
Definition d_a_obj_movebox.cpp:958
J3DModel * mpModel
Definition d_a_obj_movebox.h:214
void path_save()
Definition d_a_obj_movebox.cpp:571
u8 field_0x902
Definition d_a_obj_movebox.h:245
f32 field_0x8d0
Definition d_a_obj_movebox.h:229
f32 field_0x8bc
Definition d_a_obj_movebox.h:224
void set_mtx()
Definition d_a_obj_movebox.cpp:511
int check_to_walk()
Definition d_a_obj_movebox.cpp:873
virtual int Execute(Mtx **)
Definition d_a_obj_movebox.cpp:1181
dBgW::PushPullLabel mPPLabel
Definition d_a_obj_movebox.h:236
void sound_land()
Definition d_a_obj_movebox.cpp:1150
void path_init()
Definition d_a_obj_movebox.cpp:546
void eff_smoke_slip_start()
Definition d_a_obj_movebox.cpp:941
void mode_walk()
Definition d_a_obj_movebox.cpp:1007
static const s16 M_dir_base[4]
Definition d_a_obj_movebox.h:272
static void RideCallBack(dBgW *, fopAc_ac_c *, fopAc_ac_c *)
Definition d_a_obj_movebox.cpp:645
int prm_get_swSave1() const
Definition d_a_obj_movebox.cpp:387
int prm_get_swSave() const
Definition d_a_obj_movebox.h:190
int field_0x8e8
Definition d_a_obj_movebox.h:235
f32 field_0x8c8
Definition d_a_obj_movebox.h:227
void mode_proc_call()
Definition d_a_obj_movebox.cpp:1113
s16 field_0x8b8
Definition d_a_obj_movebox.h:223
u16 mPrmZ
Definition d_a_obj_movebox.h:220
int Mthd_Create()
Definition d_a_obj_movebox.cpp:1353
request_of_phase_process_class mPhase
Definition d_a_obj_movebox.h:213
int prmZ_get_pathId() const
Definition d_a_obj_movebox.h:193
dPath * mpPath
Definition d_a_obj_movebox.h:222
void on_switch1() const
Definition d_a_obj_movebox.h:200
void off_switch2() const
Definition d_a_obj_movebox.h:203
u8 field_0x900
Definition d_a_obj_movebox.h:243
int prm_get_dmy() const
Definition d_a_obj_movebox.h:192
void init_mtx()
Definition d_a_obj_movebox.cpp:538
s16 field_0x8fa
Definition d_a_obj_movebox.h:239
Definition d_a_obj_movebox.h:27
s16 max
Definition d_a_obj_movebox.h:29
s16 min
Definition d_a_obj_movebox.h:28
Definition d_a_obj_movebox.h:26
sMinMax mCullZ
Definition d_a_obj_movebox.h:72
int field_0x58
Definition d_a_obj_movebox.h:56
f32 field_0x70
Definition d_a_obj_movebox.h:62
f32 field_0x68
Definition d_a_obj_movebox.h:60
f32 mShadowSize
Definition d_a_obj_movebox.h:38
f32 mTiltSpringFactor
Definition d_a_obj_movebox.h:54
s16 mPullMoveTime
Definition d_a_obj_movebox.h:36
f32 mPlayerTiltPower
Definition d_a_obj_movebox.h:51
s16 mRepeatPushStopTime
Definition d_a_obj_movebox.h:32
sMinMax mCullX
Definition d_a_obj_movebox.h:70
f32 mMiscGravity
Definition d_a_obj_movebox.h:46
f32 mInertiaResistance
Definition d_a_obj_movebox.h:41
s16 mFirstPushStopTime
Definition d_a_obj_movebox.h:31
f32 mBuoyancy
Definition d_a_obj_movebox.h:44
u8 field_0x9d
Definition d_a_obj_movebox.h:74
f32 field_0x78
Definition d_a_obj_movebox.h:64
s16 mFirstPullStopTime
Definition d_a_obj_movebox.h:34
int field_0x5c
Definition d_a_obj_movebox.h:57
f32 mGravity
Definition d_a_obj_movebox.h:39
f32 field_0x6c
Definition d_a_obj_movebox.h:61
f32 mLandSmokeScale
Definition d_a_obj_movebox.h:43
s16 mPushMoveTime
Definition d_a_obj_movebox.h:33
u32 field_0x7c
Definition d_a_obj_movebox.h:65
f32 mFallYInitSpeed
Definition d_a_obj_movebox.h:42
s16 mRepeatPullStopTime
Definition d_a_obj_movebox.h:35
f32 mWaterViscoscityResistance
Definition d_a_obj_movebox.h:49
f32 mPlayerGravity
Definition d_a_obj_movebox.h:45
f32 mTiltViscoscityResistance
Definition d_a_obj_movebox.h:55
f32 mViscosityResistance
Definition d_a_obj_movebox.h:40
u32 field_0x84
Definition d_a_obj_movebox.h:67
f32 field_0x74
Definition d_a_obj_movebox.h:63
f32 mWaterOscillationAccel
Definition d_a_obj_movebox.h:47
f32 mMiscTiltPower
Definition d_a_obj_movebox.h:52
sMinMax mCullY
Definition d_a_obj_movebox.h:71
u32 field_0x60
Definition d_a_obj_movebox.h:58
u8 field_0x9c
Definition d_a_obj_movebox.h:73
f32 mWaterInertiaResistance
Definition d_a_obj_movebox.h:50
u8 field_0x9e
Definition d_a_obj_movebox.h:75
f32 mUnitDistance
Definition d_a_obj_movebox.h:37
int field_0x8c
Definition d_a_obj_movebox.h:69
u32 field_0x88
Definition d_a_obj_movebox.h:68
f32 field_0x64
Definition d_a_obj_movebox.h:59
f32 mMaxTiltPower
Definition d_a_obj_movebox.h:53
u32 field_0x80
Definition d_a_obj_movebox.h:66
s16 mWaterOscillationAngleSpeed
Definition d_a_obj_movebox.h:48
Definition d_a_obj_movebox.h:93
f32 field_0xc
Definition d_a_obj_movebox.h:97
f32 field_0x0
Definition d_a_obj_movebox.h:94
f32 field_0x8
Definition d_a_obj_movebox.h:96
f32 field_0x4
Definition d_a_obj_movebox.h:95
Definition d_a_obj_movebox.h:102
static dBgS_WtrChk M_wrt_work
Definition d_a_obj_movebox.h:127
int field_0x178
Definition d_a_obj_movebox.h:134
cXyz field_0x5D4[92]
Definition d_a_obj_movebox.h:139
static dBgS_ObjLinChk M_wall_work[23]
Definition d_a_obj_movebox.h:128
f32 field_0x0[23]
Definition d_a_obj_movebox.h:130
f32 field_0x60
Definition d_a_obj_movebox.h:132
void gnd_pos(daObjMovebox::Act_c const *, daObjMovebox::BgcSrc_c const *, int, f32)
Definition d_a_obj_movebox.cpp:140
f32 field_0x17c
Definition d_a_obj_movebox.h:135
bool chk_wall_pre(daObjMovebox::Act_c const *, daObjMovebox::BgcSrc_c const *, int, s16)
Definition d_a_obj_movebox.cpp:298
bool chk_wall_touch2(daObjMovebox::Act_c const *, daObjMovebox::BgcSrc_c const *, int, s16)
Definition d_a_obj_movebox.cpp:372
bool chk_wall_touch(daObjMovebox::Act_c const *, daObjMovebox::BgcSrc_c const *, s16)
Definition d_a_obj_movebox.cpp:305
static const daObjMovebox::BgcSrc_c M_lin5[]
Definition d_a_obj_movebox.h:39
static const daObjMovebox::BgcSrc_c M_lin20[]
Definition d_a_obj_movebox.h:44
void wall_pos(daObjMovebox::Act_c const *, daObjMovebox::BgcSrc_c const *, int, s16, f32)
Definition d_a_obj_movebox.cpp:199
Bgc_c()
Definition d_a_obj_movebox.cpp:55
cXyz field_0x184[92]
Definition d_a_obj_movebox.h:138
cXyz field_0x64[23]
Definition d_a_obj_movebox.h:133
State_e
Definition d_a_obj_movebox.h:103
@ STATE_8_e
Definition d_a_obj_movebox.h:108
@ STATE_10_e
Definition d_a_obj_movebox.h:109
@ STATE_0_e
Definition d_a_obj_movebox.h:104
@ STATE_20_e
Definition d_a_obj_movebox.h:110
@ STATE_4_e
Definition d_a_obj_movebox.h:107
@ STATE_40_e
Definition d_a_obj_movebox.h:111
@ STATE_2_e
Definition d_a_obj_movebox.h:106
@ STATE_1_e
Definition d_a_obj_movebox.h:105
static dBgS_ObjGndChk M_gnd_work[23]
Definition d_a_obj_movebox.h:126
int field_0xA24
Definition d_a_obj_movebox.h:140
int field_0xA28
Definition d_a_obj_movebox.h:141
void wrt_pos(cXyz const &)
Definition d_a_obj_movebox.cpp:178
State_e mState
Definition d_a_obj_movebox.h:136
int field_0x5c
Definition d_a_obj_movebox.h:131
void proc_vertical(daObjMovebox::Act_c *)
Definition d_a_obj_movebox.cpp:259
Definition d_a_obj_movebox.h:78
void genMessage(JORMContext *)
Definition d_a_obj_movebox.cpp:103
void ct()
Definition d_a_obj_movebox.cpp:91
void default_set()
Definition d_a_obj_movebox.cpp:87
Hio_c(daObjMovebox::Type_e)
Definition d_a_obj_movebox.cpp:81
void dt()
Definition d_a_obj_movebox.cpp:97
static u8 M_flag_bgc[8]
Definition d_a_obj_movebox.h:85
Type_e mType
Definition d_a_obj_movebox.h:88
int mCount
Definition d_a_obj_movebox.h:89
static const char *const M_name[]
Definition d_a_obj_movebox.h:27
daObjMovebox::Attr_c mAttr
Definition d_a_obj_movebox.h:90
Definition c_phase.h:17