From cd184daebad67f8ca790479e1411906b4451141e Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 22 Mar 2020 05:37:06 -0400 Subject: [PATCH] CAnimData: Give names to function prototype parameters Provides at least some form of name for all functions in the interface. This allows IDEs to perform proper name inspection (as well as being slightly more informative to the reader in some cases). --- Runtime/Character/CAnimData.hpp | 46 ++++++++++++++++----------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/Runtime/Character/CAnimData.hpp b/Runtime/Character/CAnimData.hpp index d2cf6a91c..e32385c14 100644 --- a/Runtime/Character/CAnimData.hpp +++ b/Runtime/Character/CAnimData.hpp @@ -161,36 +161,36 @@ public: TLockedToken charFactory, int drawInstCount); void SetParticleEffectState(std::string_view effectName, bool active, CStateManager& mgr); - void InitializeEffects(CStateManager&, TAreaId, const zeus::CVector3f&); - CAssetId GetEventResourceIdForAnimResourceId(CAssetId) const; + void InitializeEffects(CStateManager& mgr, TAreaId aId, const zeus::CVector3f& scale); + CAssetId GetEventResourceIdForAnimResourceId(CAssetId id) const; void AddAdditiveSegData(const CSegIdList& list, CSegStatementSet& stSet); static SAdvancementResults AdvanceAdditiveAnim(std::shared_ptr& anim, const CCharAnimTime& time); - SAdvancementDeltas AdvanceAdditiveAnims(float); - SAdvancementDeltas UpdateAdditiveAnims(float); - bool IsAdditiveAnimation(s32) const; - bool IsAdditiveAnimationAdded(s32) const; + SAdvancementDeltas AdvanceAdditiveAnims(float dt); + SAdvancementDeltas UpdateAdditiveAnims(float dt); + bool IsAdditiveAnimation(s32 idx) const; + bool IsAdditiveAnimationAdded(s32 idx) const; const std::shared_ptr& GetRootAnimationTree() const { return x1f8_animRoot; } - const std::shared_ptr& GetAdditiveAnimationTree(s32) const; - bool IsAdditiveAnimationActive(s32) const; - void DelAdditiveAnimation(s32); - void AddAdditiveAnimation(s32, float, bool, bool); + const std::shared_ptr& GetAdditiveAnimationTree(s32 idx) const; + bool IsAdditiveAnimationActive(s32 idx) const; + void DelAdditiveAnimation(s32 idx); + void AddAdditiveAnimation(s32 idx, float weight, bool active, bool fadeOut); float GetAdditiveAnimationWeight(s32 idx) const; std::shared_ptr GetAnimationManager(); const CCharacterInfo& GetCharacterInfo() const { return xc_charInfo; } const CCharLayoutInfo& GetCharLayoutInfo() const { return *xcc_layoutData.GetObj(); } - void SetPhase(float); + void SetPhase(float ph); void Touch(const CSkinnedModel& model, int shaderIdx) const; SAdvancementDeltas GetAdvancementDeltas(const CCharAnimTime& a, const CCharAnimTime& b) const; - CCharAnimTime GetTimeOfUserEvent(EUserEventType, const CCharAnimTime& time) const; - void MultiplyPlaybackRate(float); - void SetPlaybackRate(float); - void SetRandomPlaybackRate(CRandom16&); + CCharAnimTime GetTimeOfUserEvent(EUserEventType type, const CCharAnimTime& time) const; + void MultiplyPlaybackRate(float mul); + void SetPlaybackRate(float set); + void SetRandomPlaybackRate(CRandom16& r); void CalcPlaybackAlignmentParms(const CAnimPlaybackParms& parms, const std::shared_ptr& node); zeus::CTransform GetLocatorTransform(CSegId id, const CCharAnimTime* time) const; zeus::CTransform GetLocatorTransform(std::string_view name, const CCharAnimTime* time) const; - bool IsAnimTimeRemaining(float, std::string_view name) const; + bool IsAnimTimeRemaining(float rem, std::string_view name) const; float GetAnimTimeRemaining(std::string_view name) const; - float GetAnimationDuration(int) const; + float GetAnimationDuration(int animIn) const; bool GetIsLoop() const { return x220_25_loop; } void EnableLooping(bool val) { x220_25_loop = val; @@ -201,7 +201,7 @@ public: void SetAnimDir(EAnimDir dir) { x104_animDir = dir; } std::shared_ptr GetAnimSysContext() const; std::shared_ptr GetAnimationManager() const; - void RecalcPoseBuilder(const CCharAnimTime*); + void RecalcPoseBuilder(const CCharAnimTime* time); void RenderAuxiliary(const zeus::CFrustum& frustum) const; void Render(CSkinnedModel& model, const CModelFlags& drawFlags, const std::optional& morphEffect, const float* morphMagnitudes); @@ -214,11 +214,11 @@ public: static void PrimitiveSetToTokenVector(const std::set& primSet, std::vector& tokensOut, bool preLock); void GetAnimationPrimitives(const CAnimPlaybackParms& parms, std::set& primsOut) const; - void SetAnimation(const CAnimPlaybackParms& parms, bool); - SAdvancementDeltas DoAdvance(float, bool& suspendParticles, CRandom16&, bool advTree); - SAdvancementDeltas Advance(float, const zeus::CVector3f&, CStateManager& stateMgr, TAreaId aid, bool advTree); - SAdvancementDeltas AdvanceIgnoreParticles(float, CRandom16&, bool advTree); - void AdvanceAnim(CCharAnimTime& time, zeus::CVector3f&, zeus::CQuaternion&); + void SetAnimation(const CAnimPlaybackParms& parms, bool noTrans); + SAdvancementDeltas DoAdvance(float dt, bool& suspendParticles, CRandom16& random, bool advTree); + SAdvancementDeltas Advance(float dt, const zeus::CVector3f& scale, CStateManager& stateMgr, TAreaId aid, bool advTree); + SAdvancementDeltas AdvanceIgnoreParticles(float dt, CRandom16& random, bool advTree); + void AdvanceAnim(CCharAnimTime& time, zeus::CVector3f& offset, zeus::CQuaternion& quat); void SetXRayModel(const TLockedToken& model, const TLockedToken& skinRules); std::shared_ptr GetXRayModel() const { return xf4_xrayModel; } void SetInfraModel(const TLockedToken& model, const TLockedToken& skinRules);