1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
|
//
// Generated by dtk
// Translation Unit: d_attention.cpp
//
#include "d/d_attention.h"
#include "f_op/f_op_actor_mng.h"
#include "d/d_com_inf_game.h"
/* 8009D220-8009D268 .text __ct__11dAttParam_cFl */
dAttParam_c::dAttParam_c(long) {
/* Nonmatching */
}
/* 8009D268-8009D2B0 .text __dt__11dAttParam_cFv */
dAttParam_c::~dAttParam_c() {
/* Nonmatching */
}
/* 8009D2B0-8009D2E0 .text execute__19dAttDraw_CallBack_cFUsP16J3DTransformInfo */
void dAttDraw_CallBack_c::execute(unsigned short, J3DTransformInfo*) {
/* Nonmatching */
}
/* 8009D2E0-8009D654 .text __ct__12dAttention_cFP10fopAc_ac_cUl */
dAttention_c::dAttention_c(fopAc_ac_c*, unsigned long) {
/* Nonmatching */
}
/* 8009D654-8009D6EC .text __dt__12dAttention_cFv */
dAttention_c::~dAttention_c() {
/* Nonmatching */
}
/* 8009D6EC-8009D728 .text GetActionList__12dAttention_cFl */
dAttList_c* dAttention_c::GetActionList(long idx) {
if (mActionNum != 0)
return &mActionList[(mActionOffs + idx) % mActionNum];
else
return NULL;
}
/* 8009D728-8009D764 .text GetLockonList__12dAttention_cFl */
dAttList_c* dAttention_c::GetLockonList(long idx) {
if (mLockOnNum != 0)
return &mLockOnList[(mLockOnOffs + idx) % mLockOnNum];
else
return NULL;
}
/* 8009D764-8009D858 .text getActionBtnB__12dAttention_cFv */
dAttList_c* dAttention_c::getActionBtnB() {
/* Nonmatching */
}
/* 8009D858-8009D9A8 .text getActionBtnXYZ_local__12dAttention_cFi */
dAttList_c* dAttention_c::getActionBtnXYZ_local(int) {
/* Nonmatching */
}
/* 8009D9A8-8009D9FC .text getActionBtnX__12dAttention_cFv */
dAttList_c* dAttention_c::getActionBtnX() {
if (!dComIfGs_checkGetItemNum(g_dComIfG_gameInfo.play.mEquippedItems[0]))
return NULL;
return getActionBtnXYZ_local(0);
}
/* 8009D9FC-8009DA50 .text getActionBtnY__12dAttention_cFv */
dAttList_c* dAttention_c::getActionBtnY() {
if (!dComIfGs_checkGetItemNum(g_dComIfG_gameInfo.play.mEquippedItems[1]))
return NULL;
return getActionBtnXYZ_local(1);
}
/* 8009DA50-8009DAA4 .text getActionBtnZ__12dAttention_cFv */
dAttList_c* dAttention_c::getActionBtnZ() {
if (!dComIfGs_checkGetItemNum(g_dComIfG_gameInfo.play.mEquippedItems[2]))
return NULL;
return getActionBtnXYZ_local(2);
}
/* 8009DAA4-8009DAF4 .text chkAttMask__12dAttention_cFUlUl */
void dAttention_c::chkAttMask(unsigned long, unsigned long) {
/* Nonmatching */
}
/* 8009DAF4-8009DB60 .text check_event_condition__FUlUs */
void check_event_condition(unsigned long, unsigned short) {
/* Nonmatching */
}
/* 8009DB60-8009DC28 .text check_flontofplayer__FUlss */
void check_flontofplayer(unsigned long, short, short) {
/* Nonmatching */
}
/* 8009DC28-8009DC74 .text distace_weight__Ffsf */
void distace_weight(float, short, float) {
/* Nonmatching */
}
/* 8009DC74-8009DCD4 .text distace_angle_adjust__Ffsf */
void distace_angle_adjust(float, short, float) {
/* Nonmatching */
}
/* 8009DCD4-8009DE44 .text check_distace__FP4cXyzsP4cXyzffff */
void check_distace(cXyz*, short, cXyz*, float, float, float, float) {
/* Nonmatching */
}
/* 8009DE44-8009E03C .text calcWeight__12dAttention_cFiP10fopAc_ac_cfssPUl */
void dAttention_c::calcWeight(int, fopAc_ac_c*, float, short, short, unsigned long*) {
/* Nonmatching */
}
/* 8009E03C-8009E128 .text setLList__12dAttention_cFP10fopAc_ac_cffUl */
void dAttention_c::setLList(fopAc_ac_c* i_actor, float weight, float distance, unsigned long type) {
float bestWeight = 0.0f;
if (weight > 0.0f) {
int bestIdx;
if (mLockOnNum < (s32)ARRAY_SIZE(mLockOnList)) {
bestIdx = mLockOnNum++;
} else {
for (int i = (s32)ARRAY_SIZE(mLockOnList); i >= 0; i--) {
if (weight > bestWeight) {
bestIdx = i;
bestWeight = weight;
}
}
}
if (weight < mLockOnList[bestIdx].mWeight) {
mLockOnList[bestIdx].setActor(i_actor);
mLockOnList[bestIdx].mWeight = weight;
mLockOnList[bestIdx].mDistance = distance;
mLockOnList[bestIdx].mType = type;
}
}
}
/* 8009E128-8009E214 .text setAList__12dAttention_cFP10fopAc_ac_cffUl */
void dAttention_c::setAList(fopAc_ac_c* i_actor, float weight, float distance, unsigned long type) {
float bestWeight = 0.0f;
if (weight > 0.0f) {
int bestIdx;
if (mActionNum < (s32)ARRAY_SIZE(mActionList)) {
bestIdx = mActionNum++;
} else {
for (int i = (s32)ARRAY_SIZE(mActionList); i >= 0; i--) {
if (weight > bestWeight) {
bestIdx = i;
bestWeight = weight;
}
}
}
if (weight < mActionList[bestIdx].mWeight) {
mActionList[bestIdx].setActor(i_actor);
mActionList[bestIdx].mWeight = weight;
mActionList[bestIdx].mDistance = distance;
mActionList[bestIdx].mType = type;
}
}
}
/* 8009E214-8009E2CC .text initList__12dAttention_cFUl */
void dAttention_c::initList(unsigned long flagMask) {
int i;
mFlagMask = flagMask;
for (i = 0; i < (s32)ARRAY_SIZE(mLockOnList); i++) {
mLockOnList[i].setActor(NULL);
mLockOnList[i].mWeight = 3.4028235E38f;
}
mLockOnOffs = 0;
mLockOnNum = 0;
for (i = 0; i < (s32)ARRAY_SIZE(mActionList); i++) {
mActionList[i].setActor(NULL);
mActionList[i].mWeight = 3.4028235E38f;
}
mActionOffs = 0;
mActionNum = 0;
}
/* 8009E2CC-8009E2F8 .text select_attention__FP10fopAc_ac_cPv */
void select_attention(fopAc_ac_c* pActor, void* i_attention) {
dAttention_c * pAttention = (dAttention_c*)i_attention;
pAttention->SelectAttention(pActor);
}
/* 8009E2F8-8009E33C .text makeList__12dAttention_cFv */
s32 dAttention_c::makeList() {
/* Nonmatching */
}
/* 8009E33C-8009E474 .text SelectAttention__12dAttention_cFP10fopAc_ac_c */
void dAttention_c::SelectAttention(fopAc_ac_c*) {
/* Nonmatching */
}
/* 8009E474-8009E5C4 .text sortList__12dAttention_cFv */
void dAttention_c::sortList() {
/* Nonmatching */
}
/* 8009E5C4-8009E684 .text stockAttention__12dAttention_cFUl */
void dAttention_c::stockAttention(unsigned long interactMask) {
fopAc_ac_c * pTarget = LockonTarget(0);
initList(interactMask);
if (makeList())
sortList();
if (pTarget != mLockOnList[0].getActor()) {
if (pTarget != NULL) {
if (mLockOnList[0].getActor() != NULL)
mFlags |= 2;
} else {
mFlags |= 1;
}
mFlags |= 4;
}
LockonTarget(0);
}
/* 8009E684-8009E728 .text nextAttention__12dAttention_cFUl */
void dAttention_c::nextAttention(unsigned long interactMask) {
fopAc_ac_c * pTarget = fopAcM_SearchByID(mLockOnTargetBsPcID);
initList(interactMask);
if (makeList())
sortList();
if (pTarget == mLockOnList[0].getActor() && mLockOnNum > 1)
mLockOnOffs = 1;
LockonTarget(0);
}
/* 8009E728-8009E764 .text freeAttention__12dAttention_cFv */
s32 dAttention_c::freeAttention() {
mLockOnOffs = 0;
mLockOnNum = 0;
mActionOffs = 0;
mActionNum = 0;
initList(0xFFFFFFFF);
return 0;
}
/* 8009E764-8009E978 .text chaseAttention__12dAttention_cFv */
void dAttention_c::chaseAttention() {
/* Nonmatching */
}
/* 8009E978-8009EA24 .text EnemyDistance__12dAttention_cFP10fopAc_ac_c */
void dAttention_c::EnemyDistance(fopAc_ac_c*) {
/* Nonmatching */
}
/* 8009EA24-8009EAA4 .text sound_attention__FP10fopAc_ac_cPv */
void sound_attention(fopAc_ac_c*, void*) {
/* Nonmatching */
}
/* 8009EAA4-8009EB38 .text runSoundProc__12dAttention_cFv */
void dAttention_c::runSoundProc() {
/* Nonmatching */
}
/* 8009EB38-8009EDB8 .text runDrawProc__12dAttention_cFv */
void dAttention_c::runDrawProc() {
/* Nonmatching */
}
/* 8009EDB8-8009EDBC .text runDebugDisp0__12dAttention_cFv */
void dAttention_c::runDebugDisp0() {
/* Nonmatching */
}
/* 8009EDBC-8009EDC0 .text runDebugDisp__12dAttention_cFv */
void dAttention_c::runDebugDisp() {
/* Nonmatching */
}
/* 8009EDC0-8009EE90 .text judgementButton__12dAttention_cFv */
void dAttention_c::judgementButton() {
/* Nonmatching */
}
/* 8009EE90-8009EED8 .text judgementTriggerProc__12dAttention_cFv */
void dAttention_c::judgementTriggerProc() {
/* Nonmatching */
}
/* 8009EED8-8009EF40 .text judgementLostCheck__12dAttention_cFv */
void dAttention_c::judgementLostCheck() {
/* Nonmatching */
}
/* 8009EF40-8009F0A4 .text judgementStatusSw__12dAttention_cFUl */
void dAttention_c::judgementStatusSw(unsigned long) {
/* Nonmatching */
}
/* 8009F0A4-8009F1D4 .text judgementStatusHd__12dAttention_cFUl */
void dAttention_c::judgementStatusHd(unsigned long) {
/* Nonmatching */
}
/* 8009F1D4-8009F460 .text Run__12dAttention_cFUl */
void dAttention_c::Run(unsigned long) {
/* Nonmatching */
}
/* 8009F460-8009F5FC .text Draw__12dAttention_cFv */
void dAttention_c::Draw() {
/* Nonmatching */
}
/* 8009F5FC-8009F6B4 .text setAnm__10dAttDraw_cFiii */
void dAttDraw_c::setAnm(int, int, int) {
/* Nonmatching */
}
/* 8009F6B4-8009F834 .text draw__10dAttDraw_cFR4cXyzPA4_f */
void dAttDraw_c::draw(cXyz&, float(*)[4]) {
/* Nonmatching */
}
/* 8009F834-8009F88C .text LockonTarget__12dAttention_cFl */
fopAc_ac_c* dAttention_c::LockonTarget(s32 idx) {
if (idx >= mLockOnNum)
return NULL;
s32 listIdx = mLockOnOffs + idx;
if (listIdx >= mLockOnNum)
listIdx -= mLockOnNum;
return mLockOnList[listIdx].getActor();
}
/* 8009F88C-8009F980 .text LockonReleaseDistanse__12dAttention_cFv */
void dAttention_c::LockonReleaseDistanse() {
/* Nonmatching */
}
/* 8009F980-8009F9B8 .text LockonTargetPId__12dAttention_cFl */
unsigned int dAttention_c::LockonTargetPId(s32 idx) {
if (idx >= mLockOnNum)
return NULL;
s32 listIdx = mLockOnOffs + idx;
if (listIdx >= mLockOnNum)
listIdx -= mLockOnNum;
return mLockOnList[listIdx].getPid();
}
/* 8009F9B8-8009FA10 .text ActionTarget__12dAttention_cFl */
fopAc_ac_c* dAttention_c::ActionTarget(s32 idx) {
if (idx >= mActionNum)
return NULL;
s32 listIdx = mActionOffs + idx;
if (listIdx >= mActionNum)
listIdx -= mActionNum;
return mActionList[listIdx].getActor();
}
/* 8009FA10-8009FA64 .text LockonTruth__12dAttention_cFv */
bool dAttention_c::LockonTruth() {
return mLockOnState == 1 || (mLockOnState == 2 && LockonTarget(0));
}
/* 8009FA64-8009FA98 .text getActor__10dAttList_cFv */
fopAc_ac_c* dAttList_c::getActor() {
return fopAcM_SearchByID(mActorID);
}
/* 8009FA98-8009FAB4 .text setActor__10dAttList_cFP10fopAc_ac_c */
void dAttList_c::setActor(fopAc_ac_c* i_actor) {
mActorID = fpcM_GetID(i_actor);
}
/* 8009FAB4-8009FACC .text getPId__10dAttHint_cFPv */
u32 dAttHint_c::getPId(void* i_proc) {
return fpcM_GetID(i_proc);
}
/* 8009FACC-8009FAFC .text convPId__10dAttHint_cFUi */
fopAc_ac_c* dAttHint_c::convPId(unsigned int i_procID) {
return fopAcM_SearchByID(i_procID);
}
/* 8009FAFC-8009FB58 .text request__10dAttHint_cFP10fopAc_ac_ci */
int dAttHint_c::request(fopAc_ac_c* i_actor, int priority) {
if (priority < 0)
priority = 0x1FF;
if (priority <= mPriority) {
mHintActorID = getPId(i_actor);
mPriority = priority;
}
return TRUE;
}
/* 8009FB58-8009FB70 .text init__10dAttHint_cFv */
void dAttHint_c::init() {
mHintActorID = -1;
field_0x8 = -1;
mPriority = 0x200;
}
/* 8009FB70-8009FB8C .text proc__10dAttHint_cFv */
void dAttHint_c::proc() {
field_0x8 = mHintActorID;
mHintActorID = -1;
mPriority = 0x200;
}
/* 8009FB8C-8009FBBC .text convPId__11dAttCatch_cFUi */
fopAc_ac_c* dAttCatch_c::convPId(unsigned int i_procID) {
return fopAcM_SearchByID(i_procID);
}
/* 8009FBBC-8009FBDC .text init__11dAttCatch_cFv */
void dAttCatch_c::init() {
field_0xc = 0x56;
field_0x0 = -1;
mCatghTargetID = -1;
field_0x4 = 3;
}
/* 8009FBDC-8009FC08 .text proc__11dAttCatch_cFv */
void dAttCatch_c::proc() {
mCatghTargetID = field_0x0;
mChangeItem = field_0xc;
field_0x0 = -1;
field_0x4 = 3;
field_0xc = 0x56;
}
/* 8009FC08-8009FE10 .text request__11dAttCatch_cFP10fopAc_ac_cUcfffsi */
void dAttCatch_c::request(fopAc_ac_c*, unsigned char, float, float, float, short, int) {
/* Nonmatching */
}
/* 8009FE10-8009FE40 .text convPId__10dAttLook_cFUi */
fopAc_ac_c* dAttLook_c::convPId(unsigned int i_procID) {
return fopAcM_SearchByID(i_procID);
}
/* 8009FE40-8009FE58 .text init__10dAttLook_cFv */
void dAttLook_c::init() {
field_0x0 = -1;
mLookTargetID = -1;
field_0x4 = 3;
}
/* 8009FE58-8009FE74 .text proc__10dAttLook_cFv */
void dAttLook_c::proc() {
mLookTargetID = field_0x0;
field_0x0 = -1;
field_0x4 = 3;
}
/* 8009FE74-800A009C .text request__10dAttLook_cFP10fopAc_ac_cfffsi */
void dAttLook_c::request(fopAc_ac_c*, float, float, float, short, int) {
/* Nonmatching */
}
/* 800A009C-800A0270 .text requestF__10dAttLook_cFP10fopAc_ac_csi */
void dAttLook_c::requestF(fopAc_ac_c*, short, int) {
/* Nonmatching */
}
|