diff options
| author | elijah-thomas774 <elijahthomas774@gmail.com> | 2024-06-09 22:47:44 -0400 |
|---|---|---|
| committer | elijah-thomas774 <elijahthomas774@gmail.com> | 2024-06-09 22:47:44 -0400 |
| commit | 70dbbb1cb11cb9018b2823d7083c9db942ee7725 (patch) | |
| tree | 6101d2f0622fa89d0485e01616ad950339a136ea /include/s | |
| parent | 5d9ca41e213c91629ebd6ffa9f748d81aac97489 (diff) | |
added macro for declaring state manager (used for annoying dummy funcs)
Diffstat (limited to 'include/s')
| -rw-r--r-- | include/s/s_State.hpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/include/s/s_State.hpp b/include/s/s_State.hpp index 97a5847e..9ec6614a 100644 --- a/include/s/s_State.hpp +++ b/include/s/s_State.hpp @@ -7,15 +7,19 @@ // Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib // See include/s/README.txt for changes made -#define STATE_FUNC_DECLARE(class, name) void initializeState_##name(); \ +#define STATE_FUNC_DECLARE(class, name) \ + void initializeState_##name(); \ void executeState_##name(); \ void finalizeState_##name(); \ static sFStateID_c<class> StateID_##name -#define STATE_DEFINE(class, name) sFStateID_c<class> class::StateID_##name( \ - #class "::StateID_" #name, \ - &class::initializeState_##name, \ - &class::executeState_##name, \ - &class::finalizeState_##name) +#define STATE_DEFINE(class, name) \ + sFStateID_c<class> class ::StateID_##name(#class "::StateID_" #name, &class ::initializeState_##name, \ + &class ::executeState_##name, &class ::finalizeState_##name) +#define STATE_MGR_DECLARE(class_name) \ + sFStateMgr_c<class_name, sStateMethodUsr_FI_c> mStateMgr; \ + void dummy_GetStateID() { \ + mStateMgr.getStateID(); \ + } #endif |
