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

zeus constexpr refactor and thermal visor fixes

This commit is contained in:
Jack Andersen
2019-02-23 21:15:54 -10:00
parent 1186b8097c
commit 8df0a4913c
226 changed files with 1339 additions and 1305 deletions

View File

@@ -18,7 +18,7 @@ CGuiLight::CGuiLight(const CGuiWidgetParms& parms, const CLight& light)
CGuiLight::~CGuiLight() { xb0_frame->RemoveLight(this); }
CLight CGuiLight::BuildLight() const {
CLight ret = CLight::BuildLocalAmbient(zeus::CVector3f::skZero, zeus::CColor::skBlack);
CLight ret = CLight::BuildLocalAmbient(zeus::skZero3f, zeus::skBlack);
switch (xb8_type) {
case ELightType::Spot:
@@ -63,7 +63,7 @@ std::shared_ptr<CGuiWidget> CGuiLight::Create(CGuiFrame* frame, CInputStream& in
switch (tp) {
case ELightType::Spot: {
float cutoff = in.readFloatBig();
CLight lt = CLight::BuildSpot(zeus::CVector3f::skZero, zeus::CVector3f::skZero, parms.x10_color, cutoff);
CLight lt = CLight::BuildSpot(zeus::skZero3f, zeus::skZero3f, parms.x10_color, cutoff);
lt.SetAttenuation(distC, distL, distQ);
lt.SetAngleAttenuation(angC, angL, angQ);
lt.x40_lightId = lightId;
@@ -71,14 +71,14 @@ std::shared_ptr<CGuiWidget> CGuiLight::Create(CGuiFrame* frame, CInputStream& in
break;
}
case ELightType::Point: {
CLight lt = CLight::BuildPoint(zeus::CVector3f::skZero, parms.x10_color);
CLight lt = CLight::BuildPoint(zeus::skZero3f, parms.x10_color);
lt.SetAttenuation(distC, distL, distQ);
lt.x40_lightId = lightId;
ret = std::make_shared<CGuiLight>(parms, lt);
break;
}
case ELightType::Directional: {
CLight lt = CLight::BuildDirectional(zeus::CVector3f::skZero, parms.x10_color);
CLight lt = CLight::BuildDirectional(zeus::skZero3f, parms.x10_color);
lt.x40_lightId = lightId;
ret = std::make_shared<CGuiLight>(parms, lt);
break;