summaryrefslogtreecommitdiff
path: root/src/s/s_FPhase.cpp
blob: fef755ab5b5022ca99ee5e716b1304ef7f0d4f2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include "s/s_FPhase.h"

// Not present in NSMBW

sFPhaseBaseBase::~sFPhaseBaseBase() {}
sFPhaseBase::~sFPhaseBase() {}

sFPhaseBase::sFPhaseState sFPhaseBase::step() {
    if (!isFinalized()) {
        mState = callPhase();
        if (mState == PHASE_NEXT) {
            nextPhase();
            if (hasReachedEnd()) {
                mState = PHASE_ALL_DONE;
            }
        }
    }

    return mState;
}

void sFPhaseBase::reset() {
    onReset();
    mState = PHASE_INITIAL;
}