moved AdvanceGameState to subclass

This commit is contained in:
Jack Andersen 2015-08-26 14:27:32 -10:00
parent d6e0a1c7c6
commit 3616f14f94
4 changed files with 18 additions and 19 deletions

View File

@ -23,21 +23,4 @@ CIOWin::EMessageReturn CMainFlowBase::OnMessage(const CArchitectureMessage& msg,
return MsgRetNormal;
}
void CMainFlowBase::AdvanceGameState(CArchitectureQueue& queue)
{
switch (x14_gameState)
{
case ClientStateFrontEnd:
SetGameState(ClientStateGameLoad, queue);
break;
case ClientStateUnspecified:
case ClientStateGameLoad:
SetGameState(ClientStateMoviePlay, queue);
break;
case ClientStateMoviePlay:
SetGameState(ClientStateFrontEnd, queue);
break;
}
}
}

View File

@ -21,7 +21,7 @@ protected:
public:
CMainFlowBase(const char* name) : CIOWin(name) {}
EMessageReturn OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue);
void AdvanceGameState(CArchitectureQueue& queue);
virtual void AdvanceGameState(CArchitectureQueue& queue)=0;
virtual void SetGameState(EClientFlowStates state, CArchitectureQueue& queue)=0;
};

View File

@ -12,7 +12,22 @@ namespace Retro
namespace MP1
{
void CMainFlow::AdvanceGameState(CArchitectureQueue& queue)
{
switch (x14_gameState)
{
case ClientStateFrontEnd:
SetGameState(ClientStateGameLoad, queue);
break;
case ClientStateUnspecified:
case ClientStateGameLoad:
SetGameState(ClientStateMoviePlay, queue);
break;
case ClientStateMoviePlay:
SetGameState(ClientStateFrontEnd, queue);
break;
}
}
void CMainFlow::SetGameState(EClientFlowStates state, CArchitectureQueue& queue)
{

View File

@ -15,6 +15,7 @@ class CMainFlow : public CMainFlowBase
{
public:
CMainFlow() : CMainFlowBase("CMainFlow") {}
void AdvanceGameState(CArchitectureQueue& queue);
void SetGameState(EClientFlowStates state, CArchitectureQueue& queue);
bool GetIsContinueDraw() const {return false;}
void Draw() const {}