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

Implement remaining CStateManager stubs

This commit is contained in:
Jack Andersen
2017-03-31 09:51:40 -10:00
parent 2530163a8c
commit 1731cae418
23 changed files with 317 additions and 90 deletions

View File

@@ -523,7 +523,7 @@ void CGameArea::UpdateThermalVisor(float dt)
void CGameArea::AliveUpdate(float dt)
{
if (x12c_postConstructed->x10dc_occlusionState == EOcclusionState::NotOccluded)
if (x12c_postConstructed->x10dc_occlusionState == EOcclusionState::Occluded)
x12c_postConstructed->x10e4_ += dt;
else
x12c_postConstructed->x10e4_ = 0.f;
@@ -537,7 +537,7 @@ void CGameArea::SetOcclusionState(EOcclusionState state)
if (!xf0_24_postConstructed || x12c_postConstructed->x10dc_occlusionState == state)
return;
if (state == EOcclusionState::NotOccluded)
if (state == EOcclusionState::Occluded)
{
ReloadAllUnloadedTextures();
AddStaticGeometry();
@@ -553,19 +553,19 @@ void CGameArea::SetOcclusionState(EOcclusionState state)
void CGameArea::RemoveStaticGeometry()
{
if (!xf0_24_postConstructed || !x12c_postConstructed ||
x12c_postConstructed->x10dc_occlusionState == EOcclusionState::NotOccluded)
x12c_postConstructed->x10dc_occlusionState == EOcclusionState::Occluded)
return;
x12c_postConstructed->x10e0_ = 0;
x12c_postConstructed->x10dc_occlusionState = EOcclusionState::NotOccluded;
x12c_postConstructed->x10dc_occlusionState = EOcclusionState::Occluded;
g_Renderer->RemoveStaticGeometry(&x12c_postConstructed->x4c_insts);
}
void CGameArea::AddStaticGeometry()
{
if (x12c_postConstructed->x10dc_occlusionState != EOcclusionState::Occluded)
if (x12c_postConstructed->x10dc_occlusionState != EOcclusionState::Visible)
{
x12c_postConstructed->x10e0_ = 0;
x12c_postConstructed->x10dc_occlusionState = EOcclusionState::Occluded;
x12c_postConstructed->x10dc_occlusionState = EOcclusionState::Visible;
if (!x12c_postConstructed->x1108_25_)
FillInStaticGeometry();
g_Renderer->AddStaticGeometry(&x12c_postConstructed->x4c_insts,