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>
This commit is contained in:
Huitzi
2026-03-09 21:33:31 -04:00
committed by GitHub
parent 30e839c28b
commit 0b0fdd1f60
873 changed files with 19721 additions and 18953 deletions
+45 -45
View File
@@ -1,6 +1,6 @@
/**
* @file d_a_e_sm2.cpp
*
*
*/
#include "d/dolzel_rel.h" // IWYU pragma: keep
@@ -56,7 +56,7 @@ static int nodeCallBack(J3DJoint* i_joint, int param_1) {
int jnt_no = i_joint->getJntNo();
J3DModel* model = j3dSys.getModel();
e_sm2_class* a_this = (e_sm2_class*)model->getUserArea();
if (a_this != NULL && jnt_no >= 1) {
MtxTrans(a_this->jnt_pos[jnt_no].x, a_this->jnt_pos[jnt_no].y, a_this->jnt_pos[jnt_no].z, 0);
cMtx_YrotM(*calc_mtx, a_this->field_0x7f8[jnt_no].y);
@@ -95,7 +95,7 @@ static int daE_SM2_Draw(e_sm2_class* i_this) {
if (i_this->shadowId != 353535) {
cXyz pos;
pos.set(actor->current.pos.x, 50.0f + actor->current.pos.y + BREG_F(18), actor->current.pos.z);
f32 var_f31 = i_this->size * (2500.0f + BREG_F(19)) * i_this->field_0x830;
if (var_f31 < 700.0f) {
var_f31 = 700.0f;
@@ -136,7 +136,7 @@ static void sm2_delete(e_sm2_class* i_this) {
if (!i_this->is_roof) {
fopAcM_delete(actor);
int swbit = (fopAcM_GetParam(actor) & 0xFF000000) >> 0x18;
if (swbit != 0xFF) {
dComIfGs_onSwitch(swbit, fopAcM_GetRoomNo(actor));
@@ -186,7 +186,7 @@ static void cc_stts_init(e_sm2_class* i_this) {
static void* s_s_sub(void* i_actor, void* i_data) {
cXyz pos_delta;
if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == PROC_E_SM2) {
if (fopAcM_IsActor(i_actor) && fopAcM_GetName(i_actor) == fpcNm_E_SM2_e) {
e_sm2_class* pother = (e_sm2_class*)i_data;
e_sm2_class* pactor = (e_sm2_class*)i_actor;
@@ -668,22 +668,22 @@ static void fail(e_sm2_class* i_this) {
i_this->timers[0] = KREG_S(7) + 9;
} else {
static u8 item_no[] = {
fpcNm_ITEM_CHUCHU_GREEN,
fpcNm_ITEM_CHUCHU_RED,
fpcNm_ITEM_CHUCHU_BLUE,
fpcNm_ITEM_CHUCHU_YELLOW,
fpcNm_ITEM_CHUCHU_PURPLE,
fpcNm_ITEM_CHUCHU_RARE,
fpcNm_ITEM_CHUCHU_BLACK,
dItemNo_CHUCHU_GREEN_e,
dItemNo_CHUCHU_RED_e,
dItemNo_CHUCHU_BLUE_e,
dItemNo_CHUCHU_YELLOW_e,
dItemNo_CHUCHU_PURPLE_e,
dItemNo_CHUCHU_RARE_e,
dItemNo_CHUCHU_BLACK_e,
};
dComIfGp_att_CatchRequest(actor, item_no[i_this->type], 100.0f, 50.0f, -150.0f, 0x5000, 1);
actor->eventInfo.onCondition(0x40);
}
return;
}
if (i_this->mode == 2 && i_this->timers[0] == 1) {
MTXCopy(daPy_getPlayerActorClass()->getLeftItemMatrix(), *calc_mtx);
work.set(0.0f, 0.0f, 0.0f);
@@ -909,7 +909,7 @@ static void damage_check(e_sm2_class* i_this) {
pos = i_this->field_0x708[j_d[j]];
pos.y += cM_rndF(y_ad[i_this->sizetype]);
fopAcM_createChild(PROC_E_SM2, fopAcM_GetID(actor), 0xFFFFFF00 | (i_this->type << 4) | 0xB, &pos, fopAcM_GetRoomNo(actor), &rotation, NULL, -1, NULL);
fopAcM_createChild(fpcNm_E_SM2_e, fopAcM_GetID(actor), 0xFFFFFF00 | (i_this->type << 4) | 0xB, &pos, fopAcM_GetRoomNo(actor), &rotation, NULL, -1, NULL);
}
i_this->field_0xfd4 = 1;
@@ -944,7 +944,7 @@ static void damage_check(e_sm2_class* i_this) {
pos = work;
}
fopAcM_createChild(PROC_E_SM2, fopAcM_GetID(actor), parameters, &pos, fopAcM_GetRoomNo(actor), &rotation, NULL, -1, NULL);
fopAcM_createChild(fpcNm_E_SM2_e, fopAcM_GetID(actor), parameters, &pos, fopAcM_GetRoomNo(actor), &rotation, NULL, -1, NULL);
}
i_this->sound.startCreatureSound(Z2SE_EN_SM_HIT2, 0, -1);
@@ -957,7 +957,7 @@ static void damage_check(e_sm2_class* i_this) {
i_this->isPiece = TRUE;
actor->speed.y = 20.0f + BREG_F(6);
i_this->field_0xfd4 = 1;
fopAcM_OffStatus(actor, fopAcM_STATUS_UNK_0x100);
fopAcM_OffStatus(actor, fopAcStts_CULL_e);
}
return;
}
@@ -1385,7 +1385,7 @@ static int daE_SM2_Execute(e_sm2_class* i_this) {
if (actor->home.pos.y - actor->current.pos.y > 5000.0f) {
fopAcM_delete(actor);
int bitsw = (fopAcM_GetParam(actor) & 0xFF000000) >> 0x18;
if (bitsw != 0xFF) {
dComIfGs_onSwitch(bitsw, fopAcM_GetRoomNo(actor));
@@ -1406,7 +1406,7 @@ static int daE_SM2_Delete(e_sm2_class* i_this) {
#if DEBUG
l_HIO.removeHIO(i_this->enemy);
#endif
dComIfG_resDelete(&i_this->phase, "E_sm2");
if (actor->heap != NULL) {
@@ -1471,27 +1471,27 @@ static int daE_SM2_Create(fopAc_ac_c* i_this) {
if (swbit != 0xFF && dComIfGs_isSwitch(swbit, fopAcM_GetRoomNo(i_this))) {
return cPhs_ERROR_e;
}
a_this->field_0x5b4 = fopAcM_GetParam(i_this) & 0xF;
if (a_this->field_0x5b4 == 0xF) {
a_this->field_0x5b4 = 0;
}
a_this->type = (fopAcM_GetParam(i_this) & 0xF0) >> 4;
if (a_this->type == 0xF) {
a_this->type = TYPE_GREEN;
}
if (!dComIfGs_isItemFirstBit(fpcNm_ITEM_ARMOR) && a_this->type == TYPE_GREEN) {
if (!dComIfGs_isItemFirstBit(dItemNo_ARMOR_e) && a_this->type == TYPE_GREEN) {
return cPhs_ERROR_e;
}
if (a_this->field_0x5b4 < 10) {
if (strcmp(dComIfGp_getStartStageName(), "T_ENEMY") == 0) {
a_this->type = cM_rndF(6.999f);
}
}
if (a_this->type == TYPE_RANDOM) {
int num = (g_Counter.mCounter0 & 7);
if (num == 0) {
@@ -1502,15 +1502,15 @@ static int daE_SM2_Create(fopAc_ac_c* i_this) {
a_this->type = TYPE_BLUE;
}
}
if (a_this->type == TYPE_RARE && checkItemGet(fpcNm_ITEM_CHUCHU_RARE, 1)) {
if (a_this->type == TYPE_RARE && checkItemGet(dItemNo_CHUCHU_RARE_e, 1)) {
if (cM_rndF(1.0f) <= 0.5f) {
a_this->type = TYPE_RED;
} else {
a_this->type = TYPE_BLUE;
}
}
col_set(a_this, 1);
a_this->sizetype = (fopAcM_GetParam(i_this) & 0xFF00) >> 8;
@@ -1529,14 +1529,14 @@ static int daE_SM2_Create(fopAc_ac_c* i_this) {
a_this->field_0x5b8 = i_this->home.angle.z & 0xFF;
i_this->current.angle.z = i_this->shape_angle.z = 0;
a_this->size = size_get(a_this->sizetype);
OS_REPORT("E_SM2//////////////E_SM2 SET 1 !!\n");
if (!fopAcM_entrySolidHeap(i_this, useHeapInit, 0x20D0)) {
OS_REPORT("//////////////E_SM2 SET NON !!\n");
return cPhs_ERROR_e;
}
OS_REPORT("//////////////E_SM2 SET 2 !!\n");
a_this->sound.init(&i_this->current.pos, &i_this->current.pos, 3, 1);
@@ -1552,7 +1552,7 @@ static int daE_SM2_Create(fopAc_ac_c* i_this) {
a_this->jnt_pos[i] = i_this->current.pos;
a_this->field_0x6c8[i] = 1.0f;
}
#if DEBUG
l_HIO.entryHIO("スライム(豪華)");
#endif
@@ -1637,20 +1637,20 @@ static actor_method_class l_daE_SM2_Method = {
};
actor_process_profile_definition g_profile_E_SM2 = {
fpcLy_CURRENT_e, // mLayerID
7, // mListID
fpcPi_CURRENT_e, // mListPrio
PROC_E_SM2, // mProcName
&g_fpcLf_Method.base, // sub_method
sizeof(e_sm2_class), // mSize
0, // mSizeOther
0, // mParameters
&g_fopAc_Method.base, // sub_method
128, // mPriority
&l_daE_SM2_Method, // sub_method
0x00040120, // mStatus
fopAc_ENEMY_e, // mActorType
fopAc_CULLBOX_CUSTOM_e, // cullType
/* Layer ID */ fpcLy_CURRENT_e,
/* List ID */ 7,
/* List Prio */ fpcPi_CURRENT_e,
/* Proc Name */ fpcNm_E_SM2_e,
/* Proc SubMtd */ &g_fpcLf_Method.base,
/* Size */ sizeof(e_sm2_class),
/* Size Other */ 0,
/* Parameters */ 0,
/* Leaf SubMtd */ &g_fopAc_Method.base,
/* Draw Prio */ fpcDwPi_E_SM2_e,
/* Actor SubMtd */ &l_daE_SM2_Method,
/* Status */ fopAcStts_UNK_0x40000_e | fopAcStts_CULL_e | fopAcStts_UNK_0x20_e,
/* Group */ fopAc_ENEMY_e,
/* Cull Type */ fopAc_CULLBOX_CUSTOM_e,
};
AUDIO_INSTANCES