diff --git a/configure.py b/configure.py index a3873218..9f2bf8d1 100644 --- a/configure.py +++ b/configure.py @@ -1393,7 +1393,7 @@ def JSystemLib(lib_name, objects): ActorRel(NonMatching, "d_a_tag_attention"), ActorRel(NonMatching, "d_a_tag_ba1"), ActorRel(Matching, "d_a_tag_event"), - ActorRel(NonMatching, "d_a_tag_evsw"), + ActorRel(Matching, "d_a_tag_evsw", extra_cflags=['-pragma "nosyminline on"']), ActorRel(Matching, "d_a_tag_ghostship"), ActorRel(NonMatching, "d_a_tag_hint"), ActorRel(Matching, "d_a_tag_kb_item"), diff --git a/include/d/actor/d_a_tag_evsw.h b/include/d/actor/d_a_tag_evsw.h index 94bc8990..6273b942 100644 --- a/include/d/actor/d_a_tag_evsw.h +++ b/include/d/actor/d_a_tag_evsw.h @@ -2,21 +2,37 @@ #define D_A_TAG_EVSW_H #include "f_op/f_op_actor.h" +#include "f_op/f_op_actor_mng.h" +#include "d/d_cc_d.h" +#include "d/d_a_obj.h" namespace daTagEvsw { class Act_c : public fopAc_ac_c { public: - void prm_get_Type() const {} - void prm_get_eventbitID() const {} - void prm_get_swSave() const {} + enum Prm_e { + PRM_SWSAVE_W = 8, + PRM_SWSAVE_S = 0, + + PRM_EVENTBITID_W = 16, + PRM_EVENTBITID_S = 8, + + PRM_TYPE_W = 2, + PRM_TYPE_S = 24, + }; + + int prm_get_swSave() const { return daObj::PrmAbstract(this, PRM_SWSAVE_W, PRM_SWSAVE_S); } + u16 prm_get_eventbitID() const { return daObj::PrmAbstract(this, PRM_EVENTBITID_W, PRM_EVENTBITID_S); } + u16 prm_get_Type() const { return daObj::PrmAbstract(this, PRM_TYPE_W, PRM_TYPE_S); } s32 _create(); - BOOL _delete(); - BOOL _execute(); - BOOL _draw(); + bool _delete(); + bool _execute(); + bool _draw(); public: - /* Place member variables here */ + /* 0x290 */ u8 m290[0x29C - 0x290]; + /* 0x29C */ dCcD_Stts mStts; + /* 0x2D8 */ dCcD_Cyl mCyl; }; }; diff --git a/src/d/actor/d_a_tag_evsw.cpp b/src/d/actor/d_a_tag_evsw.cpp index 74b160a7..dc136e89 100644 --- a/src/d/actor/d_a_tag_evsw.cpp +++ b/src/d/actor/d_a_tag_evsw.cpp @@ -5,52 +5,78 @@ #include "d/actor/d_a_tag_evsw.h" #include "d/d_procname.h" +#include "d/d_com_inf_game.h" /* 00000078-000001F8 .text _create__Q29daTagEvsw5Act_cFv */ s32 daTagEvsw::Act_c::_create() { - /* Nonmatching */ + fopAcM_SetupActor(this, Act_c); + + if (dComIfGs_isEventBit(prm_get_eventbitID())) { + fopAcM_onSwitch(this, prm_get_swSave()); + } else { + switch (prm_get_Type()) { + case 1: + break; + default: + fopAcM_offSwitch(this, prm_get_swSave()); + break; + } + } + + return cPhs_COMPLEATE_e; } /* 000003B0-000003B8 .text _delete__Q29daTagEvsw5Act_cFv */ -BOOL daTagEvsw::Act_c::_delete() { - /* Nonmatching */ +bool daTagEvsw::Act_c::_delete() { + return true; } /* 000003B8-0000047C .text _execute__Q29daTagEvsw5Act_cFv */ -BOOL daTagEvsw::Act_c::_execute() { - /* Nonmatching */ +bool daTagEvsw::Act_c::_execute() { + if (dComIfGs_isEventBit(prm_get_eventbitID())) { + fopAcM_onSwitch(this, prm_get_swSave()); + } else { + switch (prm_get_Type()) { + case 1: + break; + default: + fopAcM_offSwitch(this, prm_get_swSave()); + break; + } + } + return true; } /* 0000047C-00000484 .text _draw__Q29daTagEvsw5Act_cFv */ -BOOL daTagEvsw::Act_c::_draw() { - /* Nonmatching */ +bool daTagEvsw::Act_c::_draw() { + return true; } namespace daTagEvsw { namespace { /* 00000484-000004A4 .text Mthd_Create__Q29daTagEvsw26@unnamed@d_a_tag_evsw_cpp@FPv */ -void Mthd_Create(void*) { - /* Nonmatching */ +s32 Mthd_Create(void* i_this) { + return static_cast(i_this)->_create(); } /* 000004A4-000004C8 .text Mthd_Delete__Q29daTagEvsw26@unnamed@d_a_tag_evsw_cpp@FPv */ -void Mthd_Delete(void*) { - /* Nonmatching */ +BOOL Mthd_Delete(void* i_this) { + return static_cast(i_this)->_delete(); } /* 000004C8-000004EC .text Mthd_Execute__Q29daTagEvsw26@unnamed@d_a_tag_evsw_cpp@FPv */ -void Mthd_Execute(void*) { - /* Nonmatching */ +BOOL Mthd_Execute(void* i_this) { + return static_cast(i_this)->_execute(); } /* 000004EC-00000510 .text Mthd_Draw__Q29daTagEvsw26@unnamed@d_a_tag_evsw_cpp@FPv */ -void Mthd_Draw(void*) { - /* Nonmatching */ +BOOL Mthd_Draw(void* i_this) { + return static_cast(i_this)->_draw(); } /* 00000510-00000518 .text Mthd_IsDelete__Q29daTagEvsw26@unnamed@d_a_tag_evsw_cpp@FPv */ -void Mthd_IsDelete(void*) { - /* Nonmatching */ +BOOL Mthd_IsDelete(void* i_this) { + return TRUE; } static actor_method_class Mthd_Table = {