summaryrefslogtreecommitdiff
path: root/src/d/actor/d_a_e_fz.cpp
diff options
context:
space:
mode:
authorHuitzi <73550465+marwernerh@users.noreply.github.com>2026-03-09 21:33:31 -0400
committerGitHub <noreply@github.com>2026-03-09 18:33:31 -0700
commit0b0fdd1f60193d1e3e610326cc2cf2a7b558d366 (patch)
treea39b648ba460b5f80dad748690fa43f6f780e5a6 /src/d/actor/d_a_e_fz.cpp
parent30e839c28be83fb07bfbe008d3eb9eb9127e3801 (diff)
Actor status consolidation & process profile definition editing (#3117)
* Consolidate fopAcM_STATUS into fopAc_Status_e * Add _e suffix to fopAcStts enums * Prepare for profile enumeration * Correct typo in scene_process_profile_definition * Manually handle g_profile_Obj_DamCps (inline preprocessing) * Correct g_profile_TAG_LV5SOUP procname to enum * Create d_priority.h * Update process profile definitions * Moved inline comments to the left * Add missing fopAcStts enums * Add d_priority.h include in f_pc_leaf.h * Manually update d_a_obj_damCps profile * Replace fopAcStts enums replacing and anticipatory profile size correction * Changed profile size from literal to sizeof() in anticipation of PR #3116 * Provided putative names to staff-related status enums * Replaced appropriate literals with fopAcStts enums * Fix borked merge * Rename item number enums and move to d_item_data.h * Rename process profile name & draw priority enums * Move process profile name & draw priority enums to appropriate files * Moved fpcNm_ enums from d/d_procname.h to f_pc/f_pc_name.h * Moved fpcDwPi_ enums from d/d_priority.h to f_pc/f_pc_draw_priority.h * ACTUALLY (whoops) stage merge * Correct item mistranslation Co-authored-by: LagoLunatic <LagoLunatic@users.noreply.github.com> --------- Co-authored-by: LagoLunatic <LagoLunatic@users.noreply.github.com>
Diffstat (limited to 'src/d/actor/d_a_e_fz.cpp')
-rw-r--r--src/d/actor/d_a_e_fz.cpp114
1 files changed, 57 insertions, 57 deletions
diff --git a/src/d/actor/d_a_e_fz.cpp b/src/d/actor/d_a_e_fz.cpp
index ad11594686..cefe6237cd 100644
--- a/src/d/actor/d_a_e_fz.cpp
+++ b/src/d/actor/d_a_e_fz.cpp
@@ -84,7 +84,7 @@ daE_FZ_HIO_c::daE_FZ_HIO_c() {
}
s32 daE_FZ_c::draw() {
- if (field_0x714 == 2 && !checkItemGet(fpcNm_ITEM_IRONBALL,1)) {
+ if (field_0x714 == 2 && !checkItemGet(dItemNo_IRONBALL_e,1)) {
return 1;
}
@@ -180,11 +180,11 @@ void daE_FZ_c::damage_check() {
if (field_0x712 == 0) {
pos.set(dComIfGp_getPlayer(0)->current.pos);
mStts.Move();
-
+
if (field_0x714 == 3) {
if (mTgCoSph.ChkTgHit()) {
mAtInfo.mpCollider = mTgCoSph.GetTgHitObj();
-
+
if (mTgCoSph.GetTgHitObj()->ChkAtType(AT_TYPE_IRON_BALL)) {
deadnextSet(false);
}
@@ -192,7 +192,7 @@ void daE_FZ_c::damage_check() {
} else {
if (mTgCoSph.ChkTgHit()) {
mAtInfo.mpCollider = mTgCoSph.GetTgHitObj();
-
+
if (mTgCoSph.GetTgHitObj()->ChkAtType(AT_TYPE_40) || mTgCoSph.GetTgHitObj()->ChkAtType(AT_TYPE_BOOMERANG)) {
current.angle.y = fopAcM_searchPlayerAngleY(this) + 32768;
f32 tmp_l_hio = l_HIO.field_0x28;
@@ -205,7 +205,7 @@ void daE_FZ_c::damage_check() {
pos2 = current.pos - *mTgCoSph.GetTgHitPosP();
pos3.set(*mTgCoSph.GetTgHitPosP());
-
+
s_pos.x = 0;
s_pos.y = pos2.atan2sX_Z();
s_pos.z = 0;
@@ -223,13 +223,13 @@ void daE_FZ_c::damage_check() {
cXyz cStack_54(l_HIO.field_0x0c, l_HIO.field_0x0c, l_HIO.field_0x0c);
dComIfGp_particle_set(0x85ba, &current.pos, &shape_angle, &cStack_54);
-
+
if (mTgCoSph.GetTgHitObj()->ChkAtType(AT_TYPE_HOOKSHOT)) {
health -= 20;
if (1 < health) {
current.angle.y = fopAcM_searchPlayerAngleY(this) + 32768;
-
+
f32 tmp_l_hio = l_HIO.field_0x28;
speedF = tmp_l_hio;
field_0x6fc = tmp_l_hio;
@@ -278,12 +278,12 @@ void daE_FZ_c::damage_check() {
}
deadnextSet(true);
- return;
- } else {
+ return;
+ } else {
if (mObjAcch.ChkGroundHit() && mTgCoSph.ChkCoHit()) {
fopAc_ac_c* co_hit_actor = mTgCoSph.GetCoHitAc();
- if (fopAcM_IsActor(co_hit_actor) && fopAcM_GetName(co_hit_actor) == PROC_E_FZ) {
+ if (fopAcM_IsActor(co_hit_actor) && fopAcM_GetName(co_hit_actor) == fpcNm_E_FZ_e) {
pos = current.pos - mTgCoSph.GetCoHitAc()->current.pos;
mTgCoSph.ClrCoHit();
f32 co_hit_actor_speed = co_hit_actor->speedF;
@@ -310,7 +310,7 @@ void daE_FZ_c::damage_check() {
}
}
}
-
+
if (mAtSph.ChkAtHit()) {
fopAc_ac_c* player = dComIfGp_getPlayer(0);
fopAc_ac_c* at_hit_actor = mAtSph.GetAtHitAc();
@@ -325,7 +325,7 @@ void daE_FZ_c::damage_check() {
speedF = l_hio_28;
field_0x6fc = l_hio_28;
setActionMode(ACT_DAMAGE,1);
-
+
} else {
if (mActionMode != ACT_DAMAGE) {
field_0x712 = 10;
@@ -345,7 +345,7 @@ void daE_FZ_c::damage_check() {
bool daE_FZ_c::way_gake_check() {
cXyz pos;
dBgS_GndChk gnd_chk;
-
+
if (mObjAcch.ChkWallHit()) {
return false;
}
@@ -361,7 +361,7 @@ bool daE_FZ_c::way_gake_check() {
field_0x6dc += current.pos;
field_0x6e8.set(field_0x6dc);
gnd_chk.SetPos(&field_0x6e8);
-
+
field_0x6e8.y = dComIfG_Bgsp().GroundCross(&gnd_chk);
if (field_0x6e8.y == -G_CM3D_F_INF) {
field_0x6e8.y = current.pos.y;
@@ -378,19 +378,19 @@ void daE_FZ_c::executeWait() {
cXyz pos2;
s16 angle;
f32 tmp = l_HIO.field_0x14;
-
+
switch (mActionPhase) {
case 0:
if (fopAcM_wayBgCheck(this,200.0f,50.0f)) {
angle = cM_rndFX(10000.0f) + 32768.0f;
} else {
-
+
pos2.x = home.pos.x + cM_rndFX(l_HIO.field_0x10);
pos2.y = home.pos.y;
pos2.z = home.pos.z + cM_rndFX(l_HIO.field_0x10);
-
+
pos = pos2 - current.pos;
-
+
angle = pos.atan2sX_Z() - current.angle.y;
if (angle > 12288) {
@@ -424,21 +424,21 @@ void daE_FZ_c::executeWait() {
if (mObjAcch.ChkGroundHit() && dComIfG_Bgsp().GetPolyAtt0(mObjAcch.m_gnd) == 8) {
angle = shape_angle.y - mAngleFromPlayer;
-
+
if (abs(angle) < 512 && field_0x710 == 0) {
cLib_addCalc0(&speedF, 0.1f, 0.1f);
- }
+ }
} else {
cLib_addCalc0(&speedF,0.1f,l_HIO.field_0x2c);
}
-
+
if (field_0x710 == 0 && speedF < 0.2f) {
angle = shape_angle.y - mAngleFromPlayer;
if (abs(angle) < 512) {
current.angle.y = shape_angle.y;
setActionMode(ACT_MOVE,0);
- }
+ }
}
}
@@ -456,11 +456,11 @@ void daE_FZ_c::executeMove() {
switch (mActionPhase) {
case 0:
field_0x710 = l_HIO.field_0x08 + cM_rndFX(l_HIO.field_0x34);
- mActionPhase = 1;
+ mActionPhase = 1;
case 1:
cLib_addCalcAngleS2(&current.angle.y,mAngleFromPlayer,8,256);
cLib_addCalc2(&speedF,l_HIO.field_0x1c,1.0f,3.0f);
-
+
if (fopAcM_wayBgCheck(this, 200.0f,50.0f) != 0 || field_0x710 == 0) {
setActionMode(ACT_WAIT,0);
}
@@ -470,7 +470,7 @@ void daE_FZ_c::executeMove() {
setActionMode(ACT_WAIT,0);
} else {
shape_angle.y = current.angle.y;
-
+
if (fopAcM_searchPlayerDistance(this) <= l_HIO.field_0x14) {
setActionMode(ACT_ATTACK,0);
}
@@ -520,7 +520,7 @@ void daE_FZ_c::executeDamage() {
fopAcM_delete(this);
break;
case 1:
- tmp = l_HIO.field_0x28;
+ tmp = l_HIO.field_0x28;
speedF = tmp;
field_0x6fc = tmp;
case 5:
@@ -577,10 +577,10 @@ void daE_FZ_c::executeDamage() {
s16 value = 4096.0f - (4096.0f / field_0x6fc) * (field_0x6fc - speedF);
shape_angle.y += value;
}
-
+
cLib_addCalcAngleS2(&current.angle.y,mAngleFromPlayer,1,512);
cLib_addCalc0(&speedF,0.1f,0.1f);
-
+
if (mObjAcch.ChkWallHit()) {
mLastWallHitAngle = mAcchCir.GetWallAngleY();
setReflectAngle();
@@ -603,7 +603,7 @@ void daE_FZ_c::executeDamage() {
void daE_FZ_c::executeRollMove() {
if (fopAcM_SearchByID(fopAcM_GetLinkId(this),&mpBlizzetaActor) == 0 || !mpBlizzetaActor) return;
u32 model_no = static_cast<daB_YO_c*>(mpBlizzetaActor)->getModelNo();
-
+
if (model_no < 4 || 6 < model_no) {
fopAcM_delete(this);
return;
@@ -645,7 +645,7 @@ void daE_FZ_c::executeRollMove() {
case 2:
cLib_chaseF(&mRadiusBase,1.0,0.1);
cLib_chaseAngleS(&field_0x704,512,16);
-
+
if (mObjAcch.ChkWallHit() || !mObjAcch.ChkGroundHit()) {
setActionMode(ACT_DAMAGE,0);
mCreature.startCreatureSound(Z2SE_EN_FZ_DEATH,0,-1);
@@ -654,7 +654,7 @@ void daE_FZ_c::executeRollMove() {
if (mAtSph.ChkAtHit()) {
fopAc_ac_c* at_hit_actor = mAtSph.GetAtHitAc();
- if ((fopAcM_GetName(at_hit_actor) == PROC_ALINK) || mAtSph.ChkAtShieldHit()) {
+ if ((fopAcM_GetName(at_hit_actor) == fpcNm_ALINK_e) || mAtSph.ChkAtShieldHit()) {
setActionMode(ACT_DAMAGE,0);
return;
}
@@ -669,7 +669,7 @@ void daE_FZ_c::action() {
int i;
if (field_0x714 == 1 && mObjAcch.ChkGroundHit()) {
- fopAcM_OffStatus(this, 0x4000);
+ fopAcM_OffStatus(this, fopAcStts_UNK_0x4000_e);
field_0x714 = 0;
}
@@ -733,7 +733,7 @@ void daE_FZ_c::action() {
}
if (1 < health && mAcchCir.ChkWallHit()) {
- if (fopAcM_GetName(dComIfG_Bgsp().GetActorPointer(mAcchCir)) != PROC_BG) {
+ if (fopAcM_GetName(dComIfG_Bgsp().GetActorPointer(mAcchCir)) != fpcNm_BG_e) {
dBgS_LinChk lin_chk;
dBgS_LinChk lin_chk2;
@@ -812,7 +812,7 @@ void daE_FZ_c::cc_set() {
mTgCoSph.SetR(mRadiusBase * 60.0f);
dComIfG_Ccsp()->Set(&mTgCoSph);
-
+
mDoMtx_stack_c::copy(mpModel->getBaseTRMtx());
pos.set(0.0f,25.0f,0.0f);
@@ -826,7 +826,7 @@ void daE_FZ_c::cc_set() {
s32 daE_FZ_c::execute() {
if (field_0x714 == 2) {
- if (checkItemGet(fpcNm_ITEM_IRONBALL,1) == 0) {
+ if (checkItemGet(dItemNo_IRONBALL_e,1) == 0) {
return 1;
}
@@ -940,7 +940,7 @@ s32 daE_FZ_c::create() {
attention_info.flags = fopAc_AttnFlag_BATTLE_e;
attention_info.distances[fopAc_attn_BATTLE_e] = 69;
-
+
fopAcM_SetMtx(this,mpModel->getBaseTRMtx());
fopAcM_SetMin(this,-200.0f,-200.0f,-200.0f);
fopAcM_SetMax(this,200.0f,200.0f,200.0f);
@@ -951,22 +951,22 @@ s32 daE_FZ_c::create() {
field_0x714 = fopAcM_GetParam(this);
field_0x715 = fopAcM_GetParam(this) >> 8;
-
+
if (field_0x714 == 255)
field_0x714 = 0;
-
+
if (field_0x714 == 1 || field_0x714 == 3) {
speed.y = cM_rndFX(10.0f) + 30.0f;
f32 rng = cM_rndFX(1.0f);
speedF = rng + 4.0f;
field_0x6fc = rng + 4.0f;
if (field_0x714 == 1) {
- fopAcM_OnStatus(this,fopAcM_STATUS_UNK_0x4000);
+ fopAcM_OnStatus(this,fopAcStts_UNK_0x4000_e);
}
}
mObjAcch.Set(fopAcM_GetPosition_p(this),fopAcM_GetOldPosition_p(this), this, 1, &mAcchCir, fopAcM_GetSpeed_p(this), 0, 0);
-
+
if (field_0x714 == 3) {
mAcchCir.SetWall(35.0f,70.0f);
}
@@ -992,18 +992,18 @@ s32 daE_FZ_c::create() {
shape_angle.z = 0;
shape_angle.x = 0;
-
+
s16 random = cM_rndFX(10000.0f);
shape_angle.y = random;
current.angle.y = random;
field_0x670.set(current.pos);
-
+
for (int i = 0; i < 4; i++) {
field_0x67c[i].set(current.pos);
}
- if (field_0x714 == 2 && !checkItemGet(fpcNm_ITEM_IRONBALL,1)) {
+ if (field_0x714 == 2 && !checkItemGet(dItemNo_IRONBALL_e,1)) {
attention_info.distances[fopAc_attn_BATTLE_e] = 0;
fopAcM_SetGroup(this,0);
fopAcM_OffStatus(this,0);
@@ -1041,18 +1041,18 @@ static actor_method_class l_daE_FZ_Method = {
};
actor_process_profile_definition g_profile_E_FZ = {
- fpcLy_CURRENT_e, // mLayerID
- 7, // mListID
- fpcPi_CURRENT_e, // mListPrio
- PROC_E_FZ, // mProcName
- &g_fpcLf_Method.base, // sub_method
- sizeof(daE_FZ_c), // mSize
- 0, // mSizeOther
- 0, // mParameters
- &g_fopAc_Method.base, // sub_method
- 169, // mPriority
- &l_daE_FZ_Method, // sub_method
- 0x00040120, // mStatus
- fopAc_ENEMY_e, // mActorType
- fopAc_CULLBOX_0_e, // cullType
+ /* Layer ID */ fpcLy_CURRENT_e,
+ /* List ID */ 7,
+ /* List Prio */ fpcPi_CURRENT_e,
+ /* Proc Name */ fpcNm_E_FZ_e,
+ /* Proc SubMtd */ &g_fpcLf_Method.base,
+ /* Size */ sizeof(daE_FZ_c),
+ /* Size Other */ 0,
+ /* Parameters */ 0,
+ /* Leaf SubMtd */ &g_fopAc_Method.base,
+ /* Draw Prio */ fpcDwPi_E_FZ_e,
+ /* Actor SubMtd */ &l_daE_FZ_Method,
+ /* Status */ fopAcStts_UNK_0x40000_e | fopAcStts_CULL_e | fopAcStts_UNK_0x20_e,
+ /* Group */ fopAc_ENEMY_e,
+ /* Cull Type */ fopAc_CULLBOX_0_e,
};