mirror of https://github.com/AxioDL/metaforce.git
Compile fixes, Implement CStateSetterFlow::OnMessage
This commit is contained in:
parent
140c24bf60
commit
67748655ba
|
@ -39,7 +39,14 @@ CIOWin::EMessageReturn CSplashScreen::OnMessage(const CArchitectureMessage& msg,
|
|||
|
||||
if (x18_splashTimeout <= 0.f)
|
||||
{
|
||||
/* HACK: If we're not compiling with Intel's IPP library we want to skip the Dolby Pro Logic II logo
|
||||
* This is purely a URDE addition and does not reflect retro's intentions. - Phil
|
||||
*/
|
||||
#if INTEL_IPP
|
||||
if (x14_which != ESplashScreen::Dolby)
|
||||
#else
|
||||
if (x14_which != ESplashScreen::Retro)
|
||||
#endif
|
||||
queue.Push(MakeMsg::CreateCreateIOWin(EArchMsgTarget::IOWinManager, 9999, 9999,
|
||||
std::make_shared<CSplashScreen>(ESplashScreen(int(x14_which) + 1))));
|
||||
return EMessageReturn::RemoveIOWinAndExit;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "CStateSetterFlow.hpp"
|
||||
|
||||
#include "CArchitectureMessage.hpp"
|
||||
#include "GameGlobalObjects.hpp"
|
||||
namespace urde
|
||||
{
|
||||
namespace MP1
|
||||
|
@ -13,7 +14,12 @@ CStateSetterFlow::CStateSetterFlow()
|
|||
|
||||
CIOWin::EMessageReturn CStateSetterFlow::OnMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue)
|
||||
{
|
||||
return EMessageReturn::Normal;
|
||||
if (msg.GetType() == EArchMsgType::TimerTick)
|
||||
{
|
||||
//g_Main->sub80004590();
|
||||
return EMessageReturn::RemoveIOWinAndExit;
|
||||
}
|
||||
return EMessageReturn::Exit;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -102,8 +102,8 @@ CGameArchitectureSupport::CGameArchitectureSupport(CMain& parent,
|
|||
CStreamAudioManager::SetMusicVolume(0x7f);
|
||||
m->ResetGameState();
|
||||
|
||||
//std::shared_ptr<CIOWin> splash = std::make_shared<CSplashScreen>(CSplashScreen::ESplashScreen::Nintendo);
|
||||
//x58_ioWinManager.AddIOWin(splash, 1000, 10000);
|
||||
std::shared_ptr<CIOWin> splash = std::make_shared<CSplashScreen>(CSplashScreen::ESplashScreen::Nintendo);
|
||||
x58_ioWinManager.AddIOWin(splash, 1000, 10000);
|
||||
|
||||
std::shared_ptr<CIOWin> mf = std::make_shared<CMainFlow>();
|
||||
x58_ioWinManager.AddIOWin(mf, 0, 0);
|
||||
|
|
|
@ -296,7 +296,7 @@ static std::vector<SObjectTag> ReadDependencyList(CInputStream& in)
|
|||
std::pair<std::unique_ptr<u8[]>, s32> GetScriptingMemoryAlways(const IGameArea& area)
|
||||
{
|
||||
SObjectTag tag = {SBIG('MREA'), area.IGetAreaAssetId()};
|
||||
std::unique_ptr<u8[]> data = std::move(g_ResFactory->LoadNewResourcePartSync(tag, 0, 96, data));
|
||||
std::unique_ptr<u8[]> data = std::move(g_ResFactory->LoadNewResourcePartSync(tag, 0, 96));
|
||||
|
||||
if (*reinterpret_cast<u32*>(data.get()) != SBIG(0xDEADBEEF))
|
||||
return {};
|
||||
|
@ -326,9 +326,9 @@ std::pair<std::unique_ptr<u8[]>, s32> GetScriptingMemoryAlways(const IGameArea&
|
|||
|
||||
u32 dataLen = ROUND_UP_32(header.secCount * 4);
|
||||
|
||||
data.reset(std::move(g_ResFactory->LoadNewResourcePartSync(tag, 96, dataLen)));
|
||||
data = std::move(g_ResFactory->LoadNewResourcePartSync(tag, 96, dataLen));
|
||||
|
||||
r = CMemoryInStream(data, dataLen);
|
||||
r = CMemoryInStream(data.get(), dataLen);
|
||||
|
||||
std::vector<u32> secSizes(header.secCount);
|
||||
u32 lastSize;
|
||||
|
@ -591,7 +591,7 @@ bool CGameArea::DoesAreaNeedSkyNow() const
|
|||
|
||||
void CGameArea::UpdateFog(float dt)
|
||||
{
|
||||
CAreaFog* fog = *GetPostConstructed()->x10c4_areaFog;
|
||||
CAreaFog* fog = GetPostConstructed()->x10c4_areaFog.get();
|
||||
if (fog)
|
||||
fog->Update(dt);
|
||||
}
|
||||
|
@ -600,11 +600,13 @@ void CGameArea::OtherAreaOcclusionChanged()
|
|||
{
|
||||
if (GetPostConstructed()->x10e0_ == 3 && GetPostConstructed()->x10dc_occlusionState != EOcclusionState::Occluded)
|
||||
{
|
||||
bool unloaded = true;
|
||||
bool transferred = true;
|
||||
#if 0
|
||||
bool unloaded = UnloadAllloadedTextures();
|
||||
bool transferred = TransferTokensToARAM();
|
||||
x12c_postConstructed->x1108_27_ = (unloaded && transferred)
|
||||
#endif
|
||||
x12c_postConstructed->x1108_27_ = (unloaded && transferred);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -629,8 +631,7 @@ void CGameArea::PingOcclusionState()
|
|||
unloaded = UnloadAllloadedTextures();
|
||||
transferred = TransferTokens();
|
||||
#endif
|
||||
if (unloaded && transferred)
|
||||
x12c_postConstructed->x1108_27_ = true;
|
||||
x12c_postConstructed->x1108_27_ = (unloaded && transferred);
|
||||
|
||||
x12c_postConstructed->x1108_26_ = true;
|
||||
}
|
||||
|
@ -742,7 +743,7 @@ void CGameArea::SetOcclusionState(EOcclusionState state)
|
|||
if (!xf0_24_postConstructed || x12c_postConstructed->x10dc_occlusionState == state)
|
||||
return;
|
||||
|
||||
if (state == EOcclusionState::Occluded)
|
||||
if (state != EOcclusionState::Occluded)
|
||||
{
|
||||
ReloadAllUnloadedTextures();
|
||||
AddStaticGeometry();
|
||||
|
|
Loading…
Reference in New Issue