2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-05-13 23:11:20 +00:00
metaforce/Runtime/MP1/CPreFrontEnd.cpp
Lioncash 1cb289f243 RuntimeCommon: Normalize cpp inclusions
Normalizes the headers for the cpp files in the RuntimeCommon target.
Now all headers and source files within the RuntimeCommon/RuntimeCommonB
targets are normalized and consistent with one another.
2020-01-15 09:15:47 -05:00

32 lines
931 B
C++

#include "Runtime/MP1/CPreFrontEnd.hpp"
#include "Runtime/CResLoader.hpp"
#include "Runtime/GameGlobalObjects.hpp"
#include "Runtime/MP1/MP1.hpp"
namespace urde::MP1 {
CPreFrontEnd::CPreFrontEnd() : CIOWin("Pre front-end window") {}
CIOWin::EMessageReturn CPreFrontEnd::OnMessage(const CArchitectureMessage& msg, CArchitectureQueue&) {
if (msg.GetType() != EArchMsgType::TimerTick)
return EMessageReturn::Normal;
CMain* m = static_cast<CMain*>(g_Main);
if (CResLoader* loader = g_ResFactory->GetResLoader())
if (!loader->AreAllPaksLoaded())
return EMessageReturn::Exit;
if (!x14_resourceTweaksRegistered) {
m->RegisterResourceTweaks();
x14_resourceTweaksRegistered = true;
}
m->MemoryCardInitializePump();
if (!g_MemoryCardSys)
return EMessageReturn::Exit;
if (!m->LoadAudio())
return EMessageReturn::Exit;
return EMessageReturn::RemoveIOWinAndExit;
}
} // namespace urde::MP1