Minor fixes, rename CStateFlowSetter to CStateSetterFlow

This commit is contained in:
Phillip Stephens 2022-10-23 19:03:16 -07:00
parent f18a1963f0
commit 25294591f6
3 changed files with 20 additions and 28 deletions

View File

@ -1,12 +0,0 @@
#ifndef _CSTATEFLOWSETTER
#define _CSTATEFLOWSETTER
#include "MetroidPrime/CIOWin.hpp"
class CStateFlowSetter : public CIOWin {
public:
CStateFlowSetter();
EMessageReturn OnMessage(const CArchitectureMessage& message, CArchitectureQueue& queue);
};
#endif // _CSTATEFLOWSETTER

View File

@ -0,0 +1,12 @@
#ifndef _CSTATESETTERFLOW
#define _CSTATESETTERFLOW
#include "MetroidPrime/CIOWin.hpp"
class CStateSetterFlow : public CIOWin {
public:
CStateSetterFlow();
EMessageReturn OnMessage(const CArchitectureMessage& message, CArchitectureQueue& queue);
};
#endif // _CSTATESETTERFLOW

View File

@ -8,7 +8,7 @@
#include "MetroidPrime/CMFGameLoader.hpp" #include "MetroidPrime/CMFGameLoader.hpp"
#include "MetroidPrime/CPlayMovie.hpp" #include "MetroidPrime/CPlayMovie.hpp"
#include "MetroidPrime/CPreFrontEnd.hpp" #include "MetroidPrime/CPreFrontEnd.hpp"
#include "MetroidPrime/CStateFlowSetter.hpp" #include "MetroidPrime/CStateSetterFlow.hpp"
#include "MetroidPrime/Decode.hpp" #include "MetroidPrime/Decode.hpp"
#include "MetroidPrime/CMain.hpp" #include "MetroidPrime/CMain.hpp"
@ -63,7 +63,7 @@ void CMainFlow::AdvanceGameState(CArchitectureQueue& queue) {
void CMainFlow::SetGameState(EClientFlowStates state, CArchitectureQueue& queue) { void CMainFlow::SetGameState(EClientFlowStates state, CArchitectureQueue& queue) {
x14_gameState = state; x14_gameState = state;
switch (state) { switch (x14_gameState) {
case kCFS_GameExit: { case kCFS_GameExit: {
switch (gpMain->GetRestartMode()) { switch (gpMain->GetRestartMode()) {
case CMain::kRM_WinBad: case CMain::kRM_WinBad:
@ -78,6 +78,7 @@ void CMainFlow::SetGameState(EClientFlowStates state, CArchitectureQueue& queue)
default: default:
break; break;
} }
break;
} }
case kCFS_PreFrontEnd: { case kCFS_PreFrontEnd: {
if (gpMain->GetRestartMode() == CMain::kRM_None) { if (gpMain->GetRestartMode() == CMain::kRM_None) {
@ -88,22 +89,13 @@ void CMainFlow::SetGameState(EClientFlowStates state, CArchitectureQueue& queue)
break; break;
} }
case kCFS_FrontEnd: case kCFS_FrontEnd:
CIOWin* ioWin = nullptr; if (gpMain->GetRestartMode() == CMain::kRM_None) {
switch (gpMain->GetRestartMode()) {
case CMain::kRM_StateSetter:
ioWin = new CStateFlowSetter();
break;
case CMain::kRM_WinBad:
case CMain::kRM_WinGood:
case CMain::kRM_WinBest:
case CMain::kRM_LoseGame:
case CMain::kRM_Default:
ioWin = new CFrontEndUI();
default:
break; break;
} }
queue.Push(MakeMsg::CreateCreateIOWin(kAMT_IOWinManager, 12, 11,
queue.Push(MakeMsg::CreateCreateIOWin(kAMT_IOWinManager, 12, 11, ioWin)); gpMain->GetRestartMode() == CMain::kRM_StateSetter
? (CIOWin*)new CStateSetterFlow()
: (CIOWin*)new CFrontEndUI()));
break; break;
case kCFS_Game: case kCFS_Game:
gpGameState->GameOptions().EnsureOptions(); gpGameState->GameOptions().EnsureOptions();