2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 05:07:43 +00:00

New code style refactor

This commit is contained in:
Jack Andersen
2018-12-07 19:30:43 -10:00
parent 41ae32be31
commit 636c82a568
1451 changed files with 171430 additions and 203303 deletions

View File

@@ -6,29 +6,23 @@
#include "CGameState.hpp"
#include "MP1.hpp"
namespace urde::MP1
{
namespace urde::MP1 {
CIOWin::EMessageReturn CAudioStateWin::OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue)
{
CMain* m = static_cast<CMain*>(g_Main);
CIOWin::EMessageReturn CAudioStateWin::OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue) {
CMain* m = static_cast<CMain*>(g_Main);
const EArchMsgType msgType = msg.GetType();
if (msgType == EArchMsgType::SetGameState)
{
CSfxManager::KillAll(CSfxManager::ESfxChannels::Game);
CSfxManager::TurnOnChannel(CSfxManager::ESfxChannels::Game);
const EArchMsgType msgType = msg.GetType();
if (msgType == EArchMsgType::SetGameState) {
CSfxManager::KillAll(CSfxManager::ESfxChannels::Game);
CSfxManager::TurnOnChannel(CSfxManager::ESfxChannels::Game);
} else if (msgType == EArchMsgType::QuitGameplay) {
if (g_GameState->GetWorldTransitionManager()->GetTransType() == CWorldTransManager::ETransType::Disabled ||
m->GetFlowState() != EFlowState::None) {
CSfxManager::SetChannel(CSfxManager::ESfxChannels::Default);
CSfxManager::KillAll(CSfxManager::ESfxChannels::Game);
}
else if (msgType == EArchMsgType::QuitGameplay)
{
if (g_GameState->GetWorldTransitionManager()->GetTransType() == CWorldTransManager::ETransType::Disabled ||
m->GetFlowState() != EFlowState::None)
{
CSfxManager::SetChannel(CSfxManager::ESfxChannels::Default);
CSfxManager::KillAll(CSfxManager::ESfxChannels::Game);
}
}
return EMessageReturn::Normal;
}
return EMessageReturn::Normal;
}
}
} // namespace urde::MP1