Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
d_attention.h
Go to the documentation of this file.
1#ifndef D_D_ATTENTION_H
2#define D_D_ATTENTION_H
3
5#include "m_Do/m_Do_ext.h"
7
8class fopAc_ac_c;
9
11public:
13 /* 800738B4 */ fpc_ProcID getPId(void*);
14 /* 800738CC */ fopAc_ac_c* convPId(fpc_ProcID);
15 /* 800738FC */ int request(fopAc_ac_c*, int);
16 /* 80073958 */ void init();
17 /* 80073970 */ void proc();
18
20
21private:
23 /* 0x4 */ int mPriority;
25};
26
28public:
31 void init();
32 void proc();
33 int request(fopAc_ac_c*, u8, f32, f32, f32, s16, int);
34
37
38private:
40 /* 0x04 */ int field_0x4;
41 /* 0x08 */ f32 mDistance;
42 /* 0x0C */ u8 mCatchItemNo;
44 /* 0x14 */ u8 mChangeItem;
45}; // Size: 0x18
46
48public:
49 /* 0x00 */ u16 mFlags;
50 /* 0x04 */ f32 field_0x4;
51 /* 0x08 */ f32 field_0x8;
52 /* 0x0C */ f32 field_0xc;
54 /* 0x14 */ f32 mBGMDistMargin;
55 /* 0x18 */ f32 mSWModeDisable;
64 /* 0x38 */ f32 field_0x38;
65 /* 0x3C */ f32 field_0x3c;
66
67public:
69 /* 80070038 */ dAttParam_c(s32);
70 /* 80070110 */ virtual ~dAttParam_c();
71
72 enum EFlag {
73 EFlag_HOLD_MODE = (1 << 0),
75 EFlag_VALID = (1 << 2),
76 EFlag_KEEP = (1 << 3),
77 EFlag_ARROW_OFF = (1 << 4),
78 EFlag_LIST_DEBUG = (1 << 14),
79 EFlag_MARGIN_DEBUG = (1 << 15),
80 };
81
82 bool CheckFlag(u16 flag) { return mFlags & flag; }
83
84 /* 0x40 vtable */
85}; // Size: 0x44
86
88public:
89 /* 80073CA4 */ fopAc_ac_c* convPId(fpc_ProcID);
90 /* 80073CD4 */ void init();
91 /* 80073CEC */ void proc();
92 /* 80073D08 */ int request(fopAc_ac_c*, f32, f32, f32, s16, int);
93
95
96private:
101}; // Size: 0x10
102
103class dAttList_c {
104public:
105 /* 800304D0 */ ~dAttList_c() {}
106 /* 8003050C */ dAttList_c() {}
107 /* 80073864 */ fopAc_ac_c* getActor();
108 /* 80073898 */ void setActor(fopAc_ac_c*);
109
111
112 /* 0x00 */ f32 mWeight;
113 /* 0x04 */ f32 mDistance;
114 /* 0x08 */ cSAngle mAngle;
115 /* 0x0C */ u32 mType;
117}; // Size: 0x14
118
120public:
121 /* 8003054C */ ~dAttDraw_c() {}
122 /* 800307F0 */ dAttDraw_c() {}
123 /* 80072DD8 */ void setAnm(u8, f32);
124 /* 80072FE8 */ void setAlphaAnm(u8, u8);
125 /* 80073004 */ void alphaAnm();
126 /* 800732B0 */ void draw(cXyz&, f32 (*)[4]);
127
128 /* 0x000 */ J3DModel* mModel[2];
138 /* 0x164 */ f32 mCursorSizeX;
139 /* 0x168 */ f32 mCursorSizeY;
140 /* 0x16C */ f32 mCursorOffsetY;
141 /* 0x170 */ u8 mDrawType;
143 /* 0x172 */ u8 mAlphaAnmFrame;
144 /* 0x173 */ u8 field_0x173;
146 /* 0x175 */ u8 field_0x175;
147};
148
149STATIC_ASSERT(sizeof(dAttDraw_c) == 0x178);
150
152public:
153 /* 80070178 */ virtual int execute(u16, J3DTransformInfo*);
154};
155
157 /* 0x00 */ f32 mDistMax;
160 /* 0x0C */ f32 mUpperY;
161 /* 0x10 */ f32 mLowerY;
162 /* 0x14 */ f32 mWeight;
163 /* 0x18 */ u32 mAngleSelect;
164}; // Size: 0x1C
165
170
171class dAttention_c {
172public:
178
180 /* 80070198 */ dAttention_c(fopAc_ac_c*, u32);
181 /* 80070774 */ ~dAttention_c();
182 /* 80070844 */ dAttList_c* GetLockonList(s32);
183 /* 80070880 */ dAttList_c* getActionBtnB();
184 /* 80070974 */ dAttList_c* getActionBtnXY();
185 /* 80070A70 */ int chkAttMask(u32, u32);
186 /* 80070E90 */ f32 calcWeight(int, fopAc_ac_c*, f32, s16, s16, u32*);
187 /* 800710C0 */ void setList(int, fopAc_ac_c*, f32, f32, cSAngle, u32);
188 /* 80071240 */ void initList(u32);
189 /* 800713CC */ int makeList();
190 /* 80071424 */ void setOwnerAttentionPos();
191 /* 80071488 */ int SelectAttention(fopAc_ac_c*);
192 /* 800716B8 */ void sortList();
193 /* 800718A4 */ void stockAttention();
194 /* 80071960 */ fopAc_ac_c* nextAttention();
195 /* 80071A68 */ int freeAttention();
196 /* 80071A98 */ bool chaseAttention();
197 /* 80071CC0 */ f32 EnemyDistance(fopAc_ac_c*);
198 /* 80071DEC */ void runSoundProc();
199 /* 80071E84 */ void runDrawProc();
200 /* 800720F4 */ void runDebugDisp();
201 /* 800720F8 */ void checkButton();
202 /* 800722A0 */ bool triggerProc();
203 /* 800722EC */ int lostCheck();
204 /* 80072344 */ void judgementStatus4Hold();
205 /* 800725F0 */ void judgementStatus4Switch();
206 /* 80072924 */ int Run();
207 /* 80072BD4 */ void Draw();
208 /* 80072D80 */ void lockSoundStart(u32);
209 /* 8007353C */ fopAc_ac_c* LockonTarget(s32);
210 /* 800735DC */ f32 LockonReleaseDistanse();
211 /* 800736CC */ fpc_ProcID LockonTargetPId(s32);
212 /* 80073734 */ fopAc_ac_c* ActionTarget(s32);
213 /* 8007378C */ fopAc_ac_c* CheckObjectTarget(s32);
214 /* 800737E4 */ bool LockonTruth();
215 /* 80073838 */ int checkDistance(cXyz*, s16, cXyz*, f32, f32, f32, f32);
216 /* 8016E424 */ void LockEdge();
217 /* 80182994 */ void GetCheckObjectCount();
218 /* 80182AD0 */ void keepLock(int);
219 /* 8014B010 */ static dist_entry& getDistTable(int);
220
224 BOOL chkFlag(u32 flag) { return (mFlags & flag) ? TRUE : FALSE; }
225 void setFlag(u32 flag) { mFlags |= flag; }
227 int GetActionCount() { return mActionCount; }
228 int GetLockonCount() { return mLockonCount; }
229 void LockSoundOn() { clrFlag(0x400000); }
230 void LockSoundOff() { setFlag(0x400000); }
231 bool Lockon() { return LockonTruth() || chkFlag(0x20000000); } // only matches with -O2?
235
240
246
250
255
256 static dist_entry& i_getDistTable(int i_no) { return dist_table[i_no]; }
257
260 static dist_entry dist_table[234];
261 static int loc_type_num;
262 static int act_type_num;
264 static int chk_type_num;
265
266public:
267 /* 0x000 */ fopAc_ac_c* mpPlayer;
270 /* 0x00C */ u32 mPadNo;
272 /* 0x014 */ u8 field_0x14[4];
273 /* 0x018 */ JKRSolidHeap* heap;
274 /* 0x01C */ cXyz mDrawAttnPos;
275 /* 0x028 */ dAttDraw_c draw[2];
277 /* 0x31C */ cXyz mOwnerAttnPos;
278 /* 0x328 */ s8 field_0x328;
279 /* 0x329 */ u8 mAttnStatus;
280 /* 0x32A */ u8 field_0x32a;
281 /* 0x32B */ u8 field_0x32b;
282 /* 0x32C */ u8 field_0x32c;
283 /* 0x32D */ u8 field_0x32d;
284 /* 0x32E */ u8 field_0x32e;
285 /* 0x32F */ u8 field_0x32f;
286 /* 0x330 */ u8 field_0x330;
287 /* 0x331 */ u8 field_0x331;
288 /* 0x332 */ u8 field_0x332;
289 /* 0x333 */ u8 field_0x333;
290 /* 0x334 */ u32 mFlags;
291 /* 0x338 */ dAttList_c mLockOnList[8];
292 /* 0x3D8 */ int mLockonCount;
293 /* 0x3DC */ int mLockOnOffset;
294 /* 0x3E0 */ dAttList_c mActionList[4];
295 /* 0x430 */ int mActionCount;
296 /* 0x434 */ int mActionOffset;
298 /* 0x488 */ int mCheckObjectCount;
299 /* 0x48C */ int mCheckObjectOffset;
303 /* 0x4C4 */ int mAttnBlockTimer;
305 /* 0x50C */ u8 field_0x50c[0x514 - 0x50c];
307 /* 0x518 */ f32 mEnemyDist;
308}; // Size: 0x51C
309
310STATIC_ASSERT(sizeof(dAttention_c) == 0x51C);
311
312#endif /* D_D_ATTENTION_H */
T cLib_calcTimer(T *value)
Definition c_lib.h:79
Definition JKRSolidHeap.h:10
Definition c_angle.h:6
Definition d_attention.h:27
u8 getChangeItem()
Definition d_attention.h:36
dAttCatch_c()
Definition d_attention.h:29
f32 mDistance
Definition d_attention.h:41
fpc_ProcID mRequestActorID
Definition d_attention.h:39
fopAc_ac_c * convPId(fpc_ProcID)
Definition d_attention.cpp:1598
int field_0x4
Definition d_attention.h:40
u8 mCatchItemNo
Definition d_attention.h:42
fopAc_ac_c * getCatghTarget()
Definition d_attention.h:35
u8 mChangeItem
Definition d_attention.h:44
void init()
Definition d_attention.cpp:1603
void proc()
Definition d_attention.cpp:1611
int request(fopAc_ac_c *, u8, f32, f32, f32, s16, int)
Definition d_attention.cpp:1629
fpc_ProcID mCatghTargetID
Definition d_attention.h:43
Definition d_attention.h:151
virtual int execute(u16, J3DTransformInfo *)
Definition d_attention.cpp:93
Definition d_attention.h:119
~dAttDraw_c()
Definition d_attention.h:121
mDoExt_brkAnm mNoticeCursorBrk[2]
Definition d_attention.h:131
mDoExt_bpkAnm mImpactBpk
Definition d_attention.h:135
mDoExt_brkAnm mNoticeCursor02Brk[2]
Definition d_attention.h:132
J3DModel * mModel[2]
Definition d_attention.h:128
void setAlphaAnm(u8, u8)
Definition d_attention.cpp:1350
mDoExt_btkAnm mNoticeCursorBtk[2]
Definition d_attention.h:133
mDoExt_bckAnm mImpactBck
Definition d_attention.h:134
void alphaAnm()
Definition d_attention.cpp:1358
u8 field_0x173
Definition d_attention.h:144
void setAnm(u8, f32)
Definition d_attention.cpp:1328
f32 mCursorSizeX
Definition d_attention.h:138
u8 mAlphaAnmPlayDirection
Definition d_attention.h:145
mDoExt_bpkAnm mNoticeCursorBpk[2]
Definition d_attention.h:130
mDoExt_btkAnm mImpactBtk
Definition d_attention.h:137
dAttDraw_c()
Definition d_attention.h:122
mDoExt_brkAnm mImpactBrk
Definition d_attention.h:136
f32 mCursorSizeY
Definition d_attention.h:139
f32 mCursorOffsetY
Definition d_attention.h:140
mDoExt_bckAnm mNoticeCursorBck[2]
Definition d_attention.h:129
void draw(cXyz &, f32(*)[4])
Definition d_attention.cpp:1405
u8 mAlphaAnmFrame
Definition d_attention.h:143
u8 field_0x175
Definition d_attention.h:146
u8 mDrawType
Definition d_attention.h:141
u8 mAlphaAnmFrameMax
Definition d_attention.h:142
Definition d_attention.h:10
void init()
Definition d_attention.cpp:1584
fpc_ProcID getPId(void *)
Definition d_attention.cpp:1560
fopAc_ac_c * convPId(fpc_ProcID)
Definition d_attention.cpp:1565
int mPriority
Definition d_attention.h:23
int request(fopAc_ac_c *, int)
Definition d_attention.cpp:1570
void proc()
Definition d_attention.cpp:1591
fopAc_ac_c * getZHintTarget()
Definition d_attention.h:19
dAttHint_c()
Definition d_attention.h:12
fpc_ProcID mHintActorID
Definition d_attention.h:22
fpc_ProcID field_0x8
Definition d_attention.h:24
Definition d_attention.h:87
void init()
Definition d_attention.cpp:1679
int field_0x4
Definition d_attention.h:98
f32 mDistance
Definition d_attention.h:99
void proc()
Definition d_attention.cpp:1686
fopAc_ac_c * convPId(fpc_ProcID)
Definition d_attention.cpp:1674
int request(fopAc_ac_c *, f32, f32, f32, s16, int)
Definition d_attention.cpp:1693
fpc_ProcID mRequestActorID
Definition d_attention.h:97
fpc_ProcID mLookTargetID
Definition d_attention.h:100
fopAc_ac_c * getLookTarget()
Definition d_attention.h:94
Definition d_attention.h:47
EFlag
Definition d_attention.h:72
@ EFlag_SWMODE_DEBUG
Definition d_attention.h:74
@ EFlag_HOLD_MODE
Definition d_attention.h:73
@ EFlag_LIST_DEBUG
Definition d_attention.h:78
@ EFlag_ARROW_OFF
Definition d_attention.h:77
@ EFlag_VALID
Definition d_attention.h:75
@ EFlag_MARGIN_DEBUG
Definition d_attention.h:79
@ EFlag_KEEP
Definition d_attention.h:76
f32 mSWModeDisable
Definition d_attention.h:55
u8 mAttnCursorDisappearFrames
Definition d_attention.h:63
f32 mBGMDistMargin
Definition d_attention.h:54
f32 field_0x3c
Definition d_attention.h:65
dAttParam_c()
Definition d_attention.h:68
f32 field_0x38
Definition d_attention.h:64
f32 mSelCursorScaleX
Definition d_attention.h:56
f32 mSelCursorOffsetY
Definition d_attention.h:60
virtual ~dAttParam_c()
Definition d_attention.cpp:83
f32 mAttnCursorOffsetY
Definition d_attention.h:61
f32 mAttnCursorScaleY
Definition d_attention.h:59
f32 field_0xc
Definition d_attention.h:52
f32 field_0x4
Definition d_attention.h:50
u8 mAttnCursorAppearFrames
Definition d_attention.h:62
bool CheckFlag(u16 flag)
Definition d_attention.h:82
f32 mAttnCursorScaleX
Definition d_attention.h:58
u16 mFlags
Definition d_attention.h:49
f32 field_0x8
Definition d_attention.h:51
f32 mDangerBGMDistance
Definition d_attention.h:53
f32 mSelCursorScaleY
Definition d_attention.h:57
Definition m_Do_ext.h:114
STATIC_ASSERT(sizeof(dAttDraw_c)==0x178)
static volatile BOOL flag
Definition dspproc.cpp:20
unsigned int fpc_ProcID
Definition f_pc_base.h:10
Definition d_a_ep.cpp:155
Definition d_a_hozelda.cpp:169
Definition d_a_hozelda.cpp:20
Definition d_a_hozelda.cpp:157
dAttList_c()
Definition d_attention.h:106
u32 mType
Definition d_attention.h:115
fpc_ProcID mActorID
Definition d_attention.h:116
~dAttList_c()
Definition d_attention.h:105
cSAngle mAngle
Definition d_attention.h:114
fopAc_ac_c * getActor()
f32 mDistance
Definition d_attention.h:113
void setActor(fopAc_ac_c *)
Definition d_attention.cpp:1555
fpc_ProcID getPid()
Definition d_attention.h:110
f32 mWeight
Definition d_attention.h:112
Definition d_a_ep.cpp:125
bool Lockon()
Definition d_attention.h:231
bool LockonTruth()
~dAttention_c()
Definition d_attention.cpp:211
bool chaseAttention()
Definition d_attention.cpp:748
bool triggerProc()
Definition d_attention.cpp:970
dAttLook_c mLookTarget
Definition d_attention.h:302
int mCheckObjectCount
Definition d_attention.h:298
u8 getCatchChgItem()
Definition d_attention.h:223
JKRSolidHeap * heap
Definition d_attention.h:273
u8 mAttnStatus
Definition d_attention.h:279
u8 field_0x32c
Definition d_attention.h:282
cXyz mDrawAttnPos
Definition d_attention.h:274
fpc_ProcID mTargetActorID
Definition d_attention.h:276
int makeList()
Definition d_attention.cpp:592
int lostCheck()
Definition d_attention.cpp:980
void clrFlag(u32 flag)
Definition d_attention.h:226
u8 field_0x32f
Definition d_attention.h:285
void CatchRequest(fopAc_ac_c *param_0, u8 param_1, f32 i_horizontalDist, f32 i_upDist, f32 i_downDist, s16 i_angle, int param_5)
Definition d_attention.h:241
dAttHint_c mZHintTarget
Definition d_attention.h:300
static int chk_type_num
Definition d_attention.h:264
int mActionOffset
Definition d_attention.h:296
fopAc_ac_c * getZHintTarget()
Definition d_attention.h:222
fopAc_ac_c * LockonTarget(s32)
static dist_entry & i_getDistTable(int i_no)
Definition d_attention.h:256
fopAc_ac_c * getCatghTarget()
Definition d_attention.h:221
static type_tbl_entry chk_type_tbl[1]
Definition d_attention.h:329
int mCheckObjectOffset
Definition d_attention.h:299
dAttList_c mActionList[4]
Definition d_attention.h:294
dAttList_c mCheckObjectList[4]
Definition d_attention.h:297
void runSoundProc()
Definition d_attention.cpp:844
u8 field_0x50c[0x514 - 0x50c]
Definition d_attention.h:305
void judgementStatus4Switch()
Definition d_attention.cpp:1082
void Init(fopAc_ac_c *param_0, u32 i_padNo)
Definition d_attention.h:251
void runDrawProc()
Definition d_attention.cpp:859
fopAc_ac_c * CheckObjectTarget(s32)
Definition d_attention.cpp:1523
void LockEdge()
Definition d_camera.cpp:3295
void setOwnerAttentionPos()
Definition d_attention.cpp:599
static dist_entry dist_table[234]
Definition d_attention.h:6
void LockSoundOff()
Definition d_attention.h:230
int SelectAttention(fopAc_ac_c *)
Definition d_attention.cpp:609
void Draw()
Definition d_attention.cpp:1274
void checkButton()
Definition d_attention.cpp:924
u8 field_0x32d
Definition d_attention.h:283
static int loc_type_num
Definition d_attention.h:261
dAttList_c * getActionBtnXY()
Definition d_attention.cpp:257
f32 LockonReleaseDistanse()
Definition d_attention.cpp:1471
void stockAttention()
Definition d_attention.cpp:688
dAttList_c * getActionBtnB()
Definition d_attention.cpp:228
u8 field_0x331
Definition d_attention.h:287
void judgementStatus4Hold()
Definition d_attention.cpp:991
dAttList_c mLockOnList[8]
Definition d_attention.h:291
dAttList_c * GetLockonList(s32)
f32 calcWeight(int, fopAc_ac_c *, f32, s16, s16, u32 *)
Definition d_attention.cpp:416
int ZHintRequest(fopAc_ac_c *param_1, int param_2)
Definition d_attention.h:232
void setList(int, fopAc_ac_c *, f32, f32, cSAngle, u32)
Definition d_attention.cpp:488
u8 field_0x14[4]
Definition d_attention.h:272
dAttention_c()
Definition d_attention.h:179
u32 mFlags
Definition d_attention.h:290
u32 mPlayerAttentionFlags
Definition d_attention.h:271
f32 mEnemyDist
Definition d_attention.h:307
int Run()
Definition d_attention.cpp:1187
fopAc_ac_c * ActionTarget(s32)
Definition d_attention.cpp:1508
fopAc_ac_c * mpPlayer
Definition d_attention.h:267
cXyz mOwnerAttnPos
Definition d_attention.h:277
int mLockonCount
Definition d_attention.h:292
int mAttnBlockTimer
Definition d_attention.h:303
int freeAttention()
Definition d_attention.cpp:741
int mActionCount
Definition d_attention.h:295
void keepLock(int)
f32 EnemyDistance(fopAc_ac_c *)
Definition d_attention.cpp:801
u8 field_0x333
Definition d_attention.h:289
u32 mPadNo
Definition d_attention.h:270
void lockSoundStart(u32)
Definition d_attention.cpp:1321
void initList(u32)
Definition d_attention.cpp:547
u8 field_0x32b
Definition d_attention.h:281
u8 field_0x32a
Definition d_attention.h:280
int chkAttMask(u32, u32)
Definition d_attention.cpp:288
static int act_type_num
Definition d_attention.h:262
fopAc_ac_c * getLookTarget()
Definition d_attention.h:247
u8 field_0x332
Definition d_attention.h:288
u8 field_0x330
Definition d_attention.h:286
fpc_ProcID LockonTargetPId(s32)
Definition d_attention.cpp:1490
void runDebugDisp()
Definition d_attention.cpp:921
static type_tbl_entry loc_type_tbl[3]
Definition d_attention.h:35
EState
Definition d_attention.h:173
@ EState_RELEASE
Definition d_attention.h:176
@ EState_LOCK
Definition d_attention.h:175
@ EState_NONE
Definition d_attention.h:174
u8 field_0x32e
Definition d_attention.h:284
static dist_entry & getDistTable(int)
Definition d_a_npc.cpp:2023
dAttDraw_c draw[2]
Definition d_attention.h:275
void GetCheckObjectCount()
void LockSoundOn()
Definition d_attention.h:229
int checkDistance(cXyz *, s16, cXyz *, f32, f32, f32, f32)
Definition d_attention.cpp:1544
void sortList()
Definition d_attention.cpp:642
dAttParam_c mAttParam
Definition d_attention.h:304
int GetActionCount()
Definition d_attention.h:227
int GetLockonCount()
Definition d_attention.h:228
fopAc_ac_c * nextAttention()
Definition d_attention.cpp:711
BOOL chkFlag(u32 flag)
Definition d_attention.h:224
fpc_ProcID mEnemyActorID
Definition d_attention.h:306
int mLockOnOffset
Definition d_attention.h:293
dAttCatch_c mCatghTarget
Definition d_attention.h:301
dAttDraw_CallBack_c mpDrawCallback
Definition d_attention.h:269
void LookRequest(fopAc_ac_c *param_0, f32 i_horizontalDist, f32 i_upDist, f32 i_downDist, s16 i_angle, int param_5)
Definition d_attention.h:236
static type_tbl_entry act_type_tbl[5]
Definition d_attention.h:42
void setFlag(u32 flag)
Definition d_attention.h:225
s8 field_0x328
Definition d_attention.h:278
fpc_ProcID mLockTargetID
Definition d_attention.h:268
Definition d_attention.h:156
f32 mLowerY
Definition d_attention.h:161
f32 mUpperY
Definition d_attention.h:160
f32 mWeight
Definition d_attention.h:162
u32 mAngleSelect
Definition d_attention.h:163
f32 mDistanceAdjust
Definition d_attention.h:159
f32 mDistMaxRelease
Definition d_attention.h:158
f32 mDistMax
Definition d_attention.h:157
Definition d_a_ep.cpp:19
Definition d_a_obj_sekizoa.cpp:62
Definition d_a_hozelda.cpp:56
Definition d_a_obj_sekizoa.cpp:56
Definition d_a_hozelda.cpp:47
Definition d_attention.h:166
s16 type
Definition d_attention.h:167
u16 mask
Definition d_attention.h:168
int BOOL
Definition types.h:27
signed char s8
Definition types.h:4
unsigned long u32
Definition types.h:10
float f32
Definition types.h:22
signed short s16
Definition types.h:5
unsigned short u16
Definition types.h:9
signed long s32
Definition types.h:6
unsigned char u8
Definition types.h:8