2020-01-15 12:07:48 +00:00
|
|
|
#include "Runtime/MP1/CPreFrontEnd.hpp"
|
|
|
|
|
|
|
|
#include "Runtime/CResLoader.hpp"
|
|
|
|
#include "Runtime/GameGlobalObjects.hpp"
|
2021-06-07 00:35:39 +00:00
|
|
|
|
2020-01-15 12:07:48 +00:00
|
|
|
#include "Runtime/MP1/MP1.hpp"
|
2017-01-17 01:23:19 +00:00
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
namespace metaforce::MP1 {
|
2017-01-17 01:23:19 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
CPreFrontEnd::CPreFrontEnd() : CIOWin("Pre front-end window") {}
|
2017-01-17 01:23:19 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
CIOWin::EMessageReturn CPreFrontEnd::OnMessage(const CArchitectureMessage& msg, CArchitectureQueue&) {
|
|
|
|
if (msg.GetType() != EArchMsgType::TimerTick)
|
|
|
|
return EMessageReturn::Normal;
|
2017-01-20 03:53:32 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
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;
|
2017-01-17 01:23:19 +00:00
|
|
|
}
|
|
|
|
|
2021-04-10 08:42:06 +00:00
|
|
|
} // namespace metaforce::MP1
|