From 571f9d1b4c0712ea14d3b9fa95a1dfa62d89d6cd Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Mon, 26 Oct 2015 14:32:12 -1000 Subject: [PATCH] Added EVNT naming --- DataSpec/DNACommon/ANCS.hpp | 1 + DataSpec/DNAMP1/ANCS.hpp | 13 ++++++++++++- DataSpec/DNAMP1/DNAMP1.cpp | 5 +++++ DataSpec/DNAMP3/CHAR.hpp | 2 +- 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/DataSpec/DNACommon/ANCS.hpp b/DataSpec/DNACommon/ANCS.hpp index 9d5f6f4f5..b50beb59a 100644 --- a/DataSpec/DNACommon/ANCS.hpp +++ b/DataSpec/DNACommon/ANCS.hpp @@ -28,6 +28,7 @@ struct AnimationResInfo { std::string name; IDTYPE animId; + IDTYPE evntId; bool additive; }; diff --git a/DataSpec/DNAMP1/ANCS.hpp b/DataSpec/DNAMP1/ANCS.hpp index aa00e4e09..654029a12 100644 --- a/DataSpec/DNAMP1/ANCS.hpp +++ b/DataSpec/DNAMP1/ANCS.hpp @@ -190,7 +190,7 @@ struct ANCS : BigYAML void gatherPrimitives(std::map>& out) { - out[animIdx] = {animName, animId, false}; + out[animIdx] = {animName, animId, UniqueID32(), false}; } }; struct MetaAnimBlend : IMetaAnim @@ -375,6 +375,17 @@ struct ANCS : BigYAML out.clear(); for (const AnimationSet::Animation& ai : animationSet.animations) ai.metaAnim.m_anim->gatherPrimitives(out); + for (auto& anim : out) + { + for (const AnimationSet::AnimationResources& res : animationSet.animResources) + { + if (res.animId == anim.second.animId) + { + anim.second.evntId = res.evntId; + break; + } + } + } } static bool Extract(const SpecBase& dataSpec, diff --git a/DataSpec/DNAMP1/DNAMP1.cpp b/DataSpec/DNAMP1/DNAMP1.cpp index d0718543c..716a5be30 100644 --- a/DataSpec/DNAMP1/DNAMP1.cpp +++ b/DataSpec/DNAMP1/DNAMP1.cpp @@ -239,6 +239,11 @@ void PAKBridge::addCMDLRigPairs(PAKRouter& pakRouter, { PAK::Entry* animEnt = (PAK::Entry*)m_pak.lookupEntry(ae.second.animId); animEnt->name = HECL::Format("ANCS_%08X_%s", entry.first.toUint32(), ae.second.name.c_str()); + if (ae.second.evntId) + { + PAK::Entry* evntEnt = (PAK::Entry*)m_pak.lookupEntry(ae.second.evntId); + evntEnt->name = HECL::Format("ANCS_%08X_%s_evnt", entry.first.toUint32(), ae.second.name.c_str()); + } } } else if (entry.second->type == FOURCC('MREA')) diff --git a/DataSpec/DNAMP3/CHAR.hpp b/DataSpec/DNAMP3/CHAR.hpp index 46c387e2a..9ae92d889 100644 --- a/DataSpec/DNAMP3/CHAR.hpp +++ b/DataSpec/DNAMP3/CHAR.hpp @@ -162,7 +162,7 @@ struct CHAR : BigYAML void gatherPrimitives(std::map>& out) { - out[animIdx] = {animName, animId, false}; + out[animIdx] = {animName, animId, UniqueID64(), false}; } }; struct MetaAnimBlend : IMetaAnim