NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
s_State.hpp
Go to the documentation of this file.
1
#pragma once
2
#include <game/sLib/s_FStateStateMgr.hpp>
3
#include <game/sLib/s_FStateMgr.hpp>
4
#include <game/sLib/s_StateMethodUsr_FI.hpp>
5
#include <game/sLib/s_FStateVirtualID.hpp>
6
/// @file
7
8
/// @brief Declares a state.
9
/// @param class The class name.
10
/// @param name The state name.
11
/// @hideinitializer
12
#define STATE_FUNC_DECLARE(class, name) \
13
void initializeState_##name(); \
14
void executeState_##name(); \
15
void finalizeState_##name(); \
16
static sFStateID_c<class> StateID_##name
17
18
/// @brief Declares a virtual state.
19
/// @param class The class name.
20
/// @param name The state name.
21
/// @hideinitializer
22
#define STATE_VIRTUAL_FUNC_DECLARE(class, name) \
23
virtual void initializeState_##name(); \
24
virtual void executeState_##name(); \
25
virtual void finalizeState_##name(); \
26
static sFStateVirtualID_c<class> StateID_##name
27
28
/// @brief Defines a state.
29
/// @param class The class name.
30
/// @param name The state name.
31
/// @hideinitializer
32
#define STATE_DEFINE(class, name) sFStateID_c<class> class::StateID_##name( \
33
#class "::StateID_" #name, \
34
&class::initializeState_##name, \
35
&class::executeState_##name, \
36
&class::finalizeState_##name)
37
38
/// @brief Defines a virtual state.
39
/// @param class The class name.
40
/// @param name The state name.
41
/// @hideinitializer
42
#define STATE_VIRTUAL_DEFINE(class, name) sFStateVirtualID_c<class> class::StateID_##name( \
43
baseID_ ##name<sStateID_c> (), \
44
#class "::StateID_" #name, \
45
&class::initializeState_##name, \
46
&class::executeState_##name, \
47
&class::finalizeState_##name)
48
49
#define STATE_BASE_VIRTUAL_DEFINE(class, name) \
50
template <typename T> \
51
const sStateIDIf_c &baseID_##name() { \
52
return T::StateID_##name; \
53
} \
54
template <> \
55
const sStateIDIf_c &baseID_##name<sStateID_c>() { \
56
return sStateID::null; \
57
}
58
include
game
sLib
s_State.hpp
Made with ❤️ by
CLF78
and
RootCubed
. Logos by
Chasical
and
B1
. Website generated by
Doxygen
1.13.2