mirror of
https://github.com/zeldaret/tww.git
synced 2026-08-18 05:08:57 -04:00
102042628f
* Fix some profile comments * Add missing static for local visibility data * Move proc name and draw priority enums to f_pc * Add _e suffix to daObjBarrier_c proc enum * Change proc name enum format to match TP * Change draw prio enum format to match TP * Change ItemNo enum format, finish fixing item names * Revert static for cb1 hio * Clean up formatting of profile comments * Fix comment alignment
114 lines
3.6 KiB
C++
114 lines
3.6 KiB
C++
//
|
|
// Generated by dtk
|
|
// Translation Unit: d_a_hitobj.cpp
|
|
//
|
|
|
|
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
|
#include "d/actor/d_a_hitobj.h"
|
|
#include "d/d_com_inf_game.h"
|
|
#include "f_op/f_op_actor.h"
|
|
#include "f_op/f_op_kankyo_mng.h"
|
|
#include "f_op/f_op_actor_mng.h"
|
|
|
|
/* 00000078-00000080 .text daHitobj_Draw__FP12hitobj_class */
|
|
static BOOL daHitobj_Draw(hitobj_class* i_this) {
|
|
return TRUE;
|
|
}
|
|
|
|
/* 00000080-000000E8 .text daHitobj_Execute__FP12hitobj_class */
|
|
static BOOL daHitobj_Execute(hitobj_class* i_this) {
|
|
if (i_this->mTimer != 0) {
|
|
i_this->mTimer--;
|
|
|
|
i_this->mSph.SetC(i_this->current.pos);
|
|
|
|
dComIfG_Ccsp()->Set(&i_this->mSph);
|
|
} else {
|
|
fopKyM_Delete(i_this);
|
|
}
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
/* 000000E8-000000F0 .text daHitobj_IsDelete__FP12hitobj_class */
|
|
static BOOL daHitobj_IsDelete(hitobj_class* i_this) {
|
|
return TRUE;
|
|
}
|
|
|
|
/* 000000F0-00000120 .text daHitobj_Delete__FP12hitobj_class */
|
|
static BOOL daHitobj_Delete(hitobj_class* i_this) {
|
|
dComIfG_resDelete(&i_this->mPhs, "Hitobj");
|
|
return TRUE;
|
|
}
|
|
|
|
/* 00000120-0000025C .text daHitobj_Create__FP10fopAc_ac_c */
|
|
static cPhs_State daHitobj_Create(fopAc_ac_c* pActor) {
|
|
hitobj_class* i_this = (hitobj_class*)pActor;
|
|
fopAcM_ct(i_this, hitobj_class);
|
|
|
|
cPhs_State res = dComIfG_resLoad(&(i_this->mPhs), "Hitobj");
|
|
if (res == cPhs_COMPLEATE_e) {
|
|
i_this->mUnusedParam = fopAcM_GetParam(i_this) & 0xFF;
|
|
|
|
static dCcD_SrcSph cc_sph_src = {
|
|
// dCcD_SrcGObjInf
|
|
{
|
|
/* Flags */ 0,
|
|
/* SrcObjAt Type */ AT_TYPE_WATER,
|
|
/* SrcObjAt Atp */ 0,
|
|
/* SrcObjAt SPrm */ cCcD_AtSPrm_Set_e | cCcD_AtSPrm_VsEnemy_e | cCcD_AtSPrm_VsOther_e,
|
|
/* SrcObjTg Type */ 0,
|
|
/* SrcObjTg SPrm */ cCcD_TgSPrm_Set_e | cCcD_TgSPrm_IsEnemy_e,
|
|
/* SrcObjCo SPrm */ 0,
|
|
/* SrcGObjAt Se */ 0,
|
|
/* SrcGObjAt HitMark */ 0,
|
|
/* SrcGObjAt Spl */ 0,
|
|
/* SrcGObjAt Mtrl */ 0,
|
|
/* SrcGObjAt SPrm */ 0,
|
|
/* SrcGObjTg Se */ 0,
|
|
/* SrcGObjTg HitMark */ 0,
|
|
/* SrcGObjTg Spl */ 0,
|
|
/* SrcGObjTg Mtrl */ 0,
|
|
/* SrcGObjTg SPrm */ 0,
|
|
/* SrcGObjCo SPrm */ 0,
|
|
},
|
|
// cM3dGSphS
|
|
{{
|
|
/* Center */ {0.0f, 0.0f, 0.0f},
|
|
/* Radius */ 100.0f,
|
|
}},
|
|
};
|
|
i_this->mStts.Init(0xFF, 0xFF, i_this);
|
|
i_this->mSph.Set(cc_sph_src);
|
|
i_this->mSph.SetStts(&i_this->mStts);
|
|
|
|
i_this->mTimer = 3;
|
|
}
|
|
return res;
|
|
}
|
|
|
|
static actor_method_class l_daHitobj_Method = {
|
|
(process_method_func)daHitobj_Create,
|
|
(process_method_func)daHitobj_Delete,
|
|
(process_method_func)daHitobj_Execute,
|
|
(process_method_func)daHitobj_IsDelete,
|
|
(process_method_func)daHitobj_Draw,
|
|
};
|
|
|
|
actor_process_profile_definition g_profile_HITOBJ = {
|
|
/* Layer ID */ fpcLy_CURRENT_e,
|
|
/* List ID */ 0x0007,
|
|
/* List Prio */ fpcPi_CURRENT_e,
|
|
/* Proc Name */ fpcNm_HITOBJ_e,
|
|
/* Proc SubMtd */ &g_fpcLf_Method.base,
|
|
/* Size */ sizeof(hitobj_class),
|
|
/* Size Other */ 0,
|
|
/* Parameters */ 0,
|
|
/* Leaf SubMtd */ &g_fopAc_Method.base,
|
|
/* Draw Prio */ fpcDwPi_HITOBJ_e,
|
|
/* Actor SubMtd */ &l_daHitobj_Method,
|
|
/* Status */ fopAcStts_UNK40000_e,
|
|
/* Group */ fopAc_ACTOR_e,
|
|
/* Cull Type */ fopAc_CULLBOX_0_e,
|
|
};
|