mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-24 05:46: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_obj_batta.cpp
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "d/d_cc_uty.h"
|
||||
#include "d/d_com_inf_game.h"
|
||||
#include "d/d_menu_insect.h"
|
||||
#include "f_pc/f_pc_name.h"
|
||||
#include "d/d_item_data.h"
|
||||
#include <cstring>
|
||||
|
||||
class daObj_BattaHIO_c : public JORReflexible {
|
||||
@@ -316,7 +316,7 @@ void daObjBATTA_c::bin_wait() {
|
||||
if (field_0x9e8 == 0) {
|
||||
J3DAnmTransform* anm = (J3DAnmTransform*)dComIfG_getObjectRes("Bat", 8);
|
||||
mpMorf->setAnm(anm, 2, 4.0f, 1.0f, 0.0f, -1.0f);
|
||||
fopAcM_OnStatus(this, fopAcM_STATUS_UNK_0x4000);
|
||||
fopAcM_OnStatus(this, fopAcStts_UNK_0x4000_e);
|
||||
mDraw = false;
|
||||
gravity = 0.0f;
|
||||
maxFallSpeed = 0.0f;
|
||||
@@ -386,7 +386,7 @@ void daObjBATTA_c::hook() {
|
||||
batta_setParticle();
|
||||
}
|
||||
|
||||
if (!fopAcM_CheckStatus(this, fopAcM_STATUS_HOOK_CARRY_NOW)) {
|
||||
if (!fopAcM_CheckStatus(this, fopAcStts_HOOK_CARRY_NOW_e)) {
|
||||
setAction(&daObjBATTA_c::wait);
|
||||
}
|
||||
}
|
||||
@@ -476,7 +476,7 @@ void daObjBATTA_c::action() {
|
||||
void daObjBATTA_c::hit_check() {
|
||||
dCcU_AtInfo info;
|
||||
mStts.Move();
|
||||
|
||||
|
||||
if (mSph.ChkTgHit()) {
|
||||
info.mpCollider = mSph.GetTgHitObj();
|
||||
if (info.mpCollider->ChkAtType(AT_TYPE_HOOKSHOT)) {
|
||||
@@ -487,7 +487,7 @@ void daObjBATTA_c::hit_check() {
|
||||
}
|
||||
}
|
||||
|
||||
static u8 const l_batta_sex[2] = {fpcNm_ITEM_M_GRASSHOPPER, fpcNm_ITEM_F_GRASSHOPPER};
|
||||
static u8 const l_batta_sex[2] = {dItemNo_M_GRASSHOPPER_e, dItemNo_F_GRASSHOPPER_e};
|
||||
|
||||
int daObjBATTA_c::execute() {
|
||||
if ( ChkGetDemo()) {
|
||||
@@ -497,7 +497,7 @@ int daObjBATTA_c::execute() {
|
||||
batta_setParticle();
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if (field_0x9f2 != 0) {
|
||||
field_0x9f2--;
|
||||
}
|
||||
@@ -592,21 +592,21 @@ int daObjBATTA_c::create() {
|
||||
if (field_0x9f0 == 3) {
|
||||
field_0x9f0 = 0;
|
||||
}
|
||||
|
||||
|
||||
mSex = (fopAcM_GetParam(this) & 0x10) >> 4;
|
||||
if (mSex != 0) {
|
||||
scale.setall(l_HIO.mModelScaleFemale);
|
||||
} else {
|
||||
scale.setall(l_HIO.mModelScaleMale);
|
||||
}
|
||||
|
||||
|
||||
if (uVar9 == 15) {
|
||||
uVar9 = 0;
|
||||
}
|
||||
|
||||
|
||||
setItemNo(l_batta_sex[mSex]);
|
||||
setSaveBitNo(l_musiya_num[mSex]);
|
||||
|
||||
|
||||
if (field_0x9f0 != 2) {
|
||||
if (uVar9 != 0) {
|
||||
if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[l_musiya_num[SEX_MALE]]) || !dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[l_musiya_num[SEX_FEMALE]])) {
|
||||
@@ -629,9 +629,9 @@ int daObjBATTA_c::create() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
mParticleScale = 0.0f;
|
||||
|
||||
|
||||
OS_REPORT("/////////////////// BATTA ////////////////////////\n");
|
||||
|
||||
if (!fopAcM_entrySolidHeap(this, useHeapInit, 0xb00)) {
|
||||
@@ -639,32 +639,32 @@ int daObjBATTA_c::create() {
|
||||
}
|
||||
|
||||
OS_REPORT("/////////////////// BATTA SET OK /////////////////\n");
|
||||
|
||||
|
||||
if (!hio_set) {
|
||||
hio_set = true;
|
||||
mIsHIOOwner = true;
|
||||
// Golden Bugs
|
||||
l_HIO.mId = mDoHIO_CREATE_CHILD("黄金蟲(バッタ)", &l_HIO);
|
||||
}
|
||||
|
||||
|
||||
J3DModel* model = mpMorf->getModel();
|
||||
fopAcM_SetMtx(this, model->getBaseTRMtx());
|
||||
fopAcM_SetMin(this, -50.0f, -50.0f, -50.0f);
|
||||
fopAcM_SetMax(this, 50.0f, 50.0f, 50.0f);
|
||||
|
||||
|
||||
attention_info.flags = 0;
|
||||
health = 10;
|
||||
field_0x560 = 10;
|
||||
|
||||
|
||||
mCreature.init(¤t.pos, &eyePos, 3, 1);
|
||||
|
||||
|
||||
if (field_0x9f0 == 0) {
|
||||
attention_info.distances[fopAc_attn_CARRY_e] = 0x5d;
|
||||
mStts.Init(100, 0, this);
|
||||
mSph.Set(cc_sph_src);
|
||||
mSph.SetStts(&mStts);
|
||||
}
|
||||
|
||||
|
||||
if (field_0x9f0 == 2) {
|
||||
setAction(&daObjBATTA_c::bin_wait);
|
||||
} else {
|
||||
@@ -676,7 +676,7 @@ int daObjBATTA_c::create() {
|
||||
current.angle.y = cM_rndFX(32768.0f);
|
||||
setAction(&daObjBATTA_c::wait);
|
||||
}
|
||||
|
||||
|
||||
daObjBATTA_Execute(this);
|
||||
}
|
||||
return rv;
|
||||
@@ -695,18 +695,18 @@ static actor_method_class l_daObjBATTA_Method = {
|
||||
};
|
||||
|
||||
actor_process_profile_definition g_profile_Obj_Batta = {
|
||||
fpcLy_CURRENT_e, // mLayerID
|
||||
7, // mListID
|
||||
fpcPi_CURRENT_e, // mListPrio
|
||||
PROC_Obj_Batta, // mProcName
|
||||
&g_fpcLf_Method.base, // sub_method
|
||||
sizeof(daObjBATTA_c), // mSize
|
||||
0, // mSizeOther
|
||||
0, // mParameters
|
||||
&g_fopAc_Method.base, // sub_method
|
||||
486, // mPriority
|
||||
&l_daObjBATTA_Method, // sub_method
|
||||
0x000C0120, // mStatus
|
||||
fopAc_ENV_e, // mActorType
|
||||
fopAc_CULLBOX_CUSTOM_e, // cullType
|
||||
/* Layer ID */ fpcLy_CURRENT_e,
|
||||
/* List ID */ 7,
|
||||
/* List Prio */ fpcPi_CURRENT_e,
|
||||
/* Proc Name */ fpcNm_Obj_Batta_e,
|
||||
/* Proc SubMtd */ &g_fpcLf_Method.base,
|
||||
/* Size */ sizeof(daObjBATTA_c),
|
||||
/* Size Other */ 0,
|
||||
/* Parameters */ 0,
|
||||
/* Leaf SubMtd */ &g_fopAc_Method.base,
|
||||
/* Draw Prio */ fpcDwPi_Obj_Batta_e,
|
||||
/* Actor SubMtd */ &l_daObjBATTA_Method,
|
||||
/* Status */ fopAcStts_UNK_0x80000_e | fopAcStts_UNK_0x40000_e | fopAcStts_CULL_e | fopAcStts_UNK_0x20_e,
|
||||
/* Group */ fopAc_ENV_e,
|
||||
/* Cull Type */ fopAc_CULLBOX_CUSTOM_e,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user