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

Graphics/Shaders: Use std::array where applicable

Makes the arrays strongly typed and impervious to array->pointer decay.
This also allows simplifying some operations (such as being able to call
fill() instead of needing to use std::fill, etc).
This commit is contained in:
Lioncash
2019-09-28 22:22:12 -04:00
parent 417506572c
commit 136a229a1a
36 changed files with 530 additions and 347 deletions

View File

@@ -59,14 +59,14 @@ public:
zeus::CVector3f pos;
zeus::CVector3f dir;
zeus::CColor color = zeus::skClear;
float linAtt[4] = {1.f, 0.f, 0.f};
float angAtt[4] = {1.f, 0.f, 0.f};
std::array<float, 4> linAtt{1.f, 0.f, 0.f};
std::array<float, 4> angAtt{1.f, 0.f, 0.f};
};
struct LightingUniform {
Light lights[URDE_MAX_LIGHTS];
std::array<Light, URDE_MAX_LIGHTS> lights;
zeus::CColor ambient;
zeus::CColor colorRegs[3];
std::array<zeus::CColor, 3> colorRegs;
zeus::CColor mulColor;
zeus::CColor addColor;
CGraphics::CFogState fog;