mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-11 20:24:01 +00:00
CFluidUVMotion: Return std::array by value from CalculateFluidTextureOffset()
Same behavior, but allows for easier use of API and makes it harder to misuse. It also makes it easier for analysis to determine out of bounds, given we leverage std::array rather than a pointer that causes arrays to decay and lose their size information.
This commit is contained in:
@@ -18,11 +18,10 @@ CFluidPlaneShader::RenderSetupInfo CFluidPlaneDoor::RenderSetup(const CStateMana
|
||||
bool noNormals) {
|
||||
CFluidPlaneShader::RenderSetupInfo out;
|
||||
|
||||
float uvT = mgr.GetFluidPlaneManager()->GetUVT();
|
||||
const float uvT = mgr.GetFluidPlaneManager()->GetUVT();
|
||||
CGraphics::SetModelMatrix(xf);
|
||||
|
||||
float fluidUVs[3][2];
|
||||
x4c_uvMotion.CalculateFluidTextureOffset(uvT, fluidUVs);
|
||||
const auto fluidUVs = x4c_uvMotion.CalculateFluidTextureOffset(uvT);
|
||||
|
||||
out.texMtxs[0][0][0] = x4c_uvMotion.GetFluidLayers()[1].GetUVScale();
|
||||
out.texMtxs[0][1][1] = x4c_uvMotion.GetFluidLayers()[1].GetUVScale();
|
||||
|
||||
Reference in New Issue
Block a user