2017-01-17 01:23:19 +00:00
|
|
|
#include "CPreFrontEnd.hpp"
|
2017-01-20 03:53:32 +00:00
|
|
|
#include "CResLoader.hpp"
|
|
|
|
#include "GameGlobalObjects.hpp"
|
|
|
|
#include "MP1.hpp"
|
2017-01-17 01:23:19 +00:00
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
namespace MP1
|
|
|
|
{
|
|
|
|
|
|
|
|
CPreFrontEnd::CPreFrontEnd()
|
|
|
|
: CIOWin("Pre front-end window")
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2017-01-20 03:53:32 +00:00
|
|
|
CIOWin::EMessageReturn CPreFrontEnd::OnMessage(const CArchitectureMessage& msg, CArchitectureQueue&)
|
2017-01-17 01:23:19 +00:00
|
|
|
{
|
2017-01-20 03:53:32 +00:00
|
|
|
if (msg.GetType() != EArchMsgType::TimerTick)
|
|
|
|
return EMessageReturn::Normal;
|
|
|
|
|
|
|
|
CMain* m = static_cast<CMain*>(g_Main);
|
2017-10-26 05:37:46 +00:00
|
|
|
if (CResLoader* loader = g_ResFactory->GetResLoader())
|
2017-10-27 10:10:32 +00:00
|
|
|
if (!loader->AreAllPaksLoaded())
|
2017-10-26 05:37:46 +00:00
|
|
|
return EMessageReturn::Exit;
|
2017-01-20 03:53:32 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|