Skip to content

Commit 8e1c5ba

Browse files
committed
attn flags
1 parent 5601fc8 commit 8e1c5ba

File tree

212 files changed

+579
-636
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

212 files changed

+579
-636
lines changed

include/d/actor/d_a_npc_cdn3.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,11 +292,11 @@ class daNpcCdn3_c : public daNpcCd2_c {
292292
int chkEvent() {
293293
attention_info.flags = 0;
294294
if (mFlowNodeNum > 0) {
295-
attention_info.flags = 0xa;
295+
attention_info.flags = fopAc_AttnFlag_SPEAK_e | fopAc_AttnFlag_TALK_e;
296296
}
297297
if (mIsDarkWorld) {
298298
if (daPy_py_c::checkNowWolfEyeUp()) {
299-
attention_info.flags |= 0xc00000;
299+
attention_info.flags |= (fopAc_AttnFlag_UNK_0x800000 | fopAc_AttnFlag_UNK_0x400000);
300300
} else {
301301
attention_info.flags = 0;
302302
}
@@ -314,7 +314,7 @@ class daNpcCdn3_c : public daNpcCd2_c {
314314
}
315315

316316
int orderEvent() {
317-
if ((!mIsDarkWorld || daPy_py_c::checkNowWolfEyeUp()) && mFlowNodeNum > 0 && ((attention_info.flags & 8) || (attention_info.flags & 2))) {
317+
if ((!mIsDarkWorld || daPy_py_c::checkNowWolfEyeUp()) && mFlowNodeNum > 0 && ((attention_info.flags & fopAc_AttnFlag_SPEAK_e) || (attention_info.flags & fopAc_AttnFlag_TALK_e))) {
318318
eventInfo.onCondition(dEvtCnd_CANTALK_e);
319319
}
320320
return 1;

include/f_op/f_op_actor.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ enum fopAc_AttentionFlag_e {
132132
fopAc_AttnFlag_UNK_0x800000 = 0x800000,
133133
fopAc_AttnFlag_NOTALK_e = 0x2000000,
134134
fopAc_AttnFlag_ENEMY_NOLOCK_e = 0x4000000,
135+
fopAc_AttnFlag_UNK_0x8000000 = 0x8000000,
135136
fopAc_AttnFlag_TALKCHECK_e = 0x20000000,
136137
fopAc_AttnFlag_TALKREAD_e = 0x40000000,
137138
};

src/d/actor/d_a_L7op_demo_dr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ int daL7ODR_c::create() {
833833
scale.setall(1.0f);
834834

835835
attention_info.distances[fopAc_attn_BATTLE_e] = 0;
836-
attention_info.flags &= ~0x4;
836+
attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e;
837837

838838
fopAcM_SetGroup(this, 0);
839839
fopAcM_OffStatus(this, 0);

src/d/actor/d_a_alink.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10040,21 +10040,21 @@ BOOL daAlink_c::setTalkStatus() {
1004010040
if (notTalk()) {
1004110041
setDoStatus(0x90);
1004210042
} else {
10043-
if (field_0x27f4->attention_info.flags & 0x2000000) {
10043+
if (field_0x27f4->attention_info.flags & fopAc_AttnFlag_NOTALK_e) {
1004410044
return 0;
1004510045
}
1004610046

10047-
if (field_0x27f4->attention_info.flags & 0x800000) {
10047+
if (field_0x27f4->attention_info.flags & fopAc_AttnFlag_UNK_0x800000) {
1004810048
setDoStatus(0x3B);
10049-
} else if (field_0x27f4->attention_info.flags & 0x20000000) {
10049+
} else if (field_0x27f4->attention_info.flags & fopAc_AttnFlag_TALKCHECK_e) {
1005010050
if (fopAcM_GetName(field_0x27f4) == PROC_OBJ_SSDRINK) {
1005110051
setDoStatus(0x3C);
1005210052
} else {
1005310053
setDoStatus(8);
1005410054
}
10055-
} else if (field_0x27f4->attention_info.flags & 0x40000000) {
10055+
} else if (field_0x27f4->attention_info.flags & fopAc_AttnFlag_TALKREAD_e) {
1005610056
setDoStatus(0x80);
10057-
} else if (field_0x27f4->attention_info.flags & 0x8000000) {
10057+
} else if (field_0x27f4->attention_info.flags & fopAc_AttnFlag_UNK_0x8000000) {
1005810058
setDoStatus(0x1B);
1005910059
} else {
1006010060
setDoStatus(0x1C);
@@ -17849,7 +17849,7 @@ int daAlink_c::execute() {
1784917849
mProcID == PROC_WOLF_GET_SMELL || mProcID == PROC_WOLF_DIG ||
1785017850
mProcID == PROC_WOLF_DIG_THROUGH || checkNoResetFlg0(FLG0_UNK_4000) ||
1785117851
dComIfGp_checkPlayerStatus1(0, 0x1000000) ||
17852-
(checkEventRun() && partner != NULL && (partner->attention_info.flags & 0x400000)) ||
17852+
(checkEventRun() && partner != NULL && (partner->attention_info.flags & fopAc_AttnFlag_UNK_0x400000)) ||
1785317853
!strcmp(dComIfGp_getEventManager().getRunEventName(), l_defaultGetEventName))
1785417854
{
1785517855
mWolfEyeUp = daAlinkHIO_wolf_c0::m.mSensesLingerTime;

src/d/actor/d_a_alink_guard.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ BOOL daAlink_c::checkSpecialNpc(fopAc_ac_c* i_actor) {
3131

3232
/* 800DC5DC-800DC678 0D6F1C 009C+00 1/1 0/0 0/0 .text checkShieldAttackEmphasys__9daAlink_cFv */
3333
BOOL daAlink_c::checkShieldAttackEmphasys() {
34-
return mTargetedActor != NULL && (mTargetedActor->attention_info.flags & 0x200000) &&
34+
return mTargetedActor != NULL && (mTargetedActor->attention_info.flags & fopAc_AttnFlag_UNK_0x200000) &&
3535
!checkCutHeadState() &&
3636
(fopAcM_GetGroup(mTargetedActor) != fopAc_ENEMY_e ||
3737
!static_cast<fopEn_enemy_c*>(mTargetedActor)->checkDownFlg());

src/d/actor/d_a_alink_wolf.inc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6184,7 +6184,7 @@ BOOL daAlink_c::checkMidnaDisappearMode() const {
61846184
return mProcID == PROC_WOLF_DIG_THROUGH ||
61856185
(checkWolf() && dComIfGp_checkPlayerStatus0(0, 0x8000000) &&
61866186
!dComIfGp_checkPlayerStatus0(0, 0x10) &&
6187-
(mTargetedActor == NULL || !(mTargetedActor->attention_info.flags & 0x800000)));
6187+
(mTargetedActor == NULL || !(mTargetedActor->attention_info.flags & fopAc_AttnFlag_UNK_0x800000)));
61886188
}
61896189

61906190
/* 801371FC-801372B4 131B3C 00B8+00 3/3 0/0 0/0 .text checkWolfLieContinue__9daAlink_cFi
@@ -6193,7 +6193,7 @@ BOOL daAlink_c::checkWolfLieContinue(int param_0) {
61936193
cM3dGPla slide_poly;
61946194

61956195
if ((param_0 ||
6196-
((mTargetedActor != NULL && (mTargetedActor->attention_info.flags & 0x800000)) &&
6196+
((mTargetedActor != NULL && (mTargetedActor->attention_info.flags & fopAc_AttnFlag_UNK_0x800000)) &&
61976197
(fopAcM_GetName(mTargetedActor) == PROC_NPC_JAGAR ||
61986198
fopAcM_GetName(mTargetedActor) == PROC_NPC_BOU))) &&
61996199
!getSlidePolygon(&slide_poly) && !checkWolfLieWaterIn())
@@ -7087,7 +7087,7 @@ void daAlink_c::searchWolfLockEnemy(fopAc_ac_c* i_actor, void* i_data) {
70877087
}
70887088

70897089
fopEn_enemy_c* enemy_p = static_cast<fopEn_enemy_c*>(i_actor);
7090-
if (fopAcM_GetGroup(enemy_p) == 2 && enemy_p->attention_info.flags & 5 &&
7090+
if (fopAcM_GetGroup(enemy_p) == 2 && enemy_p->attention_info.flags & (fopAc_AttnFlag_BATTLE_e | fopAc_AttnFlag_LOCK_e) &&
70917091
!enemy_p->checkWolfNoLock())
70927092
{
70937093
f32 dist_to_enemy = current.pos.abs2(enemy_p->eyePos);

src/d/actor/d_a_b_bh.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,7 +1157,7 @@ static void action(b_bh_class* i_this) {
11571157

11581158
if (spC != 0) {
11591159
fopAcM_OnStatus(a_this, 0);
1160-
a_this->attention_info.flags = 4;
1160+
a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e;
11611161
} else {
11621162
fopAcM_OffStatus(a_this, 0);
11631163
a_this->attention_info.flags = 0;
@@ -1524,7 +1524,7 @@ static int daB_BH_Create(fopAc_ac_c* i_this) {
15241524
l_HIO.no = mDoHIO_CREATE_CHILD("ボスババ触手", &l_HIO);
15251525
}
15261526

1527-
i_this->attention_info.flags = 4;
1527+
i_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e;
15281528
i_this->health = 1;
15291529
i_this->field_0x560 = 1;
15301530

src/d/actor/d_a_b_bq.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2523,7 +2523,7 @@ static int daB_BQ_Create(fopAc_ac_c* i_this) {
25232523
l_HIO.field_0x4 = -1;
25242524
}
25252525

2526-
a_this->attention_info.flags = 4;
2526+
a_this->attention_info.flags = fopAc_AttnFlag_BATTLE_e;
25272527
a_this->attention_info.distances[fopAc_attn_BATTLE_e] = 0x16;
25282528

25292529
static dCcD_SrcSph cc_sph_src = {

src/d/actor/d_a_b_dr.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -542,21 +542,21 @@ void daB_DR_c::mStatusONOFF(int i_status) {
542542
switch (i_status) {
543543
case 0:
544544
attention_info.distances[fopAc_attn_BATTLE_e] = 0;
545-
attention_info.flags &= ~4;
545+
attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e;
546546
fopAcM_OffStatus(this, 0);
547547
fopAcM_OffStatus(this, 0x200000);
548548
return;
549549
case 1:
550550
attention_info.distances[fopAc_attn_BATTLE_e] = 85;
551-
attention_info.flags |= 4;
551+
attention_info.flags |= fopAc_AttnFlag_BATTLE_e;
552552
fopAcM_OnStatus(this, 0);
553553
fopAcM_OnStatus(this, 0x200000);
554554
return;
555555
case 2:
556556
attention_info.distances[fopAc_attn_BATTLE_e] = 60;
557557
fopAcM_OnStatus(this, 0);
558558
fopAcM_OffStatus(this, 0x200000);
559-
attention_info.flags |= 4;
559+
attention_info.flags |= fopAc_AttnFlag_BATTLE_e;
560560
return;
561561
}
562562
}
@@ -2370,18 +2370,18 @@ void daB_DR_c::executeBreathAttack() {
23702370
mTimer[3] = 1000;
23712371
}
23722372

2373-
attention_info.flags |= 4;
2373+
attention_info.flags |= fopAc_AttnFlag_BATTLE_e;
23742374

23752375
if (cLib_calcTimer<int>(&mTimer[3]) != 0 && mTargetHeight - 300.0f < player->current.pos.y) {
23762376
if (abs((s16)(fopAcM_searchPlayerAngleY(this) - shape_angle.y)) < ZREG_S(0) + 0x5000) {
23772377
mWeekCc.OffTgSetBit();
2378-
attention_info.flags &= ~0x4;
2378+
attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e;
23792379
} else {
23802380
mWeekCc.OnTgSetBit();
23812381
if (mTarget != 0 || (dComIfGp_getAttention()->GetLockonList(0) != NULL && dComIfGp_getAttention()->LockonTruth() && dComIfGp_getAttention()->GetLockonList(0)->getActor() == this)) {
23822382
mTarget = 0;
23832383
} else {
2384-
attention_info.flags &= ~0x4;
2384+
attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e;
23852385
mTarget = 0;
23862386
}
23872387
}
@@ -2798,7 +2798,7 @@ void daB_DR_c::executeGliderAttack() {
27982798
if (mGliderMoveSub(field_0x748) != 0) {
27992799
mStatusONOFF(0);
28002800
attention_info.distances[fopAc_attn_BATTLE_e] = 0;
2801-
attention_info.flags &= ~0x4;
2801+
attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e;
28022802
fopAcM_OffStatus(this, 0);
28032803

28042804
mCount[2] = 0;
@@ -4128,7 +4128,7 @@ int daB_DR_c::create() {
41284128
OS_REPORT("パーツ %d\n", mPartNo);
41294129
case 10:
41304130
attention_info.distances[fopAc_attn_BATTLE_e] = 0;
4131-
attention_info.flags &= ~0x4;
4131+
attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e;
41324132

41334133
fopAcM_SetGroup(this, 0);
41344134
fopAcM_OffStatus(this, 0);
@@ -4224,7 +4224,7 @@ int daB_DR_c::create() {
42244224
shape_angle.y = current.angle.y;
42254225

42264226
attention_info.distances[fopAc_attn_BATTLE_e] = 85;
4227-
attention_info.flags = 4;
4227+
attention_info.flags = fopAc_AttnFlag_BATTLE_e;
42284228

42294229
fopAcM_SetMtx(this, mpModelMorf->getModel()->getBaseTRMtx());
42304230
fopAcM_SetMin(this, -20000.0f, -20000.0f, -20000.0f);

src/d/actor/d_a_b_ds.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1707,7 +1707,7 @@ void daB_DS_c::executeOpeningDemo() {
17071707
dComIfGp_event_reset();
17081708

17091709
attention_info.distances[fopAc_attn_BATTLE_e] = 0;
1710-
attention_info.flags = 4;
1710+
attention_info.flags = fopAc_AttnFlag_BATTLE_e;
17111711
fopAcM_SetGroup(this, 2);
17121712
fopAcM_OnStatus(this, 0);
17131713

@@ -2863,7 +2863,7 @@ void daB_DS_c::executeBattle2OpeningDemo() {
28632863
dComIfGs_setRestartRoom(vec, -0x664A, 50);
28642864

28652865
attention_info.distances[fopAc_attn_BATTLE_e] = 0;
2866-
attention_info.flags = 4;
2866+
attention_info.flags = fopAc_AttnFlag_BATTLE_e;
28672867
fopAcM_SetGroup(this, 2);
28682868

28692869
Z2GetAudioMgr()->bgmStart(Z2BGM_HARAGIGANT_BTL02, 0, 0);
@@ -5376,7 +5376,7 @@ int daB_DS_c::CreateHeap() {
53765376
current.pos.set(0.0f, 1900.0f, 0.0f);
53775377

53785378
attention_info.distances[fopAc_attn_BATTLE_e] = 0;
5379-
attention_info.flags = 4;
5379+
attention_info.flags = fopAc_AttnFlag_BATTLE_e;
53805380

53815381
fopAcM_SetGroup(this, 2);
53825382
fopAcM_OnStatus(this, 0);
@@ -5562,7 +5562,7 @@ cPhs__Step daB_DS_c::create() {
55625562

55635563
if (arg0 == TYPE_BULLET_A || arg0 == TYPE_BULLET_B || arg0 == TYPE_BULLET_C) {
55645564
attention_info.distances[fopAc_attn_BATTLE_e] = 0;
5565-
attention_info.flags &= ~4;
5565+
attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e;
55665566

55675567
fopAcM_SetGroup(this, 0);
55685568
fopAcM_OffStatus(this, 0);
@@ -5573,7 +5573,7 @@ cPhs__Step daB_DS_c::create() {
55735573
mBreathAtSph.SetStts(&mCcStts);
55745574

55755575
fopAcM_OffStatus(this, 0);
5576-
attention_info.flags &= ~4;
5576+
attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e;
55775577

55785578
if (arg0 == TYPE_BULLET_B || arg0 == TYPE_BULLET_C) {
55795579
mAcch.Set(fopAcM_GetPosition_p(this), fopAcM_GetOldPosition_p(this), this, 1,
@@ -5605,7 +5605,7 @@ cPhs__Step daB_DS_c::create() {
56055605
shape_angle.y = current.angle.y;
56065606

56075607
attention_info.distances[fopAc_attn_BATTLE_e] = 0;
5608-
attention_info.flags = 4;
5608+
attention_info.flags = fopAc_AttnFlag_BATTLE_e;
56095609

56105610
fopAcM_SetMtx(this, mpMorf->mpModel->getBaseTRMtx());
56115611
fopAcM_SetMin(this, -40000.0f, -40000.0f, -40000.0f);
@@ -5707,7 +5707,7 @@ cPhs__Step daB_DS_c::create() {
57075707
}
57085708

57095709
attention_info.distances[fopAc_attn_BATTLE_e] = 0;
5710-
attention_info.flags &= ~4;
5710+
attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e;
57115711

57125712
fopAcM_SetGroup(this, 0);
57135713
fopAcM_OffStatus(this, 0);
@@ -5740,7 +5740,7 @@ cPhs__Step daB_DS_c::create() {
57405740
gravity = -1.0f;
57415741

57425742
attention_info.distances[fopAc_attn_BATTLE_e] = 0;
5743-
attention_info.flags &= ~4;
5743+
attention_info.flags &= ~fopAc_AttnFlag_BATTLE_e;
57445744

57455745
fopAcM_SetGroup(this, 0);
57465746
fopAcM_OffStatus(this, 0);

0 commit comments

Comments
 (0)