mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-30 16:35:26 -04:00
56890c32e8
* 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>
122 lines
3.3 KiB
C++
122 lines
3.3 KiB
C++
/**
|
|
* d_a_obj_graWall.cpp
|
|
* Object - Goron Adult Wall (Deleted)
|
|
*/
|
|
|
|
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
|
|
|
#include "d/actor/d_a_obj_graWall.h"
|
|
#include "f_pc/f_pc_name.h"
|
|
|
|
int daObjGraWall_c::Create() {
|
|
fopAcM_ct(this, daObjGraWall_c);
|
|
field_0x6e0 = fopAcM_GetParam(this);
|
|
|
|
if (field_0x6e0 != 0xff) {
|
|
if (dComIfGs_isSwitch(field_0x6e0, fopAcM_GetRoomNo(this)) != 0) {
|
|
return cPhs_ERROR_e;
|
|
}
|
|
} else {
|
|
/* dSv_event_flag_c::M_029 - Death Mountain (room) - Win wrestle match against Gor Coron */
|
|
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[62])) {
|
|
return cPhs_ERROR_e;
|
|
}
|
|
}
|
|
col_init();
|
|
|
|
return cPhs_COMPLEATE_e;
|
|
}
|
|
|
|
int daObjGraWall_c::Execute() {
|
|
if (field_0x6e0 != 0xff) {
|
|
if (dComIfGs_isSwitch(field_0x6e0, fopAcM_GetRoomNo(this)) != 0) {
|
|
fopAcM_delete(this);
|
|
return 1;
|
|
}
|
|
} else {
|
|
/* dSv_event_flag_c::M_029 - Death Mountain (room) - Win wrestle match against Gor Coron */
|
|
if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[62])) {
|
|
fopAcM_delete(this);
|
|
return 1;
|
|
}
|
|
}
|
|
col_set();
|
|
return 1;
|
|
}
|
|
|
|
int daObjGraWall_c::Delete() {
|
|
return 1;
|
|
}
|
|
|
|
static const f32 l_DATA[2] = {180.0f, 280.0f};
|
|
|
|
const static dCcD_SrcCyl l_cyl_src = {
|
|
{
|
|
{0x0, {{0x0, 0x0, 0x0}, {0x0, 0x0}, 0x19}}, // mObj
|
|
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x8}, // mGObjAt
|
|
{dCcD_SE_NONE, 0x0, 0x0, 0x0, 0x0}, // mGObjTg
|
|
{0x0}, // mGObjCo
|
|
}, // mObjInf
|
|
{
|
|
{
|
|
{0.0f, 0.0f, 0.0f}, // mCenter
|
|
0.0f, // mRadius
|
|
0.0f // mHeight
|
|
} // mCyl
|
|
}
|
|
};
|
|
|
|
void daObjGraWall_c::col_init() {
|
|
mStts.Init(0xff, 0xff, this);
|
|
mCyl.Set(l_cyl_src);
|
|
mCyl.SetStts(&mStts);
|
|
}
|
|
|
|
void daObjGraWall_c::col_set() {
|
|
mCyl.SetC(current.pos);
|
|
mCyl.SetH(l_DATA[1]);
|
|
mCyl.SetR(l_DATA[0]);
|
|
dComIfG_Ccsp()->Set(&mCyl);
|
|
}
|
|
|
|
static int daObjGraWall_Execute(daObjGraWall_c* i_this) {
|
|
return i_this->Execute();
|
|
}
|
|
|
|
static int daObjGraWall_IsDelete(daObjGraWall_c* i_this) {
|
|
return 1;
|
|
}
|
|
|
|
static int daObjGraWall_Delete(daObjGraWall_c* i_this) {
|
|
return i_this->Delete();
|
|
}
|
|
|
|
static int daObjGraWall_create(fopAc_ac_c* i_this) {
|
|
return static_cast<daObjGraWall_c*>(i_this)->Create();
|
|
}
|
|
|
|
static actor_method_class l_daObjGraWall_Method = {
|
|
(process_method_func)daObjGraWall_create,
|
|
(process_method_func)daObjGraWall_Delete,
|
|
(process_method_func)daObjGraWall_Execute,
|
|
(process_method_func)daObjGraWall_IsDelete,
|
|
(process_method_func)NULL,
|
|
};
|
|
|
|
actor_process_profile_definition g_profile_GRA_WALL = {
|
|
/* Layer ID */ fpcLy_CURRENT_e,
|
|
/* List ID */ 3,
|
|
/* List Prio */ fpcPi_CURRENT_e,
|
|
/* Proc Name */ fpcNm_GRA_WALL_e,
|
|
/* Proc SubMtd */ &g_fpcLf_Method.base,
|
|
/* Size */ sizeof(daObjGraWall_c),
|
|
/* Size Other */ 0,
|
|
/* Parameters */ 0,
|
|
/* Leaf SubMtd */ &g_fopAc_Method.base,
|
|
/* Draw Prio */ fpcDwPi_GRA_WALL_e,
|
|
/* Actor SubMtd */ &l_daObjGraWall_Method,
|
|
/* Status */ fopAcStts_UNK_0x40000_e,
|
|
/* Group */ fopAc_ACTOR_e,
|
|
/* Cull Type */ fopAc_CULLBOX_CUSTOM_e,
|
|
};
|