2015-08-27 00:23:46 +00:00
|
|
|
#include "CMainFlowBase.hpp"
|
|
|
|
#include "CArchitectureMessage.hpp"
|
|
|
|
|
|
|
|
namespace Retro
|
|
|
|
{
|
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
}
|