mirror of
https://github.com/zeldaret/tww.git
synced 2026-08-17 21:03:35 -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
95 lines
2.9 KiB
C++
95 lines
2.9 KiB
C++
//
|
|
// Generated by dtk
|
|
// Translation Unit: d_a_spotbox.cpp
|
|
//
|
|
|
|
#include "d/dolzel_rel.h" // IWYU pragma: keep
|
|
#include "d/actor/d_a_spotbox.h"
|
|
#include "f_op/f_op_actor_mng.h"
|
|
#include "d/d_com_inf_game.h"
|
|
#include "m_Do/m_Do_mtx.h"
|
|
|
|
cPhs_State daSpotbox_c::create() {
|
|
fopAcM_ct(this, daSpotbox_c);
|
|
f32 baseScale = getType() != 0 ? 1000.0f : 100.0f;
|
|
scale.x *= baseScale;
|
|
scale.y *= baseScale;
|
|
scale.z *= (baseScale * 1.2f);
|
|
current.pos.y += scale.y * 0.5f;
|
|
fopAcM_SetMtx(this, mMtx);
|
|
fopAcM_setCullSizeBox(this, -0.5f, -0.5f, -0.5f, 0.5f, 0.5f, 0.5f);
|
|
|
|
return cPhs_COMPLEATE_e;
|
|
}
|
|
|
|
BOOL daSpotbox_c::draw() {
|
|
if (dComIfGd_getSpotModelNum() != 0) {
|
|
dComIfGd_setSpotModel(dDlst_alphaModel_c::TYPE_CUBE, mMtx, 0x20);
|
|
}
|
|
return TRUE;
|
|
}
|
|
|
|
BOOL daSpotbox_c::execute() {
|
|
mDoMtx_stack_c::transS(current.pos);
|
|
mDoMtx_stack_c::YrotM(current.angle.y);
|
|
mDoMtx_stack_c::scaleM(scale);
|
|
cMtx_copy(mDoMtx_stack_c::get(), mMtx);
|
|
return TRUE;
|
|
}
|
|
|
|
/* 00000078-000000C4 .text daSpotbox_Draw__FP11daSpotbox_c */
|
|
static BOOL daSpotbox_Draw(daSpotbox_c* i_this) {
|
|
return ((daSpotbox_c*)i_this)->draw();
|
|
}
|
|
|
|
/* 000000C4-00000138 .text daSpotbox_Execute__FP11daSpotbox_c */
|
|
static BOOL daSpotbox_Execute(daSpotbox_c* i_this) {
|
|
return ((daSpotbox_c*)i_this)->execute();
|
|
}
|
|
|
|
/* 00000138-00000140 .text daSpotbox_IsDelete__FP11daSpotbox_c */
|
|
static BOOL daSpotbox_IsDelete(daSpotbox_c* i_this) {
|
|
return TRUE;
|
|
}
|
|
|
|
/* 00000140-00000170 .text daSpotbox_Delete__FP11daSpotbox_c */
|
|
static BOOL daSpotbox_Delete(daSpotbox_c* i_this) {
|
|
i_this->~daSpotbox_c();
|
|
return true;
|
|
}
|
|
|
|
/* 00000170-00000250 .text daSpotbox_Create__FP10fopAc_ac_c */
|
|
static cPhs_State daSpotbox_Create(fopAc_ac_c* i_this) {
|
|
daSpotbox_c* a_this = (daSpotbox_c*)i_this;
|
|
return a_this->create();
|
|
}
|
|
|
|
static actor_method_class l_daSpotbox_Method = {
|
|
(process_method_func)daSpotbox_Create,
|
|
(process_method_func)daSpotbox_Delete,
|
|
(process_method_func)daSpotbox_Execute,
|
|
(process_method_func)daSpotbox_IsDelete,
|
|
(process_method_func)daSpotbox_Draw,
|
|
};
|
|
|
|
actor_process_profile_definition g_profile_SPOTBOX = {
|
|
/* Layer ID */ fpcLy_CURRENT_e,
|
|
/* List ID */ 0x0007,
|
|
/* List Prio */ fpcPi_CURRENT_e,
|
|
/* Proc Name */ fpcNm_SPOTBOX_e,
|
|
/* Proc SubMtd */ &g_fpcLf_Method.base,
|
|
/* Size */ sizeof(daSpotbox_c),
|
|
/* Size Other */ 0,
|
|
/* Parameters */ 0,
|
|
/* Leaf SubMtd */ &g_fopAc_Method.base,
|
|
/* Draw Prio */ fpcDwPi_SPOTBOX_e,
|
|
/* Actor SubMtd */ &l_daSpotbox_Method,
|
|
#if VERSION == VERSION_DEMO
|
|
/* Status */ fopAcStts_NOCULLEXEC_e | fopAcStts_CULL_e | fopAcStts_UNK40000_e,
|
|
#else
|
|
/* Status */ fopAcStts_NOCULLEXEC_e | fopAcStts_CULL_e | fopAcStts_UNK4000_e | fopAcStts_UNK40000_e,
|
|
#endif
|
|
/* Group */ fopAc_ACTOR_e,
|
|
/* Cull Type */ fopAc_CULLBOX_CUSTOM_e,
|
|
};
|