From dd7d9c024fdaf134d3099daeb5050cdc6346d7ae Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 6 Apr 2020 08:46:36 -0400 Subject: [PATCH] CGameLight: Add parameter names to function prototypes Same behavior, but more self-documenting from interface alone. Also allows better parameter introspection. --- Runtime/World/CGameLight.cpp | 6 +++--- Runtime/World/CGameLight.hpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Runtime/World/CGameLight.cpp b/Runtime/World/CGameLight.cpp index c5acc0a48..e03019125 100644 --- a/Runtime/World/CGameLight.cpp +++ b/Runtime/World/CGameLight.cpp @@ -8,14 +8,14 @@ namespace urde { CGameLight::CGameLight(TUniqueId uid, TAreaId aid, bool active, std::string_view name, const zeus::CTransform& xf, - TUniqueId parentId, const CLight& light, u32 sourceId, u32 w2, float f1) + TUniqueId parentId, const CLight& light, u32 sourceId, u32 priority, float lifeTime) : CActor(uid, active, name, CEntityInfo(aid, CEntity::NullConnectionList), xf, CModelData::CModelDataNull(), CMaterialList(), CActorParameters::None(), kInvalidUniqueId) , xe8_parentId(parentId) , xec_light(light) , x13c_lightId(sourceId) -, x140_priority(w2) -, x144_lifeTime(f1) { +, x140_priority(priority) +, x144_lifeTime(lifeTime) { xec_light.GetRadius(); xec_light.GetIntensity(); SetLightPriorityAndId(); diff --git a/Runtime/World/CGameLight.hpp b/Runtime/World/CGameLight.hpp index f64c850a0..d840a8bc9 100644 --- a/Runtime/World/CGameLight.hpp +++ b/Runtime/World/CGameLight.hpp @@ -15,13 +15,13 @@ class CGameLight : public CActor { float x144_lifeTime; public: - CGameLight(TUniqueId, TAreaId, bool, std::string_view, const zeus::CTransform&, TUniqueId, const CLight&, - u32 sourceId, u32, float); + CGameLight(TUniqueId uid, TAreaId aid, bool active, std::string_view name, const zeus::CTransform& xf, + TUniqueId parentId, const CLight& light, u32 sourceId, u32 priority, float lifeTime); void Accept(IVisitor& visitor) override; - void Think(float, CStateManager&) override; + void Think(float dt, CStateManager& mgr) override; void SetLightPriorityAndId(); - void SetLight(const CLight&); + void SetLight(const CLight& light); CLight GetLight() const; TUniqueId GetParentId() const { return xe8_parentId; } };