mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-18 12:52:51 -04:00
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:
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* @file d_a_npc_shad.cpp
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
@@ -13,16 +13,16 @@
|
||||
#include <cstring>
|
||||
|
||||
const daNpcShad_HIOParam daNpcShad_Param_c::m = {
|
||||
35.0f, // attention_offset
|
||||
35.0f, // attention_offset
|
||||
-3.0f, // gravity
|
||||
1.0f, // scale
|
||||
1.0f, // scale
|
||||
400.0f, // real_shadow_size
|
||||
255.0f, // weight
|
||||
200.0f, // height
|
||||
35.0f, // knee_length
|
||||
30.0f, // width
|
||||
0.0f, // body_angleX_max
|
||||
0.0f, // body_angleX_min
|
||||
0.0f, // body_angleX_max
|
||||
0.0f, // body_angleX_min
|
||||
45.0f, // body_angleY_max
|
||||
-45.0f, // body_angleY_min
|
||||
30.0f, // head_angleX_max
|
||||
@@ -390,7 +390,7 @@ cPhs_Step daNpcShad_c::Create() {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
fopAcM_OnStatus(this, fopAcM_STATUS_UNK_0x4000);
|
||||
fopAcM_OnStatus(this, fopAcStts_UNK_0x4000_e);
|
||||
mMode = 2;
|
||||
}
|
||||
}
|
||||
@@ -626,7 +626,7 @@ int daNpcShad_c::ctrlJointCallBack(J3DJoint* i_joint, int param_2) {
|
||||
if (param_2 == 0) {
|
||||
J3DModel* model = j3dSys.getModel();
|
||||
daNpcShad_c* i_this = (daNpcShad_c*)model->getUserArea();
|
||||
|
||||
|
||||
if (i_this != NULL) {
|
||||
i_this->ctrlJoint(i_joint, model);
|
||||
}
|
||||
@@ -739,7 +739,7 @@ bool daNpcShad_c::setExpressionBtp(int i_idx) {
|
||||
if (i_idx == 0) {
|
||||
mAnmFlags |= ANM_FLAG_800;
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -834,7 +834,7 @@ void daNpcShad_c::reset() {
|
||||
mMotionMorfOverride = 0.0f;
|
||||
|
||||
if (isSneaking()) {
|
||||
fopAcM_OnStatus(this, fopAcM_STATUS_UNK_0x4000);
|
||||
fopAcM_OnStatus(this, fopAcStts_UNK_0x4000_e);
|
||||
}
|
||||
|
||||
setWaitAction();
|
||||
@@ -1055,7 +1055,7 @@ inline void daNpcShad_c::lookat() {
|
||||
mLookat.setAttnPos(NULL);
|
||||
}
|
||||
|
||||
mLookat.setParam(body_angleX_min, body_angleX_max, body_angleY_min, body_angleY_max, 0.0f, 0.0f, 0.0f, 0.0f, head_angleX_min, head_angleX_max,
|
||||
mLookat.setParam(body_angleX_min, body_angleX_max, body_angleY_min, body_angleY_max, 0.0f, 0.0f, 0.0f, 0.0f, head_angleX_min, head_angleX_max,
|
||||
head_angleY_min, head_angleY_max, mCurAngle.y, spf0);
|
||||
mLookat.calc(this, model->getBaseTRMtx(), (csXyz**)local_fc, iVar1, sVar1, FALSE);
|
||||
}
|
||||
@@ -1533,7 +1533,7 @@ bool daNpcShad_c::talk(void* param_1) {
|
||||
JUT_ASSERT(2042, FALSE);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
@@ -1855,9 +1855,9 @@ BOOL daNpcShad_c::EvCut_ToChantSpell2(int i_cutIndex) {
|
||||
mTurnMode = 0;
|
||||
|
||||
actor = NULL;
|
||||
fopAcM_SearchByName(PROC_CSTAF, (fopAc_ac_c**)&actor);
|
||||
fopAcM_SearchByName(fpcNm_CSTAF_e, (fopAc_ac_c**)&actor);
|
||||
if (actor != NULL) {
|
||||
fopAcM_OnStatus(actor, fopAcM_STATUS_UNK_0x800);
|
||||
fopAcM_OnStatus(actor, fopAcStts_STAFF_EXTRA_e);
|
||||
}
|
||||
|
||||
dComIfGp_getEvent()->startCheckSkipEdge(this);
|
||||
@@ -1902,7 +1902,7 @@ BOOL daNpcShad_c::EvCut_ToChantSpell2(int i_cutIndex) {
|
||||
|
||||
case '0010':
|
||||
statue = NULL;
|
||||
fopAcM_SearchByName(PROC_CSTAF, (fopAc_ac_c**)&statue);
|
||||
fopAcM_SearchByName(fpcNm_CSTAF_e, (fopAc_ac_c**)&statue);
|
||||
if (statue != NULL) {
|
||||
statue->onCoverVanishFlg();
|
||||
}
|
||||
@@ -1993,7 +1993,7 @@ BOOL daNpcShad_c::EvCut_ToChantSpell2(int i_cutIndex) {
|
||||
|
||||
case '0010':
|
||||
return TRUE;
|
||||
|
||||
|
||||
default:
|
||||
JUT_ASSERT(2540, FALSE);
|
||||
break;
|
||||
@@ -2303,7 +2303,7 @@ BOOL daNpcShad_c::EvCut_Disappear(int i_cutIndex) {
|
||||
|
||||
if (pos2 != NULL) {
|
||||
step(cLib_targetAngleY(¤t.pos, pos2), -1, 15.0f);
|
||||
|
||||
|
||||
if (pos2->x > current.pos.x) {
|
||||
speedF = 0.0f;
|
||||
setMotion(MOT_WAIT_A, -1.0f, FALSE);
|
||||
@@ -2617,7 +2617,7 @@ inline void daNpcShad_c::setAttnPos() {
|
||||
mDoMtx_stack_c::copy(mAnm_p->getModel()->getAnmMtx(JNT_BACKBONE2));
|
||||
mDoMtx_stack_c::multVecZero(&sp58);
|
||||
sp58.y = current.pos.y;
|
||||
|
||||
|
||||
field_0xcb0.SetC(sp58);
|
||||
field_0xcb0.SetH(mpHIO->m.common.height);
|
||||
|
||||
@@ -2647,18 +2647,18 @@ static actor_method_class daNpcShad_MethodTable = {
|
||||
};
|
||||
|
||||
actor_process_profile_definition g_profile_NPC_SHAD = {
|
||||
fpcLy_CURRENT_e, // mLayerID
|
||||
7, // mListID
|
||||
fpcPi_CURRENT_e, // mListPrio
|
||||
PROC_NPC_SHAD, // mProcName
|
||||
&g_fpcLf_Method.base, // sub_method
|
||||
sizeof(daNpcShad_c), // mSize
|
||||
0, // mSizeOther
|
||||
0, // mParameters
|
||||
&g_fopAc_Method.base, // sub_method
|
||||
413, // mPriority
|
||||
&daNpcShad_MethodTable, // sub_method
|
||||
0x00040100, // mStatus
|
||||
fopAc_NPC_e, // mActorType
|
||||
fopAc_CULLBOX_CUSTOM_e, // cullType
|
||||
/* Layer ID */ fpcLy_CURRENT_e,
|
||||
/* List ID */ 7,
|
||||
/* List Prio */ fpcPi_CURRENT_e,
|
||||
/* Proc Name */ fpcNm_NPC_SHAD_e,
|
||||
/* Proc SubMtd */ &g_fpcLf_Method.base,
|
||||
/* Size */ sizeof(daNpcShad_c),
|
||||
/* Size Other */ 0,
|
||||
/* Parameters */ 0,
|
||||
/* Leaf SubMtd */ &g_fopAc_Method.base,
|
||||
/* Draw Prio */ fpcDwPi_NPC_SHAD_e,
|
||||
/* Actor SubMtd */ &daNpcShad_MethodTable,
|
||||
/* Status */ fopAcStts_UNK_0x40000_e | fopAcStts_CULL_e,
|
||||
/* Group */ fopAc_NPC_e,
|
||||
/* Cull Type */ fopAc_CULLBOX_CUSTOM_e,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user