CWorldTransManager: Mark lightPos as constexpr in UpdateLights()

Allows the compiler to optimize the initialization away if it chooses to
do so.
This commit is contained in:
Lioncash 2020-04-07 07:23:12 -04:00
parent 7ba5a5b183
commit 139d290d7d
1 changed files with 3 additions and 2 deletions

View File

@ -44,11 +44,12 @@ CWorldTransManager::SModelDatas::SModelDatas(const CAnimRes& samusRes) : x0_samu
} }
void CWorldTransManager::UpdateLights(float dt) { void CWorldTransManager::UpdateLights(float dt) {
if (!x4_modelData) if (!x4_modelData) {
return; return;
}
x4_modelData->x1a0_lights.clear(); x4_modelData->x1a0_lights.clear();
zeus::CVector3f lightPos(0.f, 10.f, 0.f); constexpr zeus::CVector3f lightPos(0.f, 10.f, 0.f);
CLight spot = CLight::BuildSpot(lightPos, zeus::skBack, zeus::skWhite, 90.f); CLight spot = CLight::BuildSpot(lightPos, zeus::skBack, zeus::skWhite, 90.f);
spot.SetAttenuation(1.f, 0.f, 0.f); spot.SetAttenuation(1.f, 0.f, 0.f);