mirror of https://github.com/AxioDL/metaforce.git
General: Mark CMaterialFilter instances constexpr where applicable
Allows omission of runtime overhead.
This commit is contained in:
parent
33411ceeca
commit
579ae79291
|
@ -302,7 +302,7 @@ bool CActorLights::BuildAreaLightList(const CStateManager& mgr, const CGameArea&
|
||||||
x0_areaLights.clear();
|
x0_areaLights.clear();
|
||||||
|
|
||||||
/* Filter for performing final light visibility test */
|
/* Filter for performing final light visibility test */
|
||||||
CMaterialFilter filter = CMaterialFilter::MakeIncludeExclude(
|
constexpr auto filter = CMaterialFilter::MakeIncludeExclude(
|
||||||
CMaterialList(EMaterialTypes::Solid),
|
CMaterialList(EMaterialTypes::Solid),
|
||||||
CMaterialList(EMaterialTypes::Projectile, EMaterialTypes::ProjectilePassthrough, EMaterialTypes::SeeThrough));
|
CMaterialList(EMaterialTypes::Projectile, EMaterialTypes::ProjectilePassthrough, EMaterialTypes::SeeThrough));
|
||||||
u32 mostSigLightIdx = 0;
|
u32 mostSigLightIdx = 0;
|
||||||
|
|
|
@ -206,7 +206,7 @@ void CEnvFxManager::UpdateBlockedGrids(CStateManager& mgr, EEnvFxType type, cons
|
||||||
if (type == EEnvFxType::UnderwaterFlake) {
|
if (type == EEnvFxType::UnderwaterFlake) {
|
||||||
grid.x14_block = std::make_pair(true, float(-FLT_MAX));
|
grid.x14_block = std::make_pair(true, float(-FLT_MAX));
|
||||||
} else {
|
} else {
|
||||||
CMaterialFilter filter =
|
constexpr auto filter =
|
||||||
CMaterialFilter::MakeIncludeExclude({EMaterialTypes::Solid, EMaterialTypes::Trigger},
|
CMaterialFilter::MakeIncludeExclude({EMaterialTypes::Solid, EMaterialTypes::Trigger},
|
||||||
{EMaterialTypes::ProjectilePassthrough, EMaterialTypes::SeeThrough});
|
{EMaterialTypes::ProjectilePassthrough, EMaterialTypes::SeeThrough});
|
||||||
zeus::CVector3f pos = xf * zeus::CVector3f((grid.x4_position + grid.xc_extent * 0).toVec2f() / 256.f) +
|
zeus::CVector3f pos = xf * zeus::CVector3f((grid.x4_position + grid.xc_extent * 0).toVec2f() / 256.f) +
|
||||||
|
|
Loading…
Reference in New Issue