Skip to content

Commit

Permalink
d_a_evsw OK
Browse files Browse the repository at this point in the history
fixes #184
  • Loading branch information
LagoLunatic committed Sep 6, 2024
1 parent da7a1c4 commit 45825ef
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 25 deletions.
2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
30 changes: 23 additions & 7 deletions include/d/actor/d_a_tag_evsw.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
};

Expand Down
60 changes: 43 additions & 17 deletions src/d/actor/d_a_tag_evsw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<Act_c*>(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<Act_c*>(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<Act_c*>(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<Act_c*>(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 = {
Expand Down

0 comments on commit 45825ef

Please sign in to comment.