Added EVNT naming

This commit is contained in:
Jack Andersen 2015-10-26 14:32:12 -10:00
parent d46f44cefa
commit 571f9d1b4c
4 changed files with 19 additions and 2 deletions

View File

@ -28,6 +28,7 @@ struct AnimationResInfo
{ {
std::string name; std::string name;
IDTYPE animId; IDTYPE animId;
IDTYPE evntId;
bool additive; bool additive;
}; };

View File

@ -190,7 +190,7 @@ struct ANCS : BigYAML
void gatherPrimitives(std::map<atUint32, DNAANCS::AnimationResInfo<UniqueID32>>& out) void gatherPrimitives(std::map<atUint32, DNAANCS::AnimationResInfo<UniqueID32>>& out)
{ {
out[animIdx] = {animName, animId, false}; out[animIdx] = {animName, animId, UniqueID32(), false};
} }
}; };
struct MetaAnimBlend : IMetaAnim struct MetaAnimBlend : IMetaAnim
@ -375,6 +375,17 @@ struct ANCS : BigYAML
out.clear(); out.clear();
for (const AnimationSet::Animation& ai : animationSet.animations) for (const AnimationSet::Animation& ai : animationSet.animations)
ai.metaAnim.m_anim->gatherPrimitives(out); 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, static bool Extract(const SpecBase& dataSpec,

View File

@ -239,6 +239,11 @@ void PAKBridge::addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
{ {
PAK::Entry* animEnt = (PAK::Entry*)m_pak.lookupEntry(ae.second.animId); 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()); 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')) else if (entry.second->type == FOURCC('MREA'))

View File

@ -162,7 +162,7 @@ struct CHAR : BigYAML
void gatherPrimitives(std::map<atUint32, DNAANCS::AnimationResInfo<UniqueID64>>& out) void gatherPrimitives(std::map<atUint32, DNAANCS::AnimationResInfo<UniqueID64>>& out)
{ {
out[animIdx] = {animName, animId, false}; out[animIdx] = {animName, animId, UniqueID64(), false};
} }
}; };
struct MetaAnimBlend : IMetaAnim struct MetaAnimBlend : IMetaAnim