NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
s_Phase.cpp
1#include <game/sLib/s_Phase.hpp>
2
3sPhase_c::sPhase_c(phaseMethod **methodList, int count) :
4 mpMethodList(methodList),
5 mPhaseLength(count),
6 mCurrMethod(0) {
7}
8
11 return DONE;
12 }
13
14 METHOD_RESULT_e result = OK;
15 while (result == OK) {
16 result = (mpMethodList[mCurrMethod])(thisPtr);
17
18 if (result == OK) {
19 // Go to the next method
22 return DONE;
23 }
24 }
25 }
26
27 return result;
28}
phaseMethod ** mpMethodList
The method list.
Definition s_Phase.hpp:31
METHOD_RESULT_e
Return value of a phase method and callMethod.
Definition s_Phase.hpp:9
@ OK
Proceed to the next method in the phase.
Definition s_Phase.hpp:11
@ DONE
The phase is done.
Definition s_Phase.hpp:12
unsigned short mPhaseLength
The length of the method list.
Definition s_Phase.hpp:32
sPhase_c(phaseMethod **methodList, int count)
Constructs a new phase with a given method list.
Definition s_Phase.cpp:3
unsigned short mCurrMethod
The index of the method to execute.
Definition s_Phase.hpp:33
METHOD_RESULT_e callMethod(void *thisPtr)
Executes the phase until the end is reached or a method returns METHOD_RESULT_e::WAIT.
Definition s_Phase.cpp:9