NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
d_actor_state.hpp
1#pragma once
2
3#include <game/bases/d_actor.hpp>
5
6/// @brief An implementation of dActor_c with state support.
7/// @ingroup bases
8class dActorState_c : public dActor_c {
9public:
10 dActorState_c(); ///< @copydoc dActor_c::dActor_c
11 ~dActorState_c(); ///< @copydoc dActor_c::~dActor_c
12
14
16
17 /// @cond
18 void dummy() {
19 mStateMgr.initializeState();
20 mStateMgr.finalizeState();
21 mStateMgr.getOldStateID();
22 }
23 /// @endcond
24};
25
26/// @brief An implementation of dActor_c with multi state support.
27/// @ingroup bases
29public:
30 dActorMultiState_c() : mStateMgr(*this, sStateID::null) {} ///< @copydoc dActor_c::dActor_c
31 ~dActorMultiState_c(); ///< @copydoc dActor_c::~dActor_c
32
33 /// @brief Changes the actor's state to the given state.
34 /// @param newState The state ID of the new state.
35 virtual void changeState(const sStateIDIf_c &newState) { mStateMgr.changeState(newState); }
37
39
40 /// @cond
41 void dummy() {
42 mStateMgr.initializeState();
43 mStateMgr.finalizeState();
44 mStateMgr.changeToSubState(*mStateMgr.getOldStateID());
45 }
46 /// @endcond
47};
dActorMultiState_c()
Constructs a new actor.
virtual void changeState(const sStateIDIf_c &newState)
Changes the actor's state to the given state.
sFStateStateMgr_c< dActorMultiState_c, sStateMethodUsr_FI_c, sStateMethodUsr_FI_c > mStateMgr
The state manager.
~dActorMultiState_c()
Destroys the actor.
dActorState_c()
Constructs a new actor.
~dActorState_c()
Destroys the actor.
sFStateMgr_c< dActorState_c, sStateMethodUsr_FI_c > mStateMgr
The state manager.
dActor_c()
Constructs a new actor.
Definition d_actor.cpp:46
A wrapper for sStateMgr_c that uses sFStateFct_c and sStateIDChk_c.
The interface for state IDs.
#define STATE_VIRTUAL_FUNC_DECLARE(class, name)
Declares a virtual state.
Definition s_State.hpp:22