metaforce/Runtime/CMainFlowBase.cpp

27 lines
643 B
C++
Raw Normal View History

2015-08-27 00:23:46 +00:00
#include "CMainFlowBase.hpp"
#include "CArchitectureMessage.hpp"
2016-03-04 23:04:53 +00:00
namespace urde
2015-08-27 00:23:46 +00:00
{
CIOWin::EMessageReturn CMainFlowBase::OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue)
{
switch (msg.GetType())
{
2015-11-21 01:16:07 +00:00
case EArchMsgType::TimerTick:
2015-08-27 00:23:46 +00:00
AdvanceGameState(queue);
break;
2015-11-21 01:16:07 +00:00
case EArchMsgType::SetGameState:
2015-08-27 00:23:46 +00:00
{
const CArchMsgParmInt32& state = MakeMsg::GetParmNewGameflowState(msg);
x14_gameState = EClientFlowStates(state.x4_parm);
SetGameState(x14_gameState, queue);
2015-11-21 01:16:07 +00:00
return EMessageReturn::Exit;
2015-08-27 00:23:46 +00:00
}
default: break;
}
2015-11-21 01:16:07 +00:00
return EMessageReturn::Normal;
2015-08-27 00:23:46 +00:00
}
}