diff --git a/configure.py b/configure.py index b271e7b40..5a17e5ee3 100644 --- a/configure.py +++ b/configure.py @@ -1418,7 +1418,7 @@ config.libs = [ ActorRel(NonMatching, "d_a_daiocta_eye"), ActorRel(NonMatching, "d_a_deku_item"), ActorRel(NonMatching, "d_a_dk"), - ActorRel(NonMatching, "d_a_dummy"), + ActorRel(Matching, "d_a_dummy"), ActorRel(NonMatching, "d_a_fallrock_tag"), ActorRel(Matching, "d_a_fan", extra_cflags=['-pragma "nosyminline on"']), ActorRel(NonMatching, "d_a_fganon"), diff --git a/include/d/actor/d_a_dummy.h b/include/d/actor/d_a_dummy.h index f7602a4eb..31afefb14 100644 --- a/include/d/actor/d_a_dummy.h +++ b/include/d/actor/d_a_dummy.h @@ -6,16 +6,21 @@ namespace daDummy { class Act_c : public fopAc_ac_c { public: - void solidHeapCB(fopAc_ac_c*); - void create_heap(); + static BOOL solidHeapCB(fopAc_ac_c*); + bool create_heap(); s32 _create(); - BOOL _delete(); + bool _delete(); void set_mtx(); - BOOL _execute(); - BOOL _draw(); - + bool _execute(); + bool _draw(); + + virtual ~Act_c() {} + public: /* Place member variables here */ + /* 0x290 */ // vtable + /* 0x294 */ u8 field_0x294[0x29c - 0x294]; + /* 0x29c */ Mtx field_0x29c; }; }; diff --git a/src/d/actor/d_a_dummy.cpp b/src/d/actor/d_a_dummy.cpp index 3fbedf772..e5f719022 100644 --- a/src/d/actor/d_a_dummy.cpp +++ b/src/d/actor/d_a_dummy.cpp @@ -4,39 +4,100 @@ // #include "d/actor/d_a_dummy.h" -#include "dolphin/types.h" +#include "d/d_procname.h" +#include "f_op/f_op_actor_mng.h" +#include "m_Do/m_Do_mtx.h" /* 00000078-0000009C .text solidHeapCB__Q27daDummy5Act_cFP10fopAc_ac_c */ -void daDummy::Act_c::solidHeapCB(fopAc_ac_c*) { - /* Nonmatching */ +BOOL daDummy::Act_c::solidHeapCB(fopAc_ac_c* i_this) { + return ((Act_c*)i_this)->create_heap(); } /* 0000009C-000000A4 .text create_heap__Q27daDummy5Act_cFv */ -void daDummy::Act_c::create_heap() { - /* Nonmatching */ +bool daDummy::Act_c::create_heap() { + return true; } /* 000000A4-0000015C .text _create__Q27daDummy5Act_cFv */ -s32 daDummy::Act_c::_create() { - /* Nonmatching */ +s32 daDummy::Act_c::_create() { + fopAcM_SetupActor(this, Act_c); + + if (fopAcM_entrySolidHeap(this, solidHeapCB, 0) != 0) { + set_mtx(); + fopAcM_SetMtx(this, field_0x29c); + fopAcM_setCullSizeBox(this, -100.0, -1000.0, -100.0, 100.0, 100.0, 100.0); + } + return cPhs_COMPLEATE_e; } /* 0000015C-00000164 .text _delete__Q27daDummy5Act_cFv */ -BOOL daDummy::Act_c::_delete() { - /* Nonmatching */ +bool daDummy::Act_c::_delete() { + return true; } /* 00000164-000001CC .text set_mtx__Q27daDummy5Act_cFv */ void daDummy::Act_c::set_mtx() { - /* Nonmatching */ + mDoMtx_stack_c::transS(current.pos); + mDoMtx_stack_c::ZXYrotM(shape_angle); + cMtx_copy(mDoMtx_stack_c::get(), field_0x29c); } /* 000001CC-000001D4 .text _execute__Q27daDummy5Act_cFv */ -BOOL daDummy::Act_c::_execute() { - /* Nonmatching */ +bool daDummy::Act_c::_execute() { + return true; } /* 000001D4-000001DC .text _draw__Q27daDummy5Act_cFv */ -BOOL daDummy::Act_c::_draw() { - /* Nonmatching */ +bool daDummy::Act_c::_draw() { + return true; } + +namespace daDummy { + namespace { + s32 Mthd_Create(void* i_this) { + return static_cast(i_this)->_create(); + } + + BOOL Mthd_Delete(void* i_this) { + return static_cast(i_this)->_delete(); + } + + BOOL Mthd_Execute(void* i_this) { + return static_cast(i_this)->_execute(); + } + + BOOL Mthd_Draw(void* i_this) { + return ((Act_c*)i_this)->_draw(); + } + + BOOL Mthd_IsDelete(void* i_this) { + return TRUE; + } + static actor_method_class Mthd_Table = { + (process_method_func)Mthd_Create, + (process_method_func)Mthd_Delete, + (process_method_func)Mthd_Execute, + (process_method_func)Mthd_IsDelete, + (process_method_func)Mthd_Draw, + }; + } +} + +actor_process_profile_definition g_profile_Dummy = { + /* LayerID */ fpcLy_CURRENT_e, + /* ListID */ 7, + /* ListPrio */ fpcLy_CURRENT_e, + /* ProcName */ PROC_Dummy, + /* Proc SubMtd */ &g_fpcLf_Method.mBase, + /* Size */ sizeof(daDummy::Act_c), + /* SizeOther */ 0, + /* Parameters */ 0, + /* Leaf SubMtd */ &g_fopAc_Method.base, + /* Priority */ 0x0060, + /* Actor SubMtd */ &daDummy::Mthd_Table, + /* Status */ fopAcStts_UNK40000_e, + /* Group */ fopAc_ACTOR_e, + /* CullType */ fopAc_CULLBOX_CUSTOM_e, +}; + +