From 88cecd80ec9dfc929e22018d1b80e05375225574 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 28 Jan 2020 13:29:56 -0500 Subject: [PATCH] CAutoMapper: In-class initialize SAutoMapperRenderState member variables Simplifies the parameterized constructor a little bit and provides a consistent initial state for the default constructor. --- Runtime/AutoMapper/CAutoMapper.hpp | 38 +++++++++++++----------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/Runtime/AutoMapper/CAutoMapper.hpp b/Runtime/AutoMapper/CAutoMapper.hpp index cd617d1fc..3cd4b2719 100644 --- a/Runtime/AutoMapper/CAutoMapper.hpp +++ b/Runtime/AutoMapper/CAutoMapper.hpp @@ -33,24 +33,24 @@ public: enum class Ease { None, Linear, Out, In, InOut }; using FGetViewportSize = zeus::CVector2i (*)(); - FGetViewportSize m_getViewportSize; + FGetViewportSize m_getViewportSize = nullptr; zeus::CVector2i x0_viewportSize; zeus::CQuaternion x8_camOrientation; - float x18_camDist; - float x1c_camAngle; + float x18_camDist = 0.0f; + float x1c_camAngle = 0.0f; zeus::CVector3f x20_areaPoint; - float x2c_drawDepth1; - float x30_drawDepth2; - float x34_alphaSurfaceVisited; - float x38_alphaOutlineVisited; - float x3c_alphaSurfaceUnvisited; - float x40_alphaOutlineUnvisited; - Ease x44_viewportEase; - Ease x48_camEase; - Ease x4c_pointEase; - Ease x50_depth1Ease; - Ease x54_depth2Ease; - Ease x58_alphaEase; + float x2c_drawDepth1 = 0.0f; + float x30_drawDepth2 = 0.0f; + float x34_alphaSurfaceVisited = 0.0f; + float x38_alphaOutlineVisited = 0.0f; + float x3c_alphaSurfaceUnvisited = 0.0f; + float x40_alphaOutlineUnvisited = 0.0f; + Ease x44_viewportEase = Ease::None; + Ease x48_camEase = Ease::None; + Ease x4c_pointEase = Ease::None; + Ease x50_depth1Ease = Ease::None; + Ease x54_depth2Ease = Ease::None; + Ease x58_alphaEase = Ease::None; SAutoMapperRenderState() = default; SAutoMapperRenderState(FGetViewportSize getViewportSize, const zeus::CQuaternion& camOrientation, float camDist, float camAngle, const zeus::CVector3f& areaPoint, float drawDepth1, float drawDepth2, @@ -67,13 +67,7 @@ public: , x34_alphaSurfaceVisited(alphaSurfaceVisited) , x38_alphaOutlineVisited(alphaOutlineVisited) , x3c_alphaSurfaceUnvisited(alphaSurfaceUnvisited) - , x40_alphaOutlineUnvisited(alphaOutlineUnvisited) - , x44_viewportEase(Ease::None) - , x48_camEase(Ease::None) - , x4c_pointEase(Ease::None) - , x50_depth1Ease(Ease::None) - , x54_depth2Ease(Ease::None) - , x58_alphaEase(Ease::None) {} + , x40_alphaOutlineUnvisited(alphaOutlineUnvisited) {} static void InterpolateWithClamp(const SAutoMapperRenderState& a, SAutoMapperRenderState& out, const SAutoMapperRenderState& b, float t);