summaryrefslogtreecommitdiff
path: root/src/d/actor
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2024-04-17 00:15:24 -0400
committerLagoLunatic <LagoLunatic@users.noreply.github.com>2024-04-17 00:15:24 -0400
commit2b71216c8b1c3523888e137a4e50c40a7b739ec1 (patch)
tree11729f8036e67f159d90fb19ddbd54ca8f5721bd /src/d/actor
parentbc85a947e6d074129b0bcf29a2ca8db8e12d63db (diff)
Add enum for attention types
Diffstat (limited to 'src/d/actor')
-rw-r--r--src/d/actor/d_a_am.cpp4
-rw-r--r--src/d/actor/d_a_am2.cpp8
-rw-r--r--src/d/actor/d_a_bk.cpp2
-rw-r--r--src/d/actor/d_a_npc_bs1.cpp6
-rw-r--r--src/d/actor/d_a_npc_btsw2.cpp6
-rw-r--r--src/d/actor/d_a_npc_ji1.cpp16
-rw-r--r--src/d/actor/d_a_npc_kamome.cpp8
-rw-r--r--src/d/actor/d_a_npc_nz.cpp6
-rw-r--r--src/d/actor/d_a_npc_os.cpp4
-rw-r--r--src/d/actor/d_a_obj_mknjd.cpp6
-rw-r--r--src/d/actor/d_a_obj_paper.cpp6
-rw-r--r--src/d/actor/d_a_obj_toripost.cpp6
-rw-r--r--src/d/actor/d_a_rd.cpp4
-rw-r--r--src/d/actor/d_a_tag_etc.cpp2
-rw-r--r--src/d/actor/d_a_tag_msg.cpp2
15 files changed, 43 insertions, 43 deletions
diff --git a/src/d/actor/d_a_am.cpp b/src/d/actor/d_a_am.cpp
index 684251a5..563a8bfd 100644
--- a/src/d/actor/d_a_am.cpp
+++ b/src/d/actor/d_a_am.cpp
@@ -304,7 +304,7 @@ static BOOL medama_atari_check(am_class* i_this) {
ret = true;
if (i_this->mCurrBckIdx == AM_BCK_SLEEP || i_this->mCurrBckIdx == AM_BCK_SLEEP_LOOP) {
anm_init(i_this, AM_BCK_OKIRU, 1.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, -1);
- i_this->attention_info.flags = fopAc_Attn_LOCKON_ENEMY_e;
+ i_this->attention_info.flags = fopAc_Attn_LOCKON_BATTLE_e;
i_this->mNeedleCyl.OnAtSPrmBit(AT_SPRM_SET);
i_this->mNeedleCyl.OnAtHitBit();
i_this->mAction = ACTION_DOUSA;
@@ -527,7 +527,7 @@ static void action_dousa(am_class* i_this) {
if (Line_check(i_this, player->current.pos)) {
anm_init(i_this, AM_BCK_OKIRU, 1.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, -1);
fopAcM_monsSeStart(i_this, JA_SE_CV_AM_AWAKE, 0);
- i_this->attention_info.flags = fopAc_Attn_LOCKON_ENEMY_e;
+ i_this->attention_info.flags = fopAc_Attn_LOCKON_BATTLE_e;
i_this->mNeedleCyl.OnAtSetBit();
i_this->mNeedleCyl.OnAtHitBit();
i_this->mState += 1;
diff --git a/src/d/actor/d_a_am2.cpp b/src/d/actor/d_a_am2.cpp
index 1eb05b3d..52ea0f96 100644
--- a/src/d/actor/d_a_am2.cpp
+++ b/src/d/actor/d_a_am2.cpp
@@ -197,7 +197,7 @@ static BOOL medama_atari_check(am2_class* i_this) {
ret = true;
if (i_this->mCurrBckIdx == AM2_BCK_SLEEP) {
anm_init(i_this, AM2_BCK_WAIT, 1.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, -1);
- i_this->attention_info.flags = fopAc_Attn_LOCKON_ENEMY_e;
+ i_this->attention_info.flags = fopAc_Attn_LOCKON_BATTLE_e;
fopAcM_OnStatus(i_this, fopAcStts_SHOWMAP_e);
i_this->mNeedleCyl.OnAtSetBit();
i_this->mNeedleCyl.OnAtHitBit();
@@ -499,7 +499,7 @@ static void action_dousa(am2_class* i_this) {
cXyz centerPos = player->current.pos;
centerPos.y += 100.0f + g_regHIO.mChild[12].mFloatRegs[19];
if (Line_check(i_this, centerPos)) {
- i_this->attention_info.flags = fopAc_Attn_LOCKON_ENEMY_e;
+ i_this->attention_info.flags = fopAc_Attn_LOCKON_BATTLE_e;
fopAcM_OnStatus(i_this, fopAcStts_SHOWMAP_e);
anm_init(i_this, AM2_BCK_START, 1.0f, J3DFrameCtrl::LOOP_ONCE_e, 1.0f, -1);
fopAcM_monsSeStart(i_this, JA_SE_CV_AM2_AWAKE, 0);
@@ -785,7 +785,7 @@ static void action_mahi(am2_class* i_this) {
actor->shape_angle.y += 0x1000;
if (i_this->mAcch.ChkGroundHit()) {
actor->gravity = -3.0f;
- actor->attention_info.flags = fopAc_Attn_LOCKON_ENEMY_e;
+ actor->attention_info.flags = fopAc_Attn_LOCKON_BATTLE_e;
fopAcM_OnStatus(actor, fopAcStts_SHOWMAP_e);
i_this->mAction = ACTION_DOUSA;
i_this->mState = 3;
@@ -1329,7 +1329,7 @@ static s32 daAM2_Create(fopAc_ac_c* i_actor) {
i_this->mEnemyIce.mpActor = i_this;
i_this->mEnemyIce.mWallRadius = 50.0f;
i_this->mEnemyIce.mCylHeight = 100.0f;
- i_this->attention_info.distances[4] = 9;
+ i_this->attention_info.distances[fopAc_Attn_TYPE_CARRY_e] = 9;
fopAcM_OnStatus(i_this, fopAcStts_UNK8000000_e);
diff --git a/src/d/actor/d_a_bk.cpp b/src/d/actor/d_a_bk.cpp
index 2c51321f..78a62244 100644
--- a/src/d/actor/d_a_bk.cpp
+++ b/src/d/actor/d_a_bk.cpp
@@ -1954,7 +1954,7 @@ static BOOL daBk_Execute(bk_class* i_this) {
}
}
- i_this->attention_info.flags = fopAc_Attn_LOCKON_ENEMY_e;
+ i_this->attention_info.flags = fopAc_Attn_LOCKON_BATTLE_e;
fopAcM_OnStatus(i_this, fopAcStts_SHOWMAP_e);
i_this->m02F0 = 0;
i_this->m02F4 = 0;
diff --git a/src/d/actor/d_a_npc_bs1.cpp b/src/d/actor/d_a_npc_bs1.cpp
index 66907083..7ec60a00 100644
--- a/src/d/actor/d_a_npc_bs1.cpp
+++ b/src/d/actor/d_a_npc_bs1.cpp
@@ -1620,9 +1620,9 @@ BOOL daNpc_Bs1_c::CreateInit() {
m726.y = current.angle.y;
m726.z = current.angle.z;
- attention_info.flags = fopAc_Attn_LOCKON_TALK_e | fopAc_Attn_ACTION_TALK_e;
- attention_info.distances[1] = 0xAA;
- attention_info.distances[3] = 0xAA;
+ attention_info.flags = fopAc_Attn_LOCKON_TALK_e | fopAc_Attn_ACTION_SPEAK_e;
+ attention_info.distances[fopAc_Attn_TYPE_TALK_e] = 0xAA;
+ attention_info.distances[fopAc_Attn_TYPE_SPEAK_e] = 0xAA;
gravity = -30.0f;
diff --git a/src/d/actor/d_a_npc_btsw2.cpp b/src/d/actor/d_a_npc_btsw2.cpp
index d9bb9bc8..c422e790 100644
--- a/src/d/actor/d_a_npc_btsw2.cpp
+++ b/src/d/actor/d_a_npc_btsw2.cpp
@@ -458,7 +458,7 @@ BOOL daNpc_Btsw2_c::CreateHeap() {
/* 00000EFC-000010F8 .text CreateInit__13daNpc_Btsw2_cFv */
BOOL daNpc_Btsw2_c::CreateInit() {
m714 = current.angle;
- attention_info.flags = fopAc_Attn_LOCKON_TALK_e | fopAc_Attn_ACTION_TALK_e;
+ attention_info.flags = fopAc_Attn_LOCKON_TALK_e | fopAc_Attn_ACTION_SPEAK_e;
gravity = -30.0f;
setAction(&daNpc_Btsw2_c::wait_action, NULL);
mAttPos = current.pos;
@@ -476,8 +476,8 @@ BOOL daNpc_Btsw2_c::CreateInit() {
m736 = 0;
mPathPntIdx = 0;
mEventCut.setActorInfo2("Btsw2", this);
- attention_info.distances[1] = 0xAB;
- attention_info.distances[3] = 0xAB;
+ attention_info.distances[fopAc_Attn_TYPE_TALK_e] = 0xAB;
+ attention_info.distances[fopAc_Attn_TYPE_SPEAK_e] = 0xAB;
return TRUE;
}
diff --git a/src/d/actor/d_a_npc_ji1.cpp b/src/d/actor/d_a_npc_ji1.cpp
index b642e85f..1b5e5f27 100644
--- a/src/d/actor/d_a_npc_ji1.cpp
+++ b/src/d/actor/d_a_npc_ji1.cpp
@@ -2210,8 +2210,8 @@ u32 daNpc_Ji1_c::battleAction(void*) {
field_0xC3C = 0;
setAnm(5, 0.0f, 0);
attention_info.flags |= fopAc_Attn_LOCKON_MISC_e;
- attention_info.flags |= fopAc_Attn_LOCKON_ENEMY_e;
- attention_info.distances[2] = 3;
+ attention_info.flags |= fopAc_Attn_LOCKON_BATTLE_e;
+ attention_info.distances[fopAc_Attn_TYPE_BATTLE_e] = 3;
field_0xC30 = (s16)cM_rndF(150.0f) + 30;
field_0xD70 = 0;
field_0xD6C = 0;
@@ -2220,8 +2220,8 @@ u32 daNpc_Ji1_c::battleAction(void*) {
field_0xC78++;
}
else if(field_0xC78 == -1) {
- attention_info.flags &= ~fopAc_Attn_LOCKON_ENEMY_e;
- attention_info.distances[2] = 0xB5;
+ attention_info.flags &= ~fopAc_Attn_LOCKON_BATTLE_e;
+ attention_info.distances[fopAc_Attn_TYPE_BATTLE_e] = 0xB5;
}
else {
cXyz temp = player->current.pos - current.pos;
@@ -2896,7 +2896,7 @@ BOOL daNpc_Ji1_c::CreateInit() {
fopAcM_SetMtx(this, field_0x330->getModel()->getBaseTRMtx());
fopAcM_setCullSizeBox(this, -70.0f, 0.0f, -70.0f, 70.0f, 200.0f, 70.0f);
gravity = -30.0f;
- attention_info.flags = fopAc_Attn_LOCKON_MISC_e | fopAc_Attn_LOCKON_TALK_e | fopAc_Attn_ACTION_TALK_e;
+ attention_info.flags = fopAc_Attn_LOCKON_MISC_e | fopAc_Attn_LOCKON_TALK_e | fopAc_Attn_ACTION_SPEAK_e;
field_0x638.Init(0xFF, 0xFF, this);
field_0x674.Init(0xFF, 0xFF, this);
@@ -3062,9 +3062,9 @@ BOOL daNpc_Ji1_c::CreateInit() {
field_0xD7E = 0;
attention_info.flags |= fopAc_Attn_LOCKON_MISC_e;
- attention_info.distances[1] = 0xA9;
- attention_info.distances[3] = 0xA9;
- attention_info.distances[2] = 0xB5;
+ attention_info.distances[fopAc_Attn_TYPE_TALK_e] = 0xA9;
+ attention_info.distances[fopAc_Attn_TYPE_SPEAK_e] = 0xA9;
+ attention_info.distances[fopAc_Attn_TYPE_BATTLE_e] = 0xB5;
field_0x414 = 0.0f;
field_0x42C = 0.0f;
field_0x430 = 0;
diff --git a/src/d/actor/d_a_npc_kamome.cpp b/src/d/actor/d_a_npc_kamome.cpp
index 830e47bc..6118eb9c 100644
--- a/src/d/actor/d_a_npc_kamome.cpp
+++ b/src/d/actor/d_a_npc_kamome.cpp
@@ -438,8 +438,8 @@ BOOL daNpc_kam_c::init() {
setBaseMtx();
attention_info.flags = 0;
- attention_info.distances[1] = 38;
- attention_info.distances[3] = 38;
+ attention_info.distances[fopAc_Attn_TYPE_TALK_e] = 38;
+ attention_info.distances[fopAc_Attn_TYPE_SPEAK_e] = 38;
for (int i = 0; i < 3; i++) {
mEventIdxs[i] = dComIfGp_evmng_getEventIdx(event_name_tbl[i]);
@@ -650,10 +650,10 @@ int daNpc_kam_c::waitNpcAction(void*) {
mC0C = cLib_getRndValue(10, 80);
} else if (mActionStatus != ACTION_ENDING) {
if (changeAreaCheck()) {
- attention_info.flags |= fopAc_Attn_ACTION_TALK_e | fopAc_Attn_TALKFLAG_NOTALK_e;
+ attention_info.flags |= fopAc_Attn_ACTION_SPEAK_e | fopAc_Attn_TALKFLAG_NOTALK_e;
mEventState = 6;
} else {
- attention_info.flags &= ~(fopAc_Attn_ACTION_TALK_e | fopAc_Attn_TALKFLAG_NOTALK_e);
+ attention_info.flags &= ~(fopAc_Attn_ACTION_SPEAK_e | fopAc_Attn_TALKFLAG_NOTALK_e);
mEventState = -1;
}
diff --git a/src/d/actor/d_a_npc_nz.cpp b/src/d/actor/d_a_npc_nz.cpp
index b62ba03c..8d8fe90d 100644
--- a/src/d/actor/d_a_npc_nz.cpp
+++ b/src/d/actor/d_a_npc_nz.cpp
@@ -860,9 +860,9 @@ BOOL daNpc_Nz_c::createInit() {
fopAcM_SetMtx(this, mpMorf->getModel()->getBaseTRMtx());
fopAcM_setCullSizeBox(this, -450.0f, -50.0f, -450.0f, 450.0f, 750.0f, 450.0f);
fopAcM_setCullSizeFar(this, 10.0f);
- attention_info.distances[1] = 0xB1;
- attention_info.distances[3] = 0xB1;
- attention_info.flags = fopAc_Attn_ACTION_TALK_e | fopAc_Attn_TALKFLAG_NOTALK_e;
+ attention_info.distances[fopAc_Attn_TYPE_TALK_e] = 0xB1;
+ attention_info.distances[fopAc_Attn_TYPE_SPEAK_e] = 0xB1;
+ attention_info.flags = fopAc_Attn_ACTION_SPEAK_e | fopAc_Attn_TALKFLAG_NOTALK_e;
eventInfo.setXyCheckCB(&daNpc_Nz_XyCheckCB);
eventInfo.setXyEventCB(&daNpc_Nz_XyEventCB);
mEventCut.setActorInfo2("NpcNz", this);
diff --git a/src/d/actor/d_a_npc_os.cpp b/src/d/actor/d_a_npc_os.cpp
index 1ed40528..ebe0727a 100644
--- a/src/d/actor/d_a_npc_os.cpp
+++ b/src/d/actor/d_a_npc_os.cpp
@@ -713,7 +713,7 @@ BOOL daNpc_Os_c::waitNpcAction(void*) {
}
}
- attention_info.flags &= ~(fopAc_Attn_LOCKON_TALK_e | fopAc_Attn_ACTION_TALK_e);
+ attention_info.flags &= ~(fopAc_Attn_LOCKON_TALK_e | fopAc_Attn_ACTION_SPEAK_e);
f32 dist = fopAcM_searchPlayerDistance2(this);
if(!checkNpcCallCommand()) {
@@ -1961,7 +1961,7 @@ BOOL daNpc_Os_c::init() {
cXyz dummy(0.0f, 0.0f, 0.0f);
field_0x794 = fopAcM_GetParam(this) >> 0x10 & 0xFF;
- attention_info.distances[4] = 0x27;
+ attention_info.distances[fopAc_Attn_TYPE_CARRY_e] = 0x27;
// Fakematch, the next two lines get optimized out, but they affect the regalloc when copying the tevstr.
speedF = speedF;
speedF = speedF;
diff --git a/src/d/actor/d_a_obj_mknjd.cpp b/src/d/actor/d_a_obj_mknjd.cpp
index 16060803..1264d27b 100644
--- a/src/d/actor/d_a_obj_mknjd.cpp
+++ b/src/d/actor/d_a_obj_mknjd.cpp
@@ -277,9 +277,9 @@ int daObjMknjD::Act_c::Create() {
m0430 = 0x2920;
}
- attention_info.distances[1] = 0x3D;
- attention_info.distances[3] = 0x3D;
- attention_info.flags |= fopAc_Attn_ACTION_TALK_e | fopAc_Attn_TALKFLAG_CHECK_e;
+ attention_info.distances[fopAc_Attn_TYPE_TALK_e] = 0x3D;
+ attention_info.distances[fopAc_Attn_TYPE_SPEAK_e] = 0x3D;
+ attention_info.flags |= fopAc_Attn_ACTION_SPEAK_e | fopAc_Attn_TALKFLAG_CHECK_e;
if (!checkItemGet(mGiveItemNo, 1)) {
m043F = 8;
diff --git a/src/d/actor/d_a_obj_paper.cpp b/src/d/actor/d_a_obj_paper.cpp
index 110c5677..cb9d3711 100644
--- a/src/d/actor/d_a_obj_paper.cpp
+++ b/src/d/actor/d_a_obj_paper.cpp
@@ -117,9 +117,9 @@ namespace daObjPaper {
eyePos.y += attr(mType).mEyeOffset;
attention_info.position.y += attr(mType).mAttentionOffset;
- attention_info.distances[1] = attr(mType).mAttentionDist1;
- attention_info.distances[3] = attr(mType).mAttentionDist2;
- attention_info.flags |= fopAc_Attn_LOCKON_TALK_e | fopAc_Attn_ACTION_TALK_e | fopAc_Attn_TALKFLAG_READ_e;
+ attention_info.distances[fopAc_Attn_TYPE_TALK_e] = attr(mType).mAttentionDist1;
+ attention_info.distances[fopAc_Attn_TYPE_SPEAK_e] = attr(mType).mAttentionDist2;
+ attention_info.flags |= fopAc_Attn_LOCKON_TALK_e | fopAc_Attn_ACTION_SPEAK_e | fopAc_Attn_TALKFLAG_READ_e;
mMsgId = fpcM_ERROR_PROCESS_ID_e;
diff --git a/src/d/actor/d_a_obj_toripost.cpp b/src/d/actor/d_a_obj_toripost.cpp
index c8fa94cc..7b263ba6 100644
--- a/src/d/actor/d_a_obj_toripost.cpp
+++ b/src/d/actor/d_a_obj_toripost.cpp
@@ -916,9 +916,9 @@ void daObjTpost_c::createInit() {
mCurrMsgBsPcId = fpcM_ERROR_PROCESS_ID_e;
mpCurrMsg = 0;
- attention_info.distances[1] = 5;
- attention_info.distances[3] = 6;
- attention_info.flags = fopAc_Attn_LOCKON_TALK_e | fopAc_Attn_ACTION_TALK_e | fopAc_Attn_TALKFLAG_CHECK_e;
+ attention_info.distances[fopAc_Attn_TYPE_TALK_e] = 5;
+ attention_info.distances[fopAc_Attn_TYPE_SPEAK_e] = 6;
+ attention_info.flags = fopAc_Attn_LOCKON_TALK_e | fopAc_Attn_ACTION_SPEAK_e | fopAc_Attn_TALKFLAG_CHECK_e;
setAnm(1, false);
setMtx();
diff --git a/src/d/actor/d_a_rd.cpp b/src/d/actor/d_a_rd.cpp
index bd6b57e1..ab1cf235 100644
--- a/src/d/actor/d_a_rd.cpp
+++ b/src/d/actor/d_a_rd.cpp
@@ -1344,10 +1344,10 @@ void daRd_c::modeProc(daRd_c::Proc_e proc, int newMode) {
if (newMode == MODE_DEATH || newMode == MODE_SW_WAIT) {
fopAcM_OffStatus(this, fopAcStts_SHOWMAP_e);
- cLib_offBit<u32>(attention_info.flags, fopAc_Attn_LOCKON_ENEMY_e);
+ cLib_offBit<u32>(attention_info.flags, fopAc_Attn_LOCKON_BATTLE_e);
} else {
fopAcM_OnStatus(this, fopAcStts_SHOWMAP_e);
- cLib_onBit<u32>(attention_info.flags, fopAc_Attn_LOCKON_ENEMY_e);
+ cLib_onBit<u32>(attention_info.flags, fopAc_Attn_LOCKON_BATTLE_e);
}
mMode = newMode;
diff --git a/src/d/actor/d_a_tag_etc.cpp b/src/d/actor/d_a_tag_etc.cpp
index a973a01f..5873d345 100644
--- a/src/d/actor/d_a_tag_etc.cpp
+++ b/src/d/actor/d_a_tag_etc.cpp
@@ -125,7 +125,7 @@ s32 daTag_Etc_c::create() {
shape_angle.x = 0;
current.angle.z = 0;
current.angle.x = 0;
- attention_info.flags = fopAc_Attn_ACTION_TALK_e;
+ attention_info.flags = fopAc_Attn_ACTION_SPEAK_e;
attention_info.position.y += 150.0f;
eyePos.y += 150.0f;
return cPhs_COMPLEATE_e;
diff --git a/src/d/actor/d_a_tag_msg.cpp b/src/d/actor/d_a_tag_msg.cpp
index 9ef52e81..92578f4b 100644
--- a/src/d/actor/d_a_tag_msg.cpp
+++ b/src/d/actor/d_a_tag_msg.cpp
@@ -265,7 +265,7 @@ s32 daTag_Msg_c::create() {
shape_angle.x = 0;
current.angle.z = 0;
current.angle.x = 0;
- attention_info.flags = fopAc_Attn_ACTION_TALK_e | fopAc_Attn_TALKFLAG_CHECK_e;
+ attention_info.flags = fopAc_Attn_ACTION_SPEAK_e | fopAc_Attn_TALKFLAG_CHECK_e;
if (getMessage() != 0x836) {
attention_info.position.y += 150;
eyePos.y += 150.0f;