Files
tp/include/d/d_event_lib.h
T
TakaRikka 12eb254d76 switch to dtk setup (#2203)
* switch to dtk setup

* some cleanup / fixes

* cleanup d_a_alink literals

* Restore doxygen, update CI & README.md (#1)

* Fix build image ref (#2)

---------

Co-authored-by: Luke Street <luke@street.dev>
2024-10-10 08:29:58 -06:00

53 lines
1.3 KiB
C++

#ifndef D_EVENT_D_EVENT_LIB_H
#define D_EVENT_D_EVENT_LIB_H
#include "dolphin/types.h"
class fopAc_ac_c;
template <typename A0>
struct action_class {
typedef BOOL (A0::*fptr)();
fptr init;
fptr execute;
action_class(fptr pInit, fptr pExecute) {
init = pInit;
execute = pExecute;
}
fptr& getInit() { return init; }
fptr& getExecute() { return execute; }
};
class dEvLib_callback_c {
public:
dEvLib_callback_c(fopAc_ac_c* param_0) {
mActor = param_0;
mAction = NULL;
}
/* 8004886C */ BOOL eventUpdate();
/* 800488A4 */ BOOL setEvent(int, int, int);
/* 80048940 */ void orderEvent(int, int, int);
/* 80048970 */ BOOL setAction(action_class<dEvLib_callback_c>*);
/* 800489A8 */ BOOL initAction();
/* 800489F8 */ BOOL executeAction();
/* 80048A50 */ BOOL initStart();
/* 80048A70 */ BOOL executeStart();
/* 80048B1C */ BOOL initRun();
/* 80048B48 */ BOOL executeRun();
virtual ~dEvLib_callback_c() {}
virtual BOOL eventStart() { return TRUE; }
virtual BOOL eventRun() { return TRUE; }
virtual BOOL eventEnd() { return TRUE; }
/* 0x4 */ fopAc_ac_c* mActor;
/* 0x8 */ action_class<dEvLib_callback_c>* mAction;
/* 0xC */ u16 _C;
};
#endif /* D_EVENT_D_EVENT_LIB_H */