Files
tp/include/d/d_event_lib.h
T

53 lines
1.3 KiB
C++
Raw Normal View History

2021-03-28 22:49:05 +02:00
#ifndef D_EVENT_D_EVENT_LIB_H
#define D_EVENT_D_EVENT_LIB_H
#include "dolphin/types.h"
2023-05-12 12:10:14 -07:00
class fopAc_ac_c;
2022-06-27 01:37:35 +02:00
template <typename A0>
struct action_class {
typedef bool (A0::*fptr)();
2022-06-27 01:37:35 +02:00
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);
2022-06-27 01:37:35 +02:00
/* 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();
2022-06-27 01:37:35 +02:00
virtual ~dEvLib_callback_c() {}
virtual bool eventStart() { return true; }
virtual bool eventRun() { return true; }
virtual bool eventEnd() { return true; }
2022-06-27 01:37:35 +02:00
2023-03-01 14:13:22 -08:00
/* 0x4 */ fopAc_ac_c* mActor;
/* 0x8 */ action_class<dEvLib_callback_c>* mAction;
/* 0xC */ u16 _C;
2022-06-27 01:37:35 +02:00
};
2021-03-28 22:49:05 +02:00
#endif /* D_EVENT_D_EVENT_LIB_H */