Merge pull request #204 from lioncash/move

Character/*: std::move constructor parameters where applicable
This commit is contained in:
Phillip Stephens 2020-03-12 15:09:00 -07:00 committed by GitHub
commit 12ad192436
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 72 additions and 74 deletions

View File

@ -40,19 +40,19 @@ void CAnimData::FreeCache() {}
void CAnimData::InitializeCache() {} void CAnimData::InitializeCache() {}
CAnimData::CAnimData(CAssetId id, const CCharacterInfo& character, int defaultAnim, int charIdx, bool loop, CAnimData::CAnimData(CAssetId id, const CCharacterInfo& character, int defaultAnim, int charIdx, bool loop,
const TLockedToken<CCharLayoutInfo>& layout, const TToken<CSkinnedModel>& model, TLockedToken<CCharLayoutInfo> layout, TToken<CSkinnedModel> model,
const std::optional<TToken<CMorphableSkinnedModel>>& iceModel, const std::optional<TToken<CMorphableSkinnedModel>>& iceModel,
const std::weak_ptr<CAnimSysContext>& ctx, const std::shared_ptr<CAnimationManager>& animMgr, const std::weak_ptr<CAnimSysContext>& ctx, std::shared_ptr<CAnimationManager> animMgr,
const std::shared_ptr<CTransitionManager>& transMgr, std::shared_ptr<CTransitionManager> transMgr, TLockedToken<CCharacterFactory> charFactory,
const TLockedToken<CCharacterFactory>& charFactory, int drawInstCount) int drawInstCount)
: x0_charFactory(charFactory) : x0_charFactory(std::move(charFactory))
, xc_charInfo(character) , xc_charInfo(character)
, xcc_layoutData(layout) , xcc_layoutData(std::move(layout))
, xd8_modelData(model) , xd8_modelData(std::move(model))
, xfc_animCtx(ctx.lock()) , xfc_animCtx(ctx.lock())
, x100_animMgr(animMgr) , x100_animMgr(std::move(animMgr))
, x1d8_selfId(id) , x1d8_selfId(id)
, x1fc_transMgr(transMgr) , x1fc_transMgr(std::move(transMgr))
, x204_charIdx(charIdx) , x204_charIdx(charIdx)
, x208_defaultAnim(defaultAnim) , x208_defaultAnim(defaultAnim)
, x224_pose(layout->GetSegIdList().GetList().size()) , x224_pose(layout->GetSegIdList().GetList().size())
@ -82,10 +82,11 @@ CAnimData::CAnimData(CAssetId id, const CCharacterInfo& character, int defaultAn
character.GetCharacterName()); character.GetCharacterName());
} }
std::shared_ptr<CAnimTreeNode> treeNode = GetAnimationManager()->GetAnimationTree( auto treeNode = GetAnimationManager()->GetAnimationTree(character.GetAnimationIndex(defaultAnim),
character.GetAnimationIndex(defaultAnim), CMetaAnimTreeBuildOrders::NoSpecialOrders()); CMetaAnimTreeBuildOrders::NoSpecialOrders());
if (treeNode != x1f8_animRoot) if (treeNode != x1f8_animRoot) {
x1f8_animRoot = treeNode; x1f8_animRoot = std::move(treeNode);
}
} }
void CAnimData::SetParticleEffectState(std::string_view effectName, bool active, CStateManager& mgr) { void CAnimData::SetParticleEffectState(std::string_view effectName, bool active, CStateManager& mgr) {

View File

@ -155,11 +155,10 @@ private:
public: public:
CAnimData(CAssetId, const CCharacterInfo& character, int defaultAnim, int charIdx, bool loop, CAnimData(CAssetId, const CCharacterInfo& character, int defaultAnim, int charIdx, bool loop,
const TLockedToken<CCharLayoutInfo>& layout, const TToken<CSkinnedModel>& model, TLockedToken<CCharLayoutInfo> layout, TToken<CSkinnedModel> model,
const std::optional<TToken<CMorphableSkinnedModel>>& iceModel, const std::optional<TToken<CMorphableSkinnedModel>>& iceModel, const std::weak_ptr<CAnimSysContext>& ctx,
const std::weak_ptr<CAnimSysContext>& ctx, const std::shared_ptr<CAnimationManager>& animMgr, std::shared_ptr<CAnimationManager> animMgr, std::shared_ptr<CTransitionManager> transMgr,
const std::shared_ptr<CTransitionManager>& transMgr, const TLockedToken<CCharacterFactory>& charFactory, TLockedToken<CCharacterFactory> charFactory, int drawInstCount);
int drawInstCount);
void SetParticleEffectState(std::string_view effectName, bool active, CStateManager& mgr); void SetParticleEffectState(std::string_view effectName, bool active, CStateManager& mgr);
void InitializeEffects(CStateManager&, TAreaId, const zeus::CVector3f&); void InitializeEffects(CStateManager&, TAreaId, const zeus::CVector3f&);

View File

@ -8,7 +8,7 @@
namespace urde { namespace urde {
CAnimSourceInfo::CAnimSourceInfo(const TSubAnimTypeToken<CAnimSource>& token) : x4_token(token) {} CAnimSourceInfo::CAnimSourceInfo(TSubAnimTypeToken<CAnimSource> token) : x4_token(std::move(token)) {}
bool CAnimSourceInfo::HasPOIData() const { return x4_token->x58_evntData.HasReference(); } bool CAnimSourceInfo::HasPOIData() const { return x4_token->x58_evntData.HasReference(); }

View File

@ -28,7 +28,7 @@ class CAnimSourceInfo : public IAnimSourceInfo {
TSubAnimTypeToken<CAnimSource> x4_token; TSubAnimTypeToken<CAnimSource> x4_token;
public: public:
CAnimSourceInfo(const TSubAnimTypeToken<CAnimSource>& token); explicit CAnimSourceInfo(TSubAnimTypeToken<CAnimSource> token);
bool HasPOIData() const override; bool HasPOIData() const override;
const std::vector<CBoolPOINode>& GetBoolPOIStream() const override; const std::vector<CBoolPOINode>& GetBoolPOIStream() const override;
const std::vector<CInt32POINode>& GetInt32POIStream() const override; const std::vector<CInt32POINode>& GetInt32POIStream() const override;

View File

@ -15,8 +15,8 @@ struct CAnimSysContext {
std::shared_ptr<CRandom16> x8_random; std::shared_ptr<CRandom16> x8_random;
CSimplePool& xc_store; CSimplePool& xc_store;
CAnimSysContext(const TToken<CTransitionDatabaseGame>& transDB, u32 randomSeed, CSimplePool& store) CAnimSysContext(TToken<CTransitionDatabaseGame> transDB, u32 randomSeed, CSimplePool& store)
: x0_transDB(transDB), x8_random(std::make_shared<CRandom16>(randomSeed)), xc_store(store) {} : x0_transDB(std::move(transDB)), x8_random(std::make_shared<CRandom16>(randomSeed)), xc_store(store) {}
}; };
} // namespace urde } // namespace urde

View File

@ -6,7 +6,7 @@ namespace urde {
CAnimTreeAnimReaderContainer::CAnimTreeAnimReaderContainer(std::string_view name, std::shared_ptr<IAnimReader> reader, CAnimTreeAnimReaderContainer::CAnimTreeAnimReaderContainer(std::string_view name, std::shared_ptr<IAnimReader> reader,
u32 dbIdx) u32 dbIdx)
: CAnimTreeNode(name), x14_reader(reader), x1c_animDbIdx(dbIdx) {} : CAnimTreeNode(name), x14_reader(std::move(reader)), x1c_animDbIdx(dbIdx) {}
u32 CAnimTreeAnimReaderContainer::Depth() const { return 1; } u32 CAnimTreeAnimReaderContainer::Depth() const { return 1; }

View File

@ -19,13 +19,13 @@ CAnimTreeLoopIn::CAnimTreeLoopIn(const std::weak_ptr<CAnimTreeNode>& a, const st
, x30_fundamentals(CSequenceHelper(x14_child, x18_nextAnim, animCtx).ComputeSequenceFundamentals()) {} , x30_fundamentals(CSequenceHelper(x14_child, x18_nextAnim, animCtx).ComputeSequenceFundamentals()) {}
CAnimTreeLoopIn::CAnimTreeLoopIn(const std::weak_ptr<CAnimTreeNode>& a, const std::weak_ptr<CAnimTreeNode>& b, CAnimTreeLoopIn::CAnimTreeLoopIn(const std::weak_ptr<CAnimTreeNode>& a, const std::weak_ptr<CAnimTreeNode>& b,
bool didLoopIn, const CAnimSysContext& animCtx, std::string_view name, bool didLoopIn, CAnimSysContext animCtx, std::string_view name,
const CSequenceFundamentals& fundamentals, const CCharAnimTime& time) CSequenceFundamentals fundamentals, const CCharAnimTime& time)
: CAnimTreeSingleChild(a, name) : CAnimTreeSingleChild(a, name)
, x18_nextAnim(b.lock()) , x18_nextAnim(b.lock())
, x1c_didLoopIn(didLoopIn) , x1c_didLoopIn(didLoopIn)
, x20_animCtx(animCtx) , x20_animCtx(std::move(animCtx))
, x30_fundamentals(fundamentals) , x30_fundamentals(std::move(fundamentals))
, x88_curTime(time) {} , x88_curTime(time) {}
CAnimTreeEffectiveContribution CAnimTreeLoopIn::VGetContributionOfHighestInfluence() const { CAnimTreeEffectiveContribution CAnimTreeLoopIn::VGetContributionOfHighestInfluence() const {

View File

@ -23,7 +23,7 @@ public:
CAnimTreeLoopIn(const std::weak_ptr<CAnimTreeNode>& a, const std::weak_ptr<CAnimTreeNode>& b, CAnimTreeLoopIn(const std::weak_ptr<CAnimTreeNode>& a, const std::weak_ptr<CAnimTreeNode>& b,
const std::weak_ptr<CAnimTreeNode>& c, const CAnimSysContext& animCtx, std::string_view name); const std::weak_ptr<CAnimTreeNode>& c, const CAnimSysContext& animCtx, std::string_view name);
CAnimTreeLoopIn(const std::weak_ptr<CAnimTreeNode>& a, const std::weak_ptr<CAnimTreeNode>& b, bool didLoopIn, CAnimTreeLoopIn(const std::weak_ptr<CAnimTreeNode>& a, const std::weak_ptr<CAnimTreeNode>& b, bool didLoopIn,
const CAnimSysContext& animCtx, std::string_view name, const CSequenceFundamentals& fundamentals, CAnimSysContext animCtx, std::string_view name, CSequenceFundamentals fundamentals,
const CCharAnimTime& time); const CCharAnimTime& time);
CAnimTreeEffectiveContribution VGetContributionOfHighestInfluence() const override; CAnimTreeEffectiveContribution VGetContributionOfHighestInfluence() const override;
bool VSupportsReverseView() const { return false; } bool VSupportsReverseView() const { return false; }

View File

@ -6,22 +6,22 @@
namespace urde { namespace urde {
CAnimTreeSequence::CAnimTreeSequence(const std::vector<std::shared_ptr<IMetaAnim>>& seq, const CAnimSysContext& animSys, CAnimTreeSequence::CAnimTreeSequence(std::vector<std::shared_ptr<IMetaAnim>> seq, CAnimSysContext animSys,
std::string_view name) std::string_view name)
: CAnimTreeSingleChild(seq[0]->GetAnimationTree(animSys, CMetaAnimTreeBuildOrders::NoSpecialOrders()), name) : CAnimTreeSingleChild(seq[0]->GetAnimationTree(animSys, CMetaAnimTreeBuildOrders::NoSpecialOrders()), name)
, x18_animCtx(animSys) , x18_animCtx(std::move(animSys))
, x28_sequence(seq) , x28_sequence(std::move(seq))
, x3c_fundamentals(CSequenceHelper(seq, animSys).ComputeSequenceFundamentals()) , x3c_fundamentals(CSequenceHelper(x28_sequence, x18_animCtx).ComputeSequenceFundamentals())
, x94_curTime(0.f) {} , x94_curTime(0.f) {}
CAnimTreeSequence::CAnimTreeSequence(const std::shared_ptr<CAnimTreeNode>& curNode, CAnimTreeSequence::CAnimTreeSequence(const std::shared_ptr<CAnimTreeNode>& curNode,
const std::vector<std::shared_ptr<IMetaAnim>>& metaAnims, std::vector<std::shared_ptr<IMetaAnim>> metaAnims,
const CAnimSysContext& animSys, std::string_view name, CAnimSysContext animSys, std::string_view name,
const CSequenceFundamentals& fundamentals, const CCharAnimTime& time) CSequenceFundamentals fundamentals, const CCharAnimTime& time)
: CAnimTreeSingleChild(curNode, name) : CAnimTreeSingleChild(curNode, name)
, x18_animCtx(animSys) , x18_animCtx(std::move(animSys))
, x28_sequence(metaAnims) , x28_sequence(std::move(metaAnims))
, x3c_fundamentals(fundamentals) , x3c_fundamentals(std::move(fundamentals))
, x94_curTime(time) {} , x94_curTime(time) {}
CAnimTreeEffectiveContribution CAnimTreeSequence::VGetContributionOfHighestInfluence() const { CAnimTreeEffectiveContribution CAnimTreeSequence::VGetContributionOfHighestInfluence() const {

View File

@ -20,11 +20,10 @@ class CAnimTreeSequence : public CAnimTreeSingleChild {
CCharAnimTime x94_curTime; CCharAnimTime x94_curTime;
public: public:
CAnimTreeSequence(const std::vector<std::shared_ptr<IMetaAnim>>& seq, const CAnimSysContext& animSys, CAnimTreeSequence(std::vector<std::shared_ptr<IMetaAnim>> seq, CAnimSysContext animSys, std::string_view name);
std::string_view name); CAnimTreeSequence(const std::shared_ptr<CAnimTreeNode>& curNode, std::vector<std::shared_ptr<IMetaAnim>> metaAnims,
CAnimTreeSequence(const std::shared_ptr<CAnimTreeNode>& curNode, CAnimSysContext animSys, std::string_view name, CSequenceFundamentals fundamentals,
const std::vector<std::shared_ptr<IMetaAnim>>& metaAnims, const CAnimSysContext& animSys, const CCharAnimTime& time);
std::string_view name, const CSequenceFundamentals& fundamentals, const CCharAnimTime& time);
CAnimTreeEffectiveContribution VGetContributionOfHighestInfluence() const override; CAnimTreeEffectiveContribution VGetContributionOfHighestInfluence() const override;
std::shared_ptr<IAnimReader> VGetBestUnblendedChild() const override; std::shared_ptr<IAnimReader> VGetBestUnblendedChild() const override;

View File

@ -19,8 +19,8 @@ class CAnimationManager {
CAnimSysContext x8_sysCtx; CAnimSysContext x8_sysCtx;
public: public:
CAnimationManager(const TToken<CAnimationDatabaseGame>& animDB, const CAnimSysContext& sysCtx) CAnimationManager(TToken<CAnimationDatabaseGame> animDB, CAnimSysContext sysCtx)
: x0_animDB(animDB), x8_sysCtx(sysCtx) {} : x0_animDB(std::move(animDB)), x8_sysCtx(std::move(sysCtx)) {}
const CAnimationDatabaseGame* GetAnimationDatabase() const; const CAnimationDatabaseGame* GetAnimationDatabase() const;
std::shared_ptr<CAnimTreeNode> GetAnimationTree(s32, const CMetaAnimTreeBuildOrders& orders) const; std::shared_ptr<CAnimTreeNode> GetAnimationTree(s32, const CMetaAnimTreeBuildOrders& orders) const;

View File

@ -78,19 +78,20 @@ std::unique_ptr<CAnimData> CCharacterFactory::CreateCharacter(int charIdx, bool
const TLockedToken<CCharacterFactory>& factory, const TLockedToken<CCharacterFactory>& factory,
int defaultAnim, int drawInsts) const { int defaultAnim, int drawInsts) const {
const CCharacterInfo& charInfo = x4_charInfoDB[charIdx]; const CCharacterInfo& charInfo = x4_charInfoDB[charIdx];
CVParamTransfer charParm(new TObjOwnerParam<const CCharacterInfo*>(&charInfo)); const CVParamTransfer charParm(new TObjOwnerParam<const CCharacterInfo*>(&charInfo));
TToken<CSkinnedModel> skinnedModel = const_cast<CCharacterFactory*>(this)->x70_cacheResPool.GetObj( TToken<CSkinnedModel> skinnedModel = const_cast<CCharacterFactory*>(this)->x70_cacheResPool.GetObj(
{FourCC(drawInsts << 16), charInfo.GetModelId()}, charParm); {FourCC(drawInsts << 16), charInfo.GetModelId()}, charParm);
std::optional<TToken<CMorphableSkinnedModel>> iceModel; std::optional<TToken<CMorphableSkinnedModel>> iceModel;
if (charInfo.GetIceModelId().IsValid() && charInfo.GetIceSkinRulesId().IsValid()) if (charInfo.GetIceModelId().IsValid() && charInfo.GetIceSkinRulesId().IsValid()) {
iceModel.emplace(const_cast<CCharacterFactory*>(this)->x70_cacheResPool.GetObj( iceModel.emplace(const_cast<CCharacterFactory*>(this)->x70_cacheResPool.GetObj(
{FourCC((drawInsts << 16) | 1), charInfo.GetIceModelId()}, charParm)); {FourCC((drawInsts << 16) | 1), charInfo.GetIceModelId()}, charParm));
}
return std::make_unique<CAnimData>(x68_selfId, charInfo, defaultAnim, charIdx, loop, x14_charLayoutInfoDB[charIdx], return std::make_unique<CAnimData>(x68_selfId, charInfo, defaultAnim, charIdx, loop, x14_charLayoutInfoDB[charIdx],
skinnedModel, iceModel, x24_sysContext, x28_animMgr, x2c_transMgr, factory, std::move(skinnedModel), iceModel, x24_sysContext, x28_animMgr, x2c_transMgr,
drawInsts); factory, drawInsts);
} }
CAssetId CCharacterFactory::GetEventResourceIdForAnimResourceId(CAssetId id) const { CAssetId CCharacterFactory::GetEventResourceIdForAnimResourceId(CAssetId id) const {

View File

@ -14,7 +14,7 @@ class TAnimSourceInfo : public IAnimSourceInfo {
TSubAnimTypeToken<T> x4_token; TSubAnimTypeToken<T> x4_token;
public: public:
TAnimSourceInfo(const TSubAnimTypeToken<T>& token) : x4_token(token) {} explicit TAnimSourceInfo(TSubAnimTypeToken<T> token) : x4_token(std::move(token)) {}
bool HasPOIData() const override { return x4_token->HasPOIData(); } bool HasPOIData() const override { return x4_token->HasPOIData(); }
const std::vector<CBoolPOINode>& GetBoolPOIStream() const override { return x4_token->GetBoolPOIStream(); } const std::vector<CBoolPOINode>& GetBoolPOIStream() const override { return x4_token->GetBoolPOIStream(); }
const std::vector<CInt32POINode>& GetInt32POIStream() const override { return x4_token->GetInt32POIStream(); } const std::vector<CInt32POINode>& GetInt32POIStream() const override { return x4_token->GetInt32POIStream(); }

View File

@ -10,30 +10,29 @@
namespace urde { namespace urde {
CSequenceFundamentals::CSequenceFundamentals(const CSteadyStateAnimInfo& ssInfo, CSequenceFundamentals::CSequenceFundamentals(const CSteadyStateAnimInfo& ssInfo, std::vector<CBoolPOINode> boolNodes,
const std::vector<CBoolPOINode>& boolNodes, std::vector<CInt32POINode> int32Nodes,
const std::vector<CInt32POINode>& int32Nodes, std::vector<CParticlePOINode> particleNodes,
const std::vector<CParticlePOINode>& particleNodes, std::vector<CSoundPOINode> soundNodes)
const std::vector<CSoundPOINode>& soundNodes)
: x0_ssInfo(ssInfo) : x0_ssInfo(ssInfo)
, x18_boolNodes(boolNodes) , x18_boolNodes(std::move(boolNodes))
, x28_int32Nodes(int32Nodes) , x28_int32Nodes(std::move(int32Nodes))
, x38_particleNodes(particleNodes) , x38_particleNodes(std::move(particleNodes))
, x48_soundNodes(soundNodes) {} , x48_soundNodes(std::move(soundNodes)) {}
CSequenceHelper::CSequenceHelper(const std::shared_ptr<CAnimTreeNode>& a, const std::shared_ptr<CAnimTreeNode>& b, CSequenceHelper::CSequenceHelper(const std::shared_ptr<CAnimTreeNode>& a, const std::shared_ptr<CAnimTreeNode>& b,
const CAnimSysContext& animCtx) CAnimSysContext animCtx)
: x0_animCtx(animCtx) { : x0_animCtx(std::move(animCtx)) {
x10_treeNodes.reserve(2); x10_treeNodes.reserve(2);
x10_treeNodes.push_back(a); x10_treeNodes.push_back(a);
x10_treeNodes.push_back(b); x10_treeNodes.push_back(b);
} }
CSequenceHelper::CSequenceHelper(const std::vector<std::shared_ptr<IMetaAnim>>& nodes, const CAnimSysContext& animCtx) CSequenceHelper::CSequenceHelper(const std::vector<std::shared_ptr<IMetaAnim>>& nodes, CAnimSysContext animCtx)
: x0_animCtx(animCtx) { : x0_animCtx(std::move(animCtx)) {
x10_treeNodes.reserve(nodes.size()); x10_treeNodes.reserve(nodes.size());
for (const std::shared_ptr<IMetaAnim>& meta : nodes) for (const std::shared_ptr<IMetaAnim>& meta : nodes)
x10_treeNodes.push_back(meta->GetAnimationTree(animCtx, CMetaAnimTreeBuildOrders::NoSpecialOrders())); x10_treeNodes.push_back(meta->GetAnimationTree(x0_animCtx, CMetaAnimTreeBuildOrders::NoSpecialOrders()));
} }
CSequenceFundamentals CSequenceHelper::ComputeSequenceFundamentals() { CSequenceFundamentals CSequenceHelper::ComputeSequenceFundamentals() {

View File

@ -22,10 +22,9 @@ class CSequenceFundamentals {
std::vector<CSoundPOINode> x48_soundNodes; std::vector<CSoundPOINode> x48_soundNodes;
public: public:
CSequenceFundamentals(const CSteadyStateAnimInfo& ssInfo, const std::vector<CBoolPOINode>& boolNodes, CSequenceFundamentals(const CSteadyStateAnimInfo& ssInfo, std::vector<CBoolPOINode> boolNodes,
const std::vector<CInt32POINode>& int32Nodes, std::vector<CInt32POINode> int32Nodes, std::vector<CParticlePOINode> particleNodes,
const std::vector<CParticlePOINode>& particleNodes, std::vector<CSoundPOINode> soundNodes);
const std::vector<CSoundPOINode>& soundNodes);
const CSteadyStateAnimInfo& GetSteadyStateAnimInfo() const { return x0_ssInfo; } const CSteadyStateAnimInfo& GetSteadyStateAnimInfo() const { return x0_ssInfo; }
const std::vector<CBoolPOINode>& GetBoolPointsOfInterest() const { return x18_boolNodes; } const std::vector<CBoolPOINode>& GetBoolPointsOfInterest() const { return x18_boolNodes; }
@ -41,8 +40,8 @@ class CSequenceHelper {
public: public:
CSequenceHelper(const std::shared_ptr<CAnimTreeNode>& a, const std::shared_ptr<CAnimTreeNode>& b, CSequenceHelper(const std::shared_ptr<CAnimTreeNode>& a, const std::shared_ptr<CAnimTreeNode>& b,
const CAnimSysContext& animCtx); CAnimSysContext animCtx);
CSequenceHelper(const std::vector<std::shared_ptr<IMetaAnim>>& nodes, const CAnimSysContext& animCtx); CSequenceHelper(const std::vector<std::shared_ptr<IMetaAnim>>& nodes, CAnimSysContext animCtx);
CSequenceFundamentals ComputeSequenceFundamentals(); CSequenceFundamentals ComputeSequenceFundamentals();
}; };

View File

@ -11,8 +11,8 @@ namespace urde {
CTransitionDatabaseGame::CTransitionDatabaseGame(const std::vector<CTransition>& transitions, CTransitionDatabaseGame::CTransitionDatabaseGame(const std::vector<CTransition>& transitions,
const std::vector<CHalfTransition>& halfTransitions, const std::vector<CHalfTransition>& halfTransitions,
const std::shared_ptr<IMetaTrans>& defaultTrans) std::shared_ptr<IMetaTrans> defaultTrans)
: x10_defaultTrans(defaultTrans) { : x10_defaultTrans(std::move(defaultTrans)) {
x14_transitions.reserve(transitions.size()); x14_transitions.reserve(transitions.size());
for (const CTransition& trans : transitions) for (const CTransition& trans : transitions)
x14_transitions.emplace_back(trans.GetAnimPair(), trans.GetMetaTrans()); x14_transitions.emplace_back(trans.GetAnimPair(), trans.GetMetaTrans());

View File

@ -18,7 +18,7 @@ class CTransitionDatabaseGame final : public CTransitionDatabase {
public: public:
CTransitionDatabaseGame(const std::vector<CTransition>& transitions, CTransitionDatabaseGame(const std::vector<CTransition>& transitions,
const std::vector<CHalfTransition>& halfTransitions, const std::vector<CHalfTransition>& halfTransitions,
const std::shared_ptr<IMetaTrans>& defaultTrans); std::shared_ptr<IMetaTrans> defaultTrans);
const std::shared_ptr<IMetaTrans>& GetMetaTrans(u32, u32) const override; const std::shared_ptr<IMetaTrans>& GetMetaTrans(u32, u32) const override;
}; };

View File

@ -15,7 +15,7 @@ class CTransitionManager {
CAnimSysContext x0_animCtx; CAnimSysContext x0_animCtx;
public: public:
CTransitionManager(const CAnimSysContext& sysCtx) : x0_animCtx(sysCtx) {} explicit CTransitionManager(CAnimSysContext sysCtx) : x0_animCtx(std::move(sysCtx)) {}
std::shared_ptr<CAnimTreeNode> GetTransitionTree(const std::shared_ptr<CAnimTreeNode>& a, std::shared_ptr<CAnimTreeNode> GetTransitionTree(const std::shared_ptr<CAnimTreeNode>& a,
const std::shared_ptr<CAnimTreeNode>& b) const; const std::shared_ptr<CAnimTreeNode>& b) const;
}; };