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