NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
s_StateMethodUsr_FI.cpp
1#include <types.h>
2#include <dol/sLib/s_StateMethodUsr_FI.hpp>
3
4sStateMethodUsr_FI_c::sStateMethodUsr_FI_c(sStateIDChkIf_c &check, sStateFctIf_c &factory, const sStateIDIf_c &state) :
5 sStateMethod_c(check, factory, state) {
6}
7
9 mpState = mpStateFct.build(*getNewStateID()); // Create new state holder with the next state ID
11 return 1;
12}
13
15 initializeStateMethod(); // Ensure we are in a valid state (this only actually initializes the state if !mIsValid)
17}
18
22}
23
25 finalizeStateMethod(); // Terminate the current state
26 initializeStateMethod(); // Initialize the new state
27}
The interface for state factories.
virtual void dispose(sStateIf_c *&id)=0
Clears out the pointer to a state.
virtual sStateIf_c * build(sStateIDIf_c const &id)=0
Returns a new state with a given state ID.
The interface for state ID checkers.
The interface for state IDs.
virtual const void execute()=0
Executes the state.
virtual const void initialize()=0
Initializes the state.
virtual const void finalize()=0
Prepares the state for termination.
virtual void finalizeStateLocalMethod()
Performs the actual state termination.
virtual int initializeStateLocalMethod()
Performs the actual state initialization.
virtual void executeStateLocalMethod()
Performs the actual state execution.
virtual void changeStateLocalMethod(const sStateIDIf_c &newStateID)
Performs the actual state transition.
A class that handles state execution and transition.
virtual void initializeStateMethod()
Initializes the current state.
virtual const sStateIDIf_c * getNewStateID() const
Gets the next state ID.
virtual void finalizeStateMethod()
Prepares the current state for termination.
sStateFctIf_c & mpStateFct
The state factory which produces the state holder.
sStateIf_c * mpState
The current state holder.