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);
39 /* 0x00 */ u32 field_0x0;
40 /* 0x04 */ int field_0x4;
41 /* 0x08 */ f32 field_0x8;
42 /* 0x0C */ u8 field_0xc;
43 /* 0x0D */ u8 field_0xd;
44 /* 0x0E */ u8 field_0xe;
45 /* 0x0F */ u8 field_0xf;
47 /* 0x14 */ u8 mChangeItem;
48}; // Size: 0x18
49
51public:
52 /* 0x00 */ u16 mFlags;
53 /* 0x04 */ f32 field_0x4;
54 /* 0x08 */ f32 field_0x8;
55 /* 0x0C */ f32 field_0xc;
57 /* 0x14 */ f32 mBGMDistMargin;
58 /* 0x18 */ f32 mSWModeDisable;
67 /* 0x38 */ f32 field_0x38;
68 /* 0x3C */ f32 field_0x3c;
69
70public:
72 /* 80070038 */ dAttParam_c(s32);
73
74 /* 80070110 */ virtual ~dAttParam_c();
75
76 bool CheckFlag(u16 flag) { return mFlags & flag; }
77
78 /* 0x40 vtable */
79}; // Size: 0x44
80
82public:
83 /* 80073CA4 */ fopAc_ac_c* convPId(fpc_ProcID);
84 /* 80073CD4 */ void init();
85 /* 80073CEC */ void proc();
86 /* 80073D08 */ int request(fopAc_ac_c*, f32, f32, f32, s16, int);
87
89
90private:
95}; // Size: 0x10
96
97class dAttList_c {
98public:
99 /* 800304D0 */ ~dAttList_c() {}
100 /* 8003050C */ dAttList_c() {}
101 /* 80073864 */ fopAc_ac_c* getActor();
102 /* 80073898 */ void setActor(fopAc_ac_c*);
103
105
106 /* 0x00 */ f32 mWeight;
107 /* 0x04 */ f32 mDistance;
108 /* 0x08 */ cSAngle mAngle;
109 /* 0x0C */ u32 mType;
111}; // Size: 0x14
112
114public:
115 /* 8003054C */ ~dAttDraw_c() {}
116 /* 800307F0 */ dAttDraw_c() {}
117 /* 80072DD8 */ void setAnm(u8, f32);
118 /* 80072FE8 */ void setAlphaAnm(u8, u8);
119 /* 80073004 */ void alphaAnm();
120 /* 800732B0 */ void draw(cXyz&, f32 (*)[4]);
121
122 /* 0x000 */ J3DModel* mModel[2];
132 /* 0x164 */ cXyz field_0x164;
133 /* 0x170 */ u8 field_0x170;
134 /* 0x171 */ u8 field_0x171;
135 /* 0x172 */ u8 field_0x172;
136 /* 0x173 */ u8 field_0x173;
137 /* 0x174 */ u8 field_0x174;
138 /* 0x175 */ u8 field_0x175;
139};
140
141STATIC_ASSERT(sizeof(dAttDraw_c) == 0x178);
142
144public:
145 /* 80070178 */ virtual int execute(u16, J3DTransformInfo*);
146};
147
149 /* 0x00 */ f32 mDistMax;
152 /* 0x0C */ f32 mUpperY;
153 /* 0x10 */ f32 mLowerY;
154 /* 0x14 */ f32 mWeight;
155 /* 0x18 */ u32 mAngleSelect;
156}; // Size: 0x1C
157
162
163class dAttention_c {
164public:
170
172 /* 80070198 */ dAttention_c(fopAc_ac_c*, u32);
173 /* 80070774 */ ~dAttention_c();
174 /* 80070844 */ dAttList_c* GetLockonList(s32);
175 /* 80070880 */ dAttList_c* getActionBtnB();
176 /* 80070974 */ dAttList_c* getActionBtnXY();
177 /* 80070A70 */ int chkAttMask(u32, u32);
178 /* 80070E90 */ f32 calcWeight(int, fopAc_ac_c*, f32, s16, s16, u32*);
179 /* 800710C0 */ void setList(int, fopAc_ac_c*, f32, f32, cSAngle, u32);
180 /* 80071240 */ void initList(u32);
181 /* 800713CC */ int makeList();
182 /* 80071424 */ void setOwnerAttentionPos();
183 /* 80071488 */ int SelectAttention(fopAc_ac_c*);
184 /* 800716B8 */ void sortList();
185 /* 800718A4 */ void stockAttention();
186 /* 80071960 */ fopAc_ac_c* nextAttention();
187 /* 80071A68 */ int freeAttention();
188 /* 80071A98 */ bool chaseAttention();
189 /* 80071CC0 */ f32 EnemyDistance(fopAc_ac_c*);
190 /* 80071DEC */ void runSoundProc();
191 /* 80071E84 */ void runDrawProc();
192 /* 800720F4 */ void runDebugDisp();
193 /* 800720F8 */ void checkButton();
194 /* 800722A0 */ bool triggerProc();
195 /* 800722EC */ int lostCheck();
196 /* 80072344 */ void judgementStatus4Hold();
197 /* 800725F0 */ void judgementStatus4Switch();
198 /* 80072924 */ int Run();
199 /* 80072BD4 */ void Draw();
200 /* 80072D80 */ void lockSoundStart(u32);
201 /* 8007353C */ fopAc_ac_c* LockonTarget(s32);
202 /* 800735DC */ f32 LockonReleaseDistanse();
203 /* 800736CC */ fpc_ProcID LockonTargetPId(s32);
204 /* 80073734 */ fopAc_ac_c* ActionTarget(s32);
205 /* 8007378C */ fopAc_ac_c* CheckObjectTarget(s32);
206 /* 800737E4 */ bool LockonTruth();
207 /* 80073838 */ int checkDistance(cXyz*, s16, cXyz*, f32, f32, f32, f32);
208 /* 8016E424 */ void LockEdge();
209 /* 80182994 */ void GetCheckObjectCount();
210 /* 80182AD0 */ void keepLock(int);
211 /* 8014B010 */ static dist_entry& getDistTable(int);
212
216 BOOL chkFlag(u32 flag) { return (mFlags & flag) ? TRUE : FALSE; }
217 void setFlag(u32 flag) { mFlags |= flag; }
219 int GetActionCount() { return mActionCount; }
220 int GetLockonCount() { return mLockonCount; }
221 void LockSoundOn() { clrFlag(0x400000); }
222 void LockSoundOff() { setFlag(0x400000); }
223 bool Lockon() { return LockonTruth() || chkFlag(0x20000000); } // only matches with -O2?
227
232
238
242
247
248 static dist_entry& i_getDistTable(int i_no) { return dist_table[i_no]; }
249
252 static dist_entry dist_table[234];
253 static int loc_type_num;
254 static int act_type_num;
256 static int chk_type_num;
257
258public:
259 /* 0x000 */ fopAc_ac_c* mpPlayer;
262 /* 0x00C */ u32 mPadNo;
264 /* 0x014 */ u8 field_0x14[4];
265 /* 0x018 */ JKRSolidHeap* heap;
266 /* 0x01C */ cXyz mDrawAttnPos;
267 /* 0x028 */ dAttDraw_c draw[2];
269 /* 0x31C */ cXyz mOwnerAttnPos;
270 /* 0x328 */ s8 field_0x328;
271 /* 0x329 */ u8 mAttnStatus;
272 /* 0x32A */ u8 field_0x32a;
273 /* 0x32B */ u8 field_0x32b;
274 /* 0x32C */ u8 field_0x32c;
275 /* 0x32D */ u8 field_0x32d;
276 /* 0x32E */ u8 field_0x32e;
277 /* 0x32F */ u8 field_0x32f;
278 /* 0x330 */ u8 field_0x330;
279 /* 0x331 */ u8 field_0x331;
280 /* 0x332 */ u8 field_0x332;
281 /* 0x333 */ u8 field_0x333;
282 /* 0x334 */ u32 mFlags;
283 /* 0x338 */ dAttList_c mLockOnList[8];
284 /* 0x3D8 */ int mLockonCount;
285 /* 0x3DC */ int mLockOnOffset;
286 /* 0x3E0 */ dAttList_c mActionList[4];
287 /* 0x430 */ int mActionCount;
288 /* 0x434 */ int mActionOffset;
290 /* 0x488 */ int mCheckObjectCount;
291 /* 0x48C */ int mCheckObjectOffset;
295 /* 0x4C4 */ int mAttnBlockTimer;
297 /* 0x50C */ u8 field_0x50c[0x514 - 0x50c];
299 /* 0x518 */ f32 mEnemyDist;
300}; // Size: 0x51C
301
302STATIC_ASSERT(sizeof(dAttention_c) == 0x51C);
303
304#endif /* D_D_ATTENTION_H */
T cLib_calcTimer(T *value)
Definition c_lib.h:74
Definition JKRSolidHeap.h:10
Definition c_angle.h:6
Definition d_attention.h:27
u8 field_0xd
Definition d_attention.h:43
u8 getChangeItem()
Definition d_attention.h:36
u8 field_0xf
Definition d_attention.h:45
dAttCatch_c()
Definition d_attention.h:29
fopAc_ac_c * convPId(fpc_ProcID)
Definition d_attention.cpp:1574
u32 field_0x0
Definition d_attention.h:39
int field_0x4
Definition d_attention.h:40
fopAc_ac_c * getCatghTarget()
Definition d_attention.h:35
u8 field_0xc
Definition d_attention.h:42
u8 mChangeItem
Definition d_attention.h:47
u8 field_0xe
Definition d_attention.h:44
void init()
Definition d_attention.cpp:1579
void proc()
Definition d_attention.cpp:1587
int request(fopAc_ac_c *, u8, f32, f32, f32, s16, int)
Definition d_attention.cpp:1601
fpc_ProcID mCatghTargetID
Definition d_attention.h:46
f32 field_0x8
Definition d_attention.h:41
Definition d_attention.h:143
virtual int execute(u16, J3DTransformInfo *)
Definition d_attention.cpp:90
Definition d_attention.h:113
~dAttDraw_c()
Definition d_attention.h:115
u8 field_0x172
Definition d_attention.h:135
mDoExt_brkAnm mNoticeCursorBrk[2]
Definition d_attention.h:125
mDoExt_bpkAnm mImpactBpk
Definition d_attention.h:129
u8 field_0x170
Definition d_attention.h:133
mDoExt_brkAnm mNoticeCursor02Brk[2]
Definition d_attention.h:126
J3DModel * mModel[2]
Definition d_attention.h:122
void setAlphaAnm(u8, u8)
Definition d_attention.cpp:1329
mDoExt_btkAnm mNoticeCursorBtk[2]
Definition d_attention.h:127
mDoExt_bckAnm mImpactBck
Definition d_attention.h:128
void alphaAnm()
Definition d_attention.cpp:1337
u8 field_0x173
Definition d_attention.h:136
void setAnm(u8, f32)
Definition d_attention.cpp:1307
mDoExt_bpkAnm mNoticeCursorBpk[2]
Definition d_attention.h:124
mDoExt_btkAnm mImpactBtk
Definition d_attention.h:131
dAttDraw_c()
Definition d_attention.h:116
mDoExt_brkAnm mImpactBrk
Definition d_attention.h:130
cXyz field_0x164
Definition d_attention.h:132
u8 field_0x174
Definition d_attention.h:137
mDoExt_bckAnm mNoticeCursorBck[2]
Definition d_attention.h:123
void draw(cXyz &, f32(*)[4])
Definition d_attention.cpp:1380
u8 field_0x171
Definition d_attention.h:134
u8 field_0x175
Definition d_attention.h:138
Definition d_attention.h:10
void init()
Definition d_attention.cpp:1560
fpc_ProcID getPId(void *)
Definition d_attention.cpp:1536
fopAc_ac_c * convPId(fpc_ProcID)
Definition d_attention.cpp:1541
int mPriority
Definition d_attention.h:23
int request(fopAc_ac_c *, int)
Definition d_attention.cpp:1546
void proc()
Definition d_attention.cpp:1567
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:81
void init()
Definition d_attention.cpp:1644
void proc()
Definition d_attention.cpp:1651
u32 field_0x0
Definition d_attention.h:91
fopAc_ac_c * convPId(fpc_ProcID)
Definition d_attention.cpp:1639
s32 field_0x4
Definition d_attention.h:92
int request(fopAc_ac_c *, f32, f32, f32, s16, int)
Definition d_attention.cpp:1658
f32 field_0x8
Definition d_attention.h:93
fpc_ProcID mLookTargetID
Definition d_attention.h:94
fopAc_ac_c * getLookTarget()
Definition d_attention.h:88
Definition d_attention.h:50
f32 mSWModeDisable
Definition d_attention.h:58
u8 mAttnCursorDisappearFrames
Definition d_attention.h:66
f32 mBGMDistMargin
Definition d_attention.h:57
f32 field_0x3c
Definition d_attention.h:68
dAttParam_c()
Definition d_attention.h:71
f32 field_0x38
Definition d_attention.h:67
f32 mSelCursorScaleX
Definition d_attention.h:59
f32 mSelCursorOffsetY
Definition d_attention.h:63
virtual ~dAttParam_c()
Definition d_attention.cpp:80
f32 mAttnCursorOffsetY
Definition d_attention.h:64
f32 mAttnCursorScaleY
Definition d_attention.h:62
f32 field_0xc
Definition d_attention.h:55
f32 field_0x4
Definition d_attention.h:53
u8 mAttnCursorAppearFrames
Definition d_attention.h:65
bool CheckFlag(u16 flag)
Definition d_attention.h:76
f32 mAttnCursorScaleX
Definition d_attention.h:61
u16 mFlags
Definition d_attention.h:52
f32 field_0x8
Definition d_attention.h:54
f32 mDangerBGMDistance
Definition d_attention.h:56
f32 mSelCursorScaleY
Definition d_attention.h:60
Definition m_Do_ext.h:113
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:100
u32 mType
Definition d_attention.h:109
fpc_ProcID mActorID
Definition d_attention.h:110
~dAttList_c()
Definition d_attention.h:99
cSAngle mAngle
Definition d_attention.h:108
fopAc_ac_c * getActor()
f32 mDistance
Definition d_attention.h:107
void setActor(fopAc_ac_c *)
Definition d_attention.cpp:1531
fpc_ProcID getPid()
Definition d_attention.h:104
f32 mWeight
Definition d_attention.h:106
Definition d_a_ep.cpp:125
bool Lockon()
Definition d_attention.h:223
bool LockonTruth()
~dAttention_c()
Definition d_attention.cpp:201
bool chaseAttention()
Definition d_attention.cpp:726
bool triggerProc()
Definition d_attention.cpp:949
dAttLook_c mLookTarget
Definition d_attention.h:294
int mCheckObjectCount
Definition d_attention.h:290
u8 getCatchChgItem()
Definition d_attention.h:215
JKRSolidHeap * heap
Definition d_attention.h:265
u8 mAttnStatus
Definition d_attention.h:271
u8 field_0x32c
Definition d_attention.h:274
cXyz mDrawAttnPos
Definition d_attention.h:266
fpc_ProcID mTargetActorID
Definition d_attention.h:268
int makeList()
Definition d_attention.cpp:575
int lostCheck()
Definition d_attention.cpp:959
void clrFlag(u32 flag)
Definition d_attention.h:218
u8 field_0x32f
Definition d_attention.h:277
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:233
dAttHint_c mZHintTarget
Definition d_attention.h:292
static int chk_type_num
Definition d_attention.h:256
int mActionOffset
Definition d_attention.h:288
fopAc_ac_c * getZHintTarget()
Definition d_attention.h:214
fopAc_ac_c * LockonTarget(s32)
static dist_entry & i_getDistTable(int i_no)
Definition d_attention.h:248
fopAc_ac_c * getCatghTarget()
Definition d_attention.h:213
static type_tbl_entry chk_type_tbl[1]
Definition d_attention.h:317
int mCheckObjectOffset
Definition d_attention.h:291
dAttList_c mActionList[4]
Definition d_attention.h:286
dAttList_c mCheckObjectList[4]
Definition d_attention.h:289
void runSoundProc()
Definition d_attention.cpp:823
u8 field_0x50c[0x514 - 0x50c]
Definition d_attention.h:297
void judgementStatus4Switch()
Definition d_attention.cpp:1061
void Init(fopAc_ac_c *param_0, u32 i_padNo)
Definition d_attention.h:243
void runDrawProc()
Definition d_attention.cpp:838
fopAc_ac_c * CheckObjectTarget(s32)
Definition d_attention.cpp:1499
void LockEdge()
Definition d_camera.cpp:3685
void setOwnerAttentionPos()
Definition d_attention.cpp:582
static dist_entry dist_table[234]
Definition d_attention.h:6
void LockSoundOff()
Definition d_attention.h:222
int SelectAttention(fopAc_ac_c *)
Definition d_attention.cpp:592
void Draw()
Definition d_attention.cpp:1253
void checkButton()
Definition d_attention.cpp:903
u8 field_0x32d
Definition d_attention.h:275
static int loc_type_num
Definition d_attention.h:253
dAttList_c * getActionBtnXY()
Definition d_attention.cpp:245
f32 LockonReleaseDistanse()
Definition d_attention.cpp:1447
void stockAttention()
Definition d_attention.cpp:666
dAttList_c * getActionBtnB()
Definition d_attention.cpp:218
u8 field_0x331
Definition d_attention.h:279
void judgementStatus4Hold()
Definition d_attention.cpp:970
dAttList_c mLockOnList[8]
Definition d_attention.h:283
dAttList_c * GetLockonList(s32)
f32 calcWeight(int, fopAc_ac_c *, f32, s16, s16, u32 *)
Definition d_attention.cpp:405
int ZHintRequest(fopAc_ac_c *param_1, int param_2)
Definition d_attention.h:224
void setList(int, fopAc_ac_c *, f32, f32, cSAngle, u32)
Definition d_attention.cpp:476
u8 field_0x14[4]
Definition d_attention.h:264
dAttention_c()
Definition d_attention.h:171
u32 mFlags
Definition d_attention.h:282
u32 mPlayerAttentionFlags
Definition d_attention.h:263
f32 mEnemyDist
Definition d_attention.h:299
int Run()
Definition d_attention.cpp:1166
fopAc_ac_c * ActionTarget(s32)
Definition d_attention.cpp:1484
fopAc_ac_c * mpPlayer
Definition d_attention.h:259
cXyz mOwnerAttnPos
Definition d_attention.h:269
int mLockonCount
Definition d_attention.h:284
int mAttnBlockTimer
Definition d_attention.h:295
int freeAttention()
Definition d_attention.cpp:719
int mActionCount
Definition d_attention.h:287
void keepLock(int)
f32 EnemyDistance(fopAc_ac_c *)
Definition d_attention.cpp:779
u8 field_0x333
Definition d_attention.h:281
u32 mPadNo
Definition d_attention.h:262
void lockSoundStart(u32)
Definition d_attention.cpp:1300
void initList(u32)
Definition d_attention.cpp:535
u8 field_0x32b
Definition d_attention.h:273
u8 field_0x32a
Definition d_attention.h:272
int chkAttMask(u32, u32)
Definition d_attention.cpp:276
static int act_type_num
Definition d_attention.h:254
fopAc_ac_c * getLookTarget()
Definition d_attention.h:239
u8 field_0x332
Definition d_attention.h:280
u8 field_0x330
Definition d_attention.h:278
fpc_ProcID LockonTargetPId(s32)
Definition d_attention.cpp:1466
void runDebugDisp()
Definition d_attention.cpp:900
static type_tbl_entry loc_type_tbl[3]
Definition d_attention.h:34
EState
Definition d_attention.h:165
@ ST_NONE
Definition d_attention.h:166
@ ST_LOCK
Definition d_attention.h:167
@ ST_RELEASE
Definition d_attention.h:168
u8 field_0x32e
Definition d_attention.h:276
static dist_entry & getDistTable(int)
Definition d_a_npc.cpp:2023
dAttDraw_c draw[2]
Definition d_attention.h:267
void GetCheckObjectCount()
void LockSoundOn()
Definition d_attention.h:221
int checkDistance(cXyz *, s16, cXyz *, f32, f32, f32, f32)
Definition d_attention.cpp:1520
void sortList()
Definition d_attention.cpp:620
dAttParam_c mAttParam
Definition d_attention.h:296
int GetActionCount()
Definition d_attention.h:219
int GetLockonCount()
Definition d_attention.h:220
fopAc_ac_c * nextAttention()
Definition d_attention.cpp:689
BOOL chkFlag(u32 flag)
Definition d_attention.h:216
fpc_ProcID mEnemyActorID
Definition d_attention.h:298
int mLockOnOffset
Definition d_attention.h:285
dAttCatch_c mCatghTarget
Definition d_attention.h:293
dAttDraw_CallBack_c mpDrawCallback
Definition d_attention.h:261
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:228
static type_tbl_entry act_type_tbl[5]
Definition d_attention.h:41
void setFlag(u32 flag)
Definition d_attention.h:217
s8 field_0x328
Definition d_attention.h:270
fpc_ProcID mLockTargetID
Definition d_attention.h:260
Definition d_attention.h:148
f32 mLowerY
Definition d_attention.h:153
f32 mUpperY
Definition d_attention.h:152
f32 mWeight
Definition d_attention.h:154
u32 mAngleSelect
Definition d_attention.h:155
f32 mDistanceAdjust
Definition d_attention.h:151
f32 mDistMaxRelease
Definition d_attention.h:150
f32 mDistMax
Definition d_attention.h:149
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:158
s16 field_0x0
Definition d_attention.h:159
u16 field_0x2
Definition d_attention.h:160
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