Merge pull request #130 from lioncash/naming

CAutoMapper: Make SAutoMapperRenderState constructor parameter names more informative
This commit is contained in:
Phillip Stephens 2020-01-30 20:10:54 -08:00 committed by GitHub
commit 9eb69dfd8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 33 additions and 36 deletions

View File

@ -31,46 +31,43 @@ public:
enum class EAutoMapperState { MiniMap, MapScreen, MapScreenUniverse }; enum class EAutoMapperState { MiniMap, MapScreen, MapScreenUniverse };
struct SAutoMapperRenderState { struct SAutoMapperRenderState {
enum class Ease { None, Linear, Out, In, InOut }; enum class Ease { None, Linear, Out, In, InOut };
typedef zeus::CVector2i (*FGetViewportSize)(); using FGetViewportSize = zeus::CVector2i (*)();
FGetViewportSize m_getViewportSize;
FGetViewportSize m_getViewportSize = nullptr;
zeus::CVector2i x0_viewportSize; zeus::CVector2i x0_viewportSize;
zeus::CQuaternion x8_camOrientation; zeus::CQuaternion x8_camOrientation;
float x18_camDist; float x18_camDist = 0.0f;
float x1c_camAngle; float x1c_camAngle = 0.0f;
zeus::CVector3f x20_areaPoint; zeus::CVector3f x20_areaPoint;
float x2c_drawDepth1; float x2c_drawDepth1 = 0.0f;
float x30_drawDepth2; float x30_drawDepth2 = 0.0f;
float x34_alphaSurfaceVisited; float x34_alphaSurfaceVisited = 0.0f;
float x38_alphaOutlineVisited; float x38_alphaOutlineVisited = 0.0f;
float x3c_alphaSurfaceUnvisited; float x3c_alphaSurfaceUnvisited = 0.0f;
float x40_alphaOutlineUnvisited; float x40_alphaOutlineUnvisited = 0.0f;
Ease x44_viewportEase; Ease x44_viewportEase = Ease::None;
Ease x48_camEase; Ease x48_camEase = Ease::None;
Ease x4c_pointEase; Ease x4c_pointEase = Ease::None;
Ease x50_depth1Ease; Ease x50_depth1Ease = Ease::None;
Ease x54_depth2Ease; Ease x54_depth2Ease = Ease::None;
Ease x58_alphaEase; Ease x58_alphaEase = Ease::None;
SAutoMapperRenderState() = default; SAutoMapperRenderState() = default;
SAutoMapperRenderState(FGetViewportSize v1, const zeus::CQuaternion& rot, float f1, float f2, SAutoMapperRenderState(FGetViewportSize getViewportSize, const zeus::CQuaternion& camOrientation, float camDist,
const zeus::CVector3f& v2, float f3, float f4, float f5, float f6, float f7, float f8) float camAngle, const zeus::CVector3f& areaPoint, float drawDepth1, float drawDepth2,
: m_getViewportSize(v1) float alphaSurfaceVisited, float alphaOutlineVisited, float alphaSurfaceUnvisited,
, x0_viewportSize(v1()) float alphaOutlineUnvisited)
, x8_camOrientation(rot) : m_getViewportSize(getViewportSize)
, x18_camDist(f1) , x0_viewportSize(getViewportSize())
, x1c_camAngle(f2) , x8_camOrientation(camOrientation)
, x20_areaPoint(v2) , x18_camDist(camDist)
, x2c_drawDepth1(f3) , x1c_camAngle(camAngle)
, x30_drawDepth2(f4) , x20_areaPoint(areaPoint)
, x34_alphaSurfaceVisited(f5) , x2c_drawDepth1(drawDepth1)
, x38_alphaOutlineVisited(f6) , x30_drawDepth2(drawDepth2)
, x3c_alphaSurfaceUnvisited(f7) , x34_alphaSurfaceVisited(alphaSurfaceVisited)
, x40_alphaOutlineUnvisited(f8) , x38_alphaOutlineVisited(alphaOutlineVisited)
, x44_viewportEase(Ease::None) , x3c_alphaSurfaceUnvisited(alphaSurfaceUnvisited)
, x48_camEase(Ease::None) , x40_alphaOutlineUnvisited(alphaOutlineUnvisited) {}
, x4c_pointEase(Ease::None)
, x50_depth1Ease(Ease::None)
, x54_depth2Ease(Ease::None)
, x58_alphaEase(Ease::None) {}
static void InterpolateWithClamp(const SAutoMapperRenderState& a, SAutoMapperRenderState& out, static void InterpolateWithClamp(const SAutoMapperRenderState& a, SAutoMapperRenderState& out,
const SAutoMapperRenderState& b, float t); const SAutoMapperRenderState& b, float t);