2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 18:24:55 +00:00

Initial CFluidPlane implementation

This commit is contained in:
Jack Andersen
2017-08-07 20:03:57 -10:00
parent 5590e2f27a
commit 3650a58a1e
27 changed files with 1801 additions and 99 deletions

View File

@@ -503,19 +503,9 @@ void CActorLights::BuildDynamicLightList(const CStateManager& mgr, const zeus::C
}
}
void CActorLights::ActivateLights(CBooModel& model) const
std::vector<CLight> CActorLights::BuildLightVector() const
{
std::vector<CLight> lights;
if (x298_28_inArea)
{
if (!x298_26_hasAreaLights || !x299_26_)
{
g_Renderer->SetAmbientColor(zeus::CColor::skWhite);
model.ActivateLights(lights);
return;
}
}
lights.push_back(CLight::BuildLocalAmbient(zeus::CVector3f::skZero, x288_ambientColor));
if (x0_areaLights.size())
@@ -538,6 +528,24 @@ void CActorLights::ActivateLights(CBooModel& model) const
for (const CLight& light : x144_dynamicLights)
lights.push_back(light);
return lights;
}
void CActorLights::ActivateLights(CBooModel& model) const
{
std::vector<CLight> lights;
if (x298_28_inArea)
{
if (!x298_26_hasAreaLights || !x299_26_)
{
g_Renderer->SetAmbientColor(zeus::CColor::skWhite);
model.ActivateLights(lights);
return;
}
}
lights = BuildLightVector();
model.ActivateLights(lights);
if (x298_31_disableWorldLights)

View File

@@ -71,6 +71,7 @@ public:
void BuildFaceLightList(const CStateManager& mgr, const CGameArea& area, const zeus::CAABox& aabb);
bool BuildAreaLightList(const CStateManager& mgr, const CGameArea& area, const zeus::CAABox& aabb);
void BuildDynamicLightList(const CStateManager& mgr, const zeus::CAABox& aabb);
std::vector<CLight> BuildLightVector() const;
void ActivateLights(CBooModel& model) const;
void SetCastShadows(bool v) { x298_25_castShadows = v; }
void SetFindShadowLight(bool v) { x298_27_findShadowLight = v; }