2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 22:27:43 +00:00

Finish CFlickerBat imps

This commit is contained in:
2018-12-16 21:40:27 -08:00
parent b7f35e0528
commit 6fe99a7ddf
5 changed files with 147 additions and 12 deletions

View File

@@ -860,6 +860,14 @@ void CStateManager::SetupFogForArea(TAreaId area) const {
SetupFogForArea(*areaObj);
}
void CStateManager::SetupFogForAreaNonCurrent(TAreaId area) const {
if (area == kInvalidAreaId)
area = x8cc_nextAreaId;
const CGameArea* areaObj = x850_world->GetAreaAlways(area);
if (areaObj->IsPostConstructed())
SetupFogForAreaNonCurrent(*areaObj);
}
void CStateManager::SetupFogForArea(const CGameArea& area) const {
if (SetupFogForDraw())
return;
@@ -874,6 +882,18 @@ void CStateManager::SetupFogForArea(const CGameArea& area) const {
}
}
void CStateManager::SetupFogForAreaNonCurrent(const CGameArea& area) const {
if (SetupFogForDraw())
return;
if (x8b8_playerState->GetActiveVisor(*this) == CPlayerState::EPlayerVisor::XRay) {
float fogDist = area.GetXRayFogDistance();
float farz = g_tweakGui->GetXRayFogNearZ() * (1.f - fogDist) + g_tweakGui->GetXRayFogFarZ() * fogDist;
g_Renderer->SetWorldFog(ERglFogMode(g_tweakGui->GetXRayFogMode()), g_tweakGui->GetXRayFogNearZ(), farz,
g_tweakGui->GetXRayFogColor());
}
}
bool CStateManager::SetupFogForDraw() const {
switch (x8b8_playerState->GetActiveVisor(*this)) {
case CPlayerState::EPlayerVisor::Thermal: