diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index 2d5621676..7743f54aa 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -14,8 +14,6 @@
-
-
diff --git a/DataSpec/DNACommon/ANCS.cpp b/DataSpec/DNACommon/ANCS.cpp
index f217f2ccf..634e630be 100644
--- a/DataSpec/DNACommon/ANCS.cpp
+++ b/DataSpec/DNACommon/ANCS.cpp
@@ -26,7 +26,8 @@ bool ReadANCSToBlender(hecl::blender::Connection& conn,
for (const auto& info : chResInfo)
{
const nod::Node* node;
- const typename PAKRouter::EntryType* cmdlE = pakRouter.lookupEntry(info.cmdl, &node, true, true);
+ const typename PAKRouter::EntryType* cmdlE =
+ pakRouter.lookupEntry(info.cmdl, &node, true, false);
if (cmdlE)
{
hecl::ProjectPath cmdlPath = pakRouter.getWorking(cmdlE);
@@ -55,6 +56,44 @@ bool ReadANCSToBlender(hecl::blender::Connection& conn,
}
}
+ /* Extract attachment CMDL/CSKRs first */
+ auto attRange = pakRouter.lookupCharacterAttachmentRigs(entry.id);
+ for (auto it = attRange.first; it != attRange.second; ++it)
+ {
+ auto cmdlid = it->second.first.second;
+
+ const nod::Node* node;
+ const typename PAKRouter::EntryType* cmdlE =
+ pakRouter.lookupEntry(cmdlid, &node, true, false);
+ if (cmdlE)
+ {
+ hecl::ProjectPath cmdlPath = pakRouter.getWorking(cmdlE);
+ if (force || cmdlPath.isNone())
+ {
+ if (!conn.createBlend(cmdlPath, hecl::blender::BlendType::Mesh))
+ return false;
+
+ std::string bestName = pakRouter.getBestEntryName(*cmdlE);
+ hecl::SystemStringConv bestNameView(bestName);
+ fileChanged(bestNameView.c_str());
+
+ const auto* rp = pakRouter.lookupCMDLRigPair(cmdlid);
+ typename ANCSDNA::CSKRType cskr;
+ pakRouter.lookupAndReadDNA(rp->first, cskr);
+ typename ANCSDNA::CINFType cinf;
+ pakRouter.lookupAndReadDNA(rp->second, cinf);
+ using RigPair = std::pair;
+ RigPair rigPair(&cskr, &cinf);
+
+ PAKEntryReadStream rs = cmdlE->beginReadStream(*node);
+ DNACMDL::ReadCMDLToBlender
+ (conn, rs, pakRouter, *cmdlE, dataspec, rigPair);
+
+ conn.saveBlend();
+ }
+ }
+ }
+
std::string bestName = pakRouter.getBestEntryName(entry);
hecl::SystemStringConv bestNameView(bestName);
fileChanged(bestNameView.c_str());
@@ -69,20 +108,21 @@ bool ReadANCSToBlender(hecl::blender::Connection& conn,
hecl::blender::PyOutStream os = conn.beginPythonOut(true);
os.format("import bpy\n"
- "from mathutils import Vector\n"
- "bpy.context.scene.name = '%s'\n"
- "bpy.context.scene.hecl_mesh_obj = bpy.context.scene.name\n"
- "\n"
- "# Using 'Blender Game'\n"
- "bpy.context.scene.render.engine = 'BLENDER_GAME'\n"
- "\n"
- "# Clear Scene\n"
- "for ob in bpy.data.objects:\n"
- " if ob.type != 'LAMP' and ob.type != 'CAMERA':\n"
- " bpy.context.scene.objects.unlink(ob)\n"
- " bpy.data.objects.remove(ob)\n"
- "\n"
- "actor_data = bpy.context.scene.hecl_sact_data\n",
+ "from mathutils import Vector\n"
+ "bpy.context.scene.name = '%s'\n"
+ "bpy.context.scene.hecl_mesh_obj = bpy.context.scene.name\n"
+ "\n"
+ "# Using 'Blender Game'\n"
+ "bpy.context.scene.render.engine = 'BLENDER_GAME'\n"
+ "\n"
+ "# Clear Scene\n"
+ "for ob in bpy.data.objects:\n"
+ " if ob.type != 'LAMP' and ob.type != 'CAMERA':\n"
+ " bpy.context.scene.objects.unlink(ob)\n"
+ " bpy.data.objects.remove(ob)\n"
+ "\n"
+ "actor_data = bpy.context.scene.hecl_sact_data\n"
+ "arm_obj = None\n",
pakRouter.getBestEntryName(entry).c_str());
std::unordered_set cinfsDone;
@@ -90,7 +130,7 @@ bool ReadANCSToBlender(hecl::blender::Connection& conn,
{
/* Provide data to add-on */
os.format("actor_subtype = actor_data.subtypes.add()\n"
- "actor_subtype.name = '%s'\n\n",
+ "actor_subtype.name = '%s'\n\n",
info.name.c_str());
/* Build CINF if needed */
@@ -111,7 +151,8 @@ bool ReadANCSToBlender(hecl::blender::Connection& conn,
os << "actor_subtype.linked_armature = arm_obj.name\n";
/* Link CMDL */
- const typename PAKRouter::EntryType* cmdlE = pakRouter.lookupEntry(info.cmdl, nullptr, true, true);
+ const typename PAKRouter::EntryType* cmdlE =
+ pakRouter.lookupEntry(info.cmdl, nullptr, true, false);
if (cmdlE)
{
hecl::ProjectPath cmdlPath = pakRouter.getWorking(cmdlE);
@@ -130,10 +171,11 @@ bool ReadANCSToBlender(hecl::blender::Connection& conn,
for (const auto& overlay : info.overlays)
{
os << "overlay = actor_subtype.overlays.add()\n";
- os.format("overlay.name = '%s'\n", overlay.first.toString().c_str());
+ os.format("overlay.name = '%s'\n", overlay.first.c_str());
/* Link CMDL */
- const typename PAKRouter::EntryType* cmdlE = pakRouter.lookupEntry(overlay.second.first, nullptr, true, true);
+ const typename PAKRouter::EntryType* cmdlE =
+ pakRouter.lookupEntry(overlay.second.first, nullptr, true, false);
if (cmdlE)
{
hecl::ProjectPath cmdlPath = pakRouter.getWorking(cmdlE);
@@ -149,6 +191,53 @@ bool ReadANCSToBlender(hecl::blender::Connection& conn,
}
}
}
+
+ /* Link attachments */
+ for (auto it = attRange.first; it != attRange.second; ++it)
+ {
+ os << "attachment = actor_data.attachments.add()\n";
+ os.format("attachment.name = '%s'\n", it->second.second.c_str());
+
+ auto cinfid = it->second.first.first;
+ auto cmdlid = it->second.first.second;
+
+ if (cinfid)
+ {
+ /* Build CINF if needed */
+ if (cinfsDone.find(cinfid) == cinfsDone.end())
+ {
+ typename ANCSDNA::CINFType cinf;
+ pakRouter.lookupAndReadDNA(cinfid, cinf);
+ cinf.sendCINFToBlender(os, cinfid);
+ if (cinfsDone.empty())
+ {
+ firstName = ANCSDNA::CINFType::GetCINFArmatureName(cinfid);
+ firstCinf = cinf;
+ }
+ cinfsDone.insert(cinfid);
+ }
+ else
+ os.format("arm_obj = bpy.data.objects['CINF_%s']\n", cinfid.toString().c_str());
+ os << "attachment.linked_armature = arm_obj.name\n";
+ }
+
+ /* Link CMDL */
+ const typename PAKRouter::EntryType* cmdlE =
+ pakRouter.lookupEntry(cmdlid, nullptr, true, false);
+ if (cmdlE)
+ {
+ hecl::ProjectPath cmdlPath = pakRouter.getWorking(cmdlE);
+ os.linkBlend(cmdlPath.getAbsolutePathUTF8().data(),
+ pakRouter.getBestEntryName(*cmdlE).data(), true);
+
+ /* Attach CMDL to CINF */
+ os << "if obj.name not in bpy.context.scene.objects:\n"
+ " bpy.context.scene.objects.link(obj)\n"
+ "obj.parent = arm_obj\n"
+ "obj.parent_type = 'ARMATURE'\n"
+ "attachment.linked_mesh = obj.name\n\n";
+ }
+ }
}
{
@@ -160,7 +249,7 @@ bool ReadANCSToBlender(hecl::blender::Connection& conn,
hecl::blender::PyOutStream os = conn.beginPythonOut(true);
os << "import bpy\n"
- "actor_data = bpy.context.scene.hecl_sact_data\n";
+ "actor_data = bpy.context.scene.hecl_sact_data\n";
/* Get animation primitives */
std::map> animResInfo;
diff --git a/DataSpec/DNACommon/ANCS.hpp b/DataSpec/DNACommon/ANCS.hpp
index 380f175a5..52ec8bbfa 100644
--- a/DataSpec/DNACommon/ANCS.hpp
+++ b/DataSpec/DNACommon/ANCS.hpp
@@ -19,7 +19,7 @@ struct CharacterResInfo
IDTYPE cmdl;
IDTYPE cskr;
IDTYPE cinf;
- std::vector>> overlays;
+ std::vector>> overlays;
};
template
diff --git a/DataSpec/DNACommon/DNACommon.hpp b/DataSpec/DNACommon/DNACommon.hpp
index 805d8880b..d1ef07004 100644
--- a/DataSpec/DNACommon/DNACommon.hpp
+++ b/DataSpec/DNACommon/DNACommon.hpp
@@ -427,6 +427,31 @@ public:
/** Resource cooker function */
typedef std::function ResCooker;
+/** Mappings of resources involved in extracting characters */
+template
+struct CharacterAssociations
+{
+ using RigPair = std::pair;
+ /* CMDL -> (CSKR, CINF) */
+ std::unordered_map m_cmdlRigs;
+ /* (CSKR, CINF) -> ANCS */
+ std::unordered_map> m_cskrCinfToCharacter;
+ /* ANCS -> (CINF, CMDL) */
+ std::unordered_multimap> m_characterToAttachmentRigs;
+ using MultimapIteratorPair = std::pair<
+ typename std::unordered_multimap>::const_iterator,
+ typename std::unordered_multimap>::const_iterator>;
+ void addAttachmentRig(IDType character, IDType cinf, IDType cmdl, const char* name)
+ {
+ auto range = m_characterToAttachmentRigs.equal_range(character);
+ for (auto it = range.first; it != range.second; ++it)
+ if (it->second.second == name)
+ return;
+ m_characterToAttachmentRigs.insert(
+ std::make_pair(character, std::make_pair(std::make_pair(cinf, cmdl), name)));
+ }
+};
+
}
/* Hash template-specializations for UniqueID types */
diff --git a/DataSpec/DNACommon/PAK.cpp b/DataSpec/DNACommon/PAK.cpp
index d5ab71a05..0779a5269 100644
--- a/DataSpec/DNACommon/PAK.cpp
+++ b/DataSpec/DNACommon/PAK.cpp
@@ -143,7 +143,7 @@ void PAKRouter::build(std::vector& bridges, std::functio
m_uniqueEntries.clear();
m_sharedEntries.clear();
- m_cmdlRigs.clear();
+ m_charAssoc.m_cmdlRigs.clear();
size_t count = 0;
float bridgesSz = bridges.size();
@@ -186,7 +186,7 @@ void PAKRouter::build(std::vector& bridges, std::functio
}
/* Add RigPairs to global map */
- bridge.addCMDLRigPairs(*this, m_cmdlRigs, m_cskrCinfToCharacter);
+ bridge.addCMDLRigPairs(*this, m_charAssoc);
progress(++count / bridgesSz);
++bridgeIdx;
@@ -257,8 +257,8 @@ void PAKRouter::enterPAKBridge(const BRIDGETYPE& pakBridge)
template
hecl::ProjectPath PAKRouter::getCharacterWorking(const EntryType* entry) const
{
- auto characterSearch = m_cskrCinfToCharacter.find(entry->id);
- if (characterSearch != m_cskrCinfToCharacter.cend())
+ auto characterSearch = m_charAssoc.m_cskrCinfToCharacter.find(entry->id);
+ if (characterSearch != m_charAssoc.m_cskrCinfToCharacter.cend())
{
hecl::ProjectPath characterPath = getWorking(characterSearch->second.first);
if (entry->type == FOURCC('EVNT'))
@@ -301,10 +301,7 @@ hecl::ProjectPath PAKRouter::getWorking(const EntryType* entry,
else if (extractor.fileExts[0])
entName += _S(".*");
else if (hecl::ProjectPath chWork = getCharacterWorking(entry))
- {
- entName = chWork.getLastComponent();
- auxInfo = chWork.getAuxInfo();
- }
+ return chWork;
return hecl::ProjectPath(pakPath, entName).ensureAuxInfo(auxInfo);
}
}
@@ -325,10 +322,7 @@ hecl::ProjectPath PAKRouter::getWorking(const EntryType* entry,
else if (extractor.fileExts[0])
entName += _S(".*");
else if (hecl::ProjectPath chWork = getCharacterWorking(entry))
- {
- entName = chWork.getLastComponent();
- auxInfo = chWork.getAuxInfo();
- }
+ return chWork;
if (bridge.getPAK().m_noShare)
{
return hecl::ProjectPath(pakPath, entName).ensureAuxInfo(auxInfo);
@@ -355,10 +349,7 @@ hecl::ProjectPath PAKRouter::getWorking(const EntryType* entry,
else if (extractor.fileExts[0])
entName += _S(".*");
else if (hecl::ProjectPath chWork = getCharacterWorking(entry))
- {
- entName = chWork.getLastComponent();
- auxInfo = chWork.getAuxInfo();
- }
+ return chWork;
hecl::ProjectPath sharedPath(m_sharedWorking, entName);
return sharedPath.ensureAuxInfo(auxInfo);
}
@@ -642,14 +633,22 @@ const typename BRIDGETYPE::PAKType::Entry* PAKRouter::lookupEntry(co
}
template
-const typename PAKRouter::RigPair* PAKRouter::lookupCMDLRigPair(const IDType& id) const
+const typename CharacterAssociations::IDType>::RigPair*
+PAKRouter::lookupCMDLRigPair(const IDType& id) const
{
- auto search = m_cmdlRigs.find(id);
- if (search == m_cmdlRigs.end())
+ auto search = m_charAssoc.m_cmdlRigs.find(id);
+ if (search == m_charAssoc.m_cmdlRigs.end())
return nullptr;
return &search->second;
}
+template
+const typename CharacterAssociations::IDType>::MultimapIteratorPair
+PAKRouter::lookupCharacterAttachmentRigs(const IDType& id) const
+{
+ return m_charAssoc.m_characterToAttachmentRigs.equal_range(id);
+}
+
template
const zeus::CMatrix4f* PAKRouter::lookupMAPATransform(const IDType& id) const
{
diff --git a/DataSpec/DNACommon/PAK.hpp b/DataSpec/DNACommon/PAK.hpp
index 46a6eb5d9..191674f1e 100644
--- a/DataSpec/DNACommon/PAK.hpp
+++ b/DataSpec/DNACommon/PAK.hpp
@@ -154,7 +154,6 @@ public:
using PAKType = typename BRIDGETYPE::PAKType;
using IDType = typename PAKType::IDType;
using EntryType = typename PAKType::Entry;
- using RigPair = std::pair;
private:
const std::vector* m_bridges = nullptr;
@@ -169,8 +168,7 @@ private:
std::unordered_map> m_uniqueEntries;
std::unordered_map> m_sharedEntries;
std::unordered_map m_overrideEntries;
- std::unordered_map m_cmdlRigs;
- std::unordered_map> m_cskrCinfToCharacter;
+ CharacterAssociations m_charAssoc;
std::unordered_map m_mapaTransforms;
hecl::ProjectPath getCharacterWorking(const EntryType* entry) const;
@@ -223,7 +221,8 @@ public:
return true;
}
- const RigPair* lookupCMDLRigPair(const IDType& id) const;
+ const typename CharacterAssociations::RigPair* lookupCMDLRigPair(const IDType& id) const;
+ const typename CharacterAssociations::MultimapIteratorPair lookupCharacterAttachmentRigs(const IDType& id) const;
const zeus::CMatrix4f* lookupMAPATransform(const IDType& mapaId) const;
hecl::ProjectPath getAreaLayerWorking(const IDType& areaId, int layerIdx) const;
diff --git a/DataSpec/DNAMP1/ANCS.cpp b/DataSpec/DNAMP1/ANCS.cpp
index 1ff56337b..0b8eea91f 100644
--- a/DataSpec/DNAMP1/ANCS.cpp
+++ b/DataSpec/DNAMP1/ANCS.cpp
@@ -399,8 +399,8 @@ void ANCS::CharacterSet::CharacterInfo::Enumerate(athena::io::IStr
if (sectionCount > 3)
{
- cmdlOverlay.read(reader);
- cskrOverlay.read(reader);
+ cmdlIce.read(reader);
+ cskrIce.read(reader);
}
animIdxs.clear();
@@ -421,7 +421,7 @@ void ANCS::CharacterSet::CharacterInfo::Enumerate(athena::io::ISt
sectionCount = 6;
else if (animIdxs.size())
sectionCount = 5;
- else if (cmdlOverlay)
+ else if (cmdlIce)
sectionCount = 4;
else if (effects.size())
sectionCount = 3;
@@ -472,8 +472,8 @@ void ANCS::CharacterSet::CharacterInfo::Enumerate(athena::io::ISt
if (sectionCount > 3)
{
- cmdlOverlay.write(writer);
- cskrOverlay.write(writer);
+ cmdlIce.write(writer);
+ cskrIce.write(writer);
}
if (sectionCount > 4)
@@ -494,7 +494,7 @@ void ANCS::CharacterSet::CharacterInfo::Enumerate(size_t& __
sectionCount = 6;
else if (animIdxs.size())
sectionCount = 5;
- else if (cmdlOverlay)
+ else if (cmdlIce)
sectionCount = 4;
else if (effects.size())
sectionCount = 3;
@@ -594,7 +594,7 @@ void ANCS::CharacterSet::CharacterInfo::Enumerate(athena::io::
if (sectionCount > 3)
{
- reader.enumerate("cmdlOverride", cmdlOverlay);
+ reader.enumerate("cmdlIce", cmdlIce);
}
animIdxs.clear();
@@ -614,7 +614,7 @@ void ANCS::CharacterSet::CharacterInfo::Enumerate(athena::io:
sectionCount = 6;
else if (animIdxs.size())
sectionCount = 5;
- else if (cmdlOverlay)
+ else if (cmdlIce)
sectionCount = 4;
else if (effects.size())
sectionCount = 3;
@@ -656,7 +656,7 @@ void ANCS::CharacterSet::CharacterInfo::Enumerate(athena::io:
if (sectionCount > 3)
{
- writer.enumerate("cmdlOverride", cmdlOverlay);
+ writer.enumerate("cmdlIce", cmdlIce);
}
if (sectionCount > 4)
@@ -1179,8 +1179,8 @@ bool ANCS::Cook(const hecl::ProjectPath& outPath,
ch.cmdl = UniqueID32{};
ch.cskr = UniqueID32{};
ch.cinf = UniqueID32{};
- ch.cmdlOverlay = UniqueID32Zero{};
- ch.cskrOverlay = UniqueID32Zero{};
+ ch.cmdlIce = UniqueID32Zero{};
+ ch.cskrIce = UniqueID32Zero{};
hecl::SystemStringConv chSysName(ch.name);
ch.cskr = inPath.ensureAuxInfo(hecl::SystemString(chSysName.sys_str()) + _S(".CSKR"));
@@ -1209,12 +1209,14 @@ bool ANCS::Cook(const hecl::ProjectPath& outPath,
hecl::SystemStringConv armSysName(arm.name);
ch.cinf = inPath.ensureAuxInfo(hecl::SystemString(armSysName.sys_str()) + _S(".CINF"));
ch.cmdl = sub.mesh;
- if (sub.overlayMeshes.size())
+ auto search = std::find_if(sub.overlayMeshes.cbegin(), sub.overlayMeshes.cend(),
+ [](const auto& p) { return p.first == "ICE"; });
+ if (search != sub.overlayMeshes.cend())
{
- hecl::SystemStringConv overlaySys(sub.overlayMeshes[0].first);
- ch.cmdlOverlay = sub.overlayMeshes[0].second;
- ch.cskrOverlay = inPath.ensureAuxInfo(hecl::SystemString(chSysName.sys_str()) + _S('.') +
- overlaySys.c_str() + _S(".CSKR"));
+ hecl::SystemStringConv overlaySys(search->first);
+ ch.cmdlIce = search->second;
+ ch.cskrIce = inPath.ensureAuxInfo(hecl::SystemString(chSysName.sys_str()) + _S('.') +
+ overlaySys.c_str() + _S(".CSKR"));
}
}
@@ -1314,19 +1316,37 @@ bool ANCS::CookCSKR(const hecl::ProjectPath& outPath,
}
const DNAANCS::Actor::Subtype* subtype = nullptr;
- for (const DNAANCS::Actor::Subtype& sub : actor.subtypes)
+ if (subName != "ATTACH")
{
- if (!sub.name.compare(subNameView.str()))
+ for (const DNAANCS::Actor::Subtype& sub : actor.subtypes)
{
- subtype = ⊂
- break;
+ if (!sub.name.compare(subNameView.str()))
+ {
+ subtype = ⊂
+ break;
+ }
}
+ if (!subtype)
+ Log.report(logvisor::Fatal, _S("unable to find subtype '%s'"), subName.c_str());
}
- if (!subtype)
- Log.report(logvisor::Fatal, _S("unable to find subtype '%s'"), subName.c_str());
const hecl::ProjectPath* modelPath = nullptr;
- if (overName.empty())
+ if (subName == "ATTACH")
+ {
+ const DNAANCS::Actor::Attachment* attachment = nullptr;
+ for (const DNAANCS::Actor::Attachment& att : actor.attachments)
+ {
+ if (!att.name.compare(overNameView.str()))
+ {
+ attachment = &att;
+ break;
+ }
+ }
+ if (!attachment)
+ Log.report(logvisor::Fatal, _S("unable to find attachment '%s'"), overName.c_str());
+ modelPath = &attachment->mesh;
+ }
+ else if (overName.empty())
{
modelPath = &subtype->mesh;
}
@@ -1434,19 +1454,37 @@ bool ANCS::CookCSKRPC(const hecl::ProjectPath& outPath,
}
const DNAANCS::Actor::Subtype* subtype = nullptr;
- for (const DNAANCS::Actor::Subtype& sub : actor.subtypes)
+ if (subName != "ATTACH")
{
- if (!sub.name.compare(subNameView.str()))
+ for (const DNAANCS::Actor::Subtype& sub : actor.subtypes)
{
- subtype = ⊂
- break;
+ if (!sub.name.compare(subNameView.str()))
+ {
+ subtype = ⊂
+ break;
+ }
}
+ if (!subtype)
+ Log.report(logvisor::Fatal, _S("unable to find subtype '%s'"), subName.c_str());
}
- if (!subtype)
- Log.report(logvisor::Fatal, _S("unable to find subtype '%s'"), subName.c_str());
const hecl::ProjectPath* modelPath = nullptr;
- if (overName.empty())
+ if (subName == "ATTACH")
+ {
+ const DNAANCS::Actor::Attachment* attachment = nullptr;
+ for (const DNAANCS::Actor::Attachment& att : actor.attachments)
+ {
+ if (!att.name.compare(overNameView.str()))
+ {
+ attachment = &att;
+ break;
+ }
+ }
+ if (!attachment)
+ Log.report(logvisor::Fatal, _S("unable to find attachment '%s'"), overName.c_str());
+ modelPath = &attachment->mesh;
+ }
+ else if (overName.empty())
{
modelPath = &subtype->mesh;
}
diff --git a/DataSpec/DNAMP1/ANCS.hpp b/DataSpec/DNAMP1/ANCS.hpp
index 7f14de6cf..a838ced63 100644
--- a/DataSpec/DNAMP1/ANCS.hpp
+++ b/DataSpec/DNAMP1/ANCS.hpp
@@ -139,8 +139,8 @@ struct ANCS : BigDNA
};
std::vector effects;
- UniqueID32Zero cmdlOverlay;
- UniqueID32Zero cskrOverlay;
+ UniqueID32Zero cmdlIce;
+ UniqueID32Zero cskrIce;
std::vector animIdxs;
};
@@ -431,8 +431,8 @@ struct ANCS : BigDNA
chOut.cskr = ci.cskr;
chOut.cinf = ci.cinf;
- if (ci.cmdlOverlay)
- chOut.overlays.emplace_back(FOURCC('OVER'), std::make_pair(ci.cmdlOverlay, ci.cskrOverlay));
+ if (ci.cmdlIce)
+ chOut.overlays.emplace_back("ICE", std::make_pair(ci.cmdlIce, ci.cskrIce));
}
}
diff --git a/DataSpec/DNAMP1/CMDL.cpp b/DataSpec/DNAMP1/CMDL.cpp
index b7bc4ba11..78fb03543 100644
--- a/DataSpec/DNAMP1/CMDL.cpp
+++ b/DataSpec/DNAMP1/CMDL.cpp
@@ -14,7 +14,7 @@ bool CMDL::Extract(const SpecBase& dataSpec,
std::function fileChanged)
{
/* Check for RigPair */
- const PAKRouter::RigPair* rp = pakRouter.lookupCMDLRigPair(entry.id);
+ const typename CharacterAssociations::RigPair* rp = pakRouter.lookupCMDLRigPair(entry.id);
CINF cinf;
CSKR cskr;
std::pair loadRp(nullptr, nullptr);
diff --git a/DataSpec/DNAMP1/DNAMP1.cpp b/DataSpec/DNAMP1/DNAMP1.cpp
index 88c0e406c..7a1cc0633 100644
--- a/DataSpec/DNAMP1/DNAMP1.cpp
+++ b/DataSpec/DNAMP1/DNAMP1.cpp
@@ -216,9 +216,7 @@ void PAKBridge::build()
}
}
-void PAKBridge::addCMDLRigPairs(PAKRouter& pakRouter,
- std::unordered_map>& addTo,
- std::unordered_map>& cskrCinfToAncs) const
+void PAKBridge::addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const
{
for (const std::pair& entry : m_pak.m_entries)
{
@@ -229,23 +227,26 @@ void PAKBridge::addCMDLRigPairs(PAKRouter& pakRouter,
ancs.read(rs);
for (const ANCS::CharacterSet::CharacterInfo& ci : ancs.characterSet.characters)
{
- addTo[ci.cmdl] = std::make_pair(ci.cskr, ci.cinf);
- cskrCinfToAncs[ci.cskr] = std::make_pair(entry.second.id, hecl::Format("%s.CSKR", ci.name.c_str()));
- cskrCinfToAncs[ci.cinf] = std::make_pair(entry.second.id, hecl::Format("CINF_%08X.CINF", ci.cinf.toUint32()));
+ charAssoc.m_cmdlRigs[ci.cmdl] = std::make_pair(ci.cskr, ci.cinf);
+ charAssoc.m_cskrCinfToCharacter[ci.cskr] =
+ std::make_pair(entry.second.id, hecl::Format("%s.CSKR", ci.name.c_str()));
+ charAssoc.m_cskrCinfToCharacter[ci.cinf] =
+ std::make_pair(entry.second.id, hecl::Format("CINF_%08X.CINF", ci.cinf.toUint32()));
PAK::Entry* cmdlEnt = (PAK::Entry*)m_pak.lookupEntry(ci.cmdl);
PAK::Entry* cskrEnt = (PAK::Entry*)m_pak.lookupEntry(ci.cskr);
PAK::Entry* cinfEnt = (PAK::Entry*)m_pak.lookupEntry(ci.cinf);
cmdlEnt->name = hecl::Format("ANCS_%08X_%s_model", entry.first.toUint32(), ci.name.c_str());
cskrEnt->name = hecl::Format("ANCS_%08X_%s_skin", entry.first.toUint32(), ci.name.c_str());
cinfEnt->name = hecl::Format("ANCS_%08X_%s_skel", entry.first.toUint32(), ci.name.c_str());
- if (ci.cmdlOverlay && ci.cskrOverlay)
+ if (ci.cmdlIce && ci.cskrIce)
{
- addTo[ci.cmdlOverlay] = std::make_pair(ci.cskrOverlay, ci.cinf);
- cskrCinfToAncs[ci.cskrOverlay] = std::make_pair(entry.second.id, hecl::Format("%s.OVER.CSKR", ci.name.c_str()));
- PAK::Entry* cmdlEnt = (PAK::Entry*)m_pak.lookupEntry(ci.cmdlOverlay);
- PAK::Entry* cskrEnt = (PAK::Entry*)m_pak.lookupEntry(ci.cskrOverlay);
- cmdlEnt->name = hecl::Format("ANCS_%08X_%s_overmodel", entry.first.toUint32(), ci.name.c_str());
- cskrEnt->name = hecl::Format("ANCS_%08X_%s_overskin", entry.first.toUint32(), ci.name.c_str());
+ charAssoc.m_cmdlRigs[ci.cmdlIce] = std::make_pair(ci.cskrIce, ci.cinf);
+ charAssoc.m_cskrCinfToCharacter[ci.cskrIce] =
+ std::make_pair(entry.second.id, hecl::Format("%s.ICE.CSKR", ci.name.c_str()));
+ PAK::Entry* cmdlEnt = (PAK::Entry*)m_pak.lookupEntry(ci.cmdlIce);
+ PAK::Entry* cskrEnt = (PAK::Entry*)m_pak.lookupEntry(ci.cskrIce);
+ cmdlEnt->name = hecl::Format("ANCS_%08X_%s_icemodel", entry.first.toUint32(), ci.name.c_str());
+ cskrEnt->name = hecl::Format("ANCS_%08X_%s_iceskin", entry.first.toUint32(), ci.name.c_str());
}
}
std::map> animInfo;
@@ -254,19 +255,21 @@ 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());
- cskrCinfToAncs[ae.second.animId] = std::make_pair(entry.second.id, hecl::Format("%s.ANIM", ae.second.name.c_str()));
+ charAssoc.m_cskrCinfToCharacter[ae.second.animId] =
+ std::make_pair(entry.second.id, hecl::Format("%s.ANIM", 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());
- cskrCinfToAncs[ae.second.evntId] = std::make_pair(entry.second.id, hecl::Format("%s.evnt.yaml", ae.second.name.c_str()));
+ charAssoc.m_cskrCinfToCharacter[ae.second.evntId] =
+ std::make_pair(entry.second.id, hecl::Format("%s.evnt.yaml", ae.second.name.c_str()));
}
}
}
else if (entry.second.type == FOURCC('MREA'))
{
PAKEntryReadStream rs = entry.second.beginReadStream(m_node);
- MREA::AddCMDLRigPairs(rs, pakRouter, addTo);
+ MREA::AddCMDLRigPairs(rs, pakRouter, charAssoc);
}
}
}
diff --git a/DataSpec/DNAMP1/DNAMP1.hpp b/DataSpec/DNAMP1/DNAMP1.hpp
index 3b8ea9707..be4207b7b 100644
--- a/DataSpec/DNAMP1/DNAMP1.hpp
+++ b/DataSpec/DNAMP1/DNAMP1.hpp
@@ -29,9 +29,7 @@ public:
const PAKType& getPAK() const {return m_pak;}
const nod::Node& getNode() const {return m_node;}
- void addCMDLRigPairs(PAKRouter& pakRouter,
- std::unordered_map>& addTo,
- std::unordered_map>& cskrCinfToAncs) const;
+ void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const;
void addPATHToMREA(PAKRouter& pakRouter,
std::unordered_map& pathToMrea) const;
diff --git a/DataSpec/DNAMP1/MREA.cpp b/DataSpec/DNAMP1/MREA.cpp
index 17e3e4bd8..2ed97883e 100644
--- a/DataSpec/DNAMP1/MREA.cpp
+++ b/DataSpec/DNAMP1/MREA.cpp
@@ -42,8 +42,7 @@ void MREA::ReadBabeDeadToBlender_1_2(hecl::blender::PyOutStream& os,
}
void MREA::AddCMDLRigPairs(PAKEntryReadStream& rs,
- PAKRouter& pakRouter,
- std::unordered_map>& addTo)
+ PAKRouter& pakRouter, CharacterAssociations& charAssoc)
{
/* Do extract */
Header head;
@@ -58,7 +57,7 @@ void MREA::AddCMDLRigPairs(PAKEntryReadStream& rs,
rs.seek(secStart, athena::Begin);
SCLY scly;
scly.read(rs);
- scly.addCMDLRigPairs(pakRouter, addTo);
+ scly.addCMDLRigPairs(pakRouter, charAssoc);
}
UniqueID32 MREA::GetPATHId(PAKEntryReadStream& rs)
diff --git a/DataSpec/DNAMP1/MREA.hpp b/DataSpec/DNAMP1/MREA.hpp
index c9b44a6ea..93584a227 100644
--- a/DataSpec/DNAMP1/MREA.hpp
+++ b/DataSpec/DNAMP1/MREA.hpp
@@ -102,8 +102,7 @@ struct MREA
athena::io::IStreamReader& rs);
static void AddCMDLRigPairs(PAKEntryReadStream& rs,
- PAKRouter& pakRouter,
- std::unordered_map>& addTo);
+ PAKRouter& pakRouter, CharacterAssociations& charAssoc);
static UniqueID32 GetPATHId(PAKEntryReadStream& rs);
diff --git a/DataSpec/DNAMP1/SCLY.cpp b/DataSpec/DNAMP1/SCLY.cpp
index 21f840dbc..e3102d112 100644
--- a/DataSpec/DNAMP1/SCLY.cpp
+++ b/DataSpec/DNAMP1/SCLY.cpp
@@ -63,18 +63,16 @@ void SCLY::exportToLayerDirectories(const PAK::Entry& entry, PAKRouter& pakRouter,
- std::unordered_map>& addTo) const
+void SCLY::addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const
{
for (const ScriptLayer& layer : layers)
- layer.addCMDLRigPairs(pakRouter, addTo);
+ layer.addCMDLRigPairs(pakRouter, charAssoc);
}
-void SCLY::ScriptLayer::addCMDLRigPairs(PAKRouter& pakRouter,
- std::unordered_map>& addTo) const
+void SCLY::ScriptLayer::addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const
{
for (const std::unique_ptr& obj : objects)
- obj->addCMDLRigPairs(pakRouter, addTo);
+ obj->addCMDLRigPairs(pakRouter, charAssoc);
}
void SCLY::nameIDs(PAKRouter& pakRouter) const
diff --git a/DataSpec/DNAMP1/SCLY.hpp b/DataSpec/DNAMP1/SCLY.hpp
index 6f59ce18d..713185975 100644
--- a/DataSpec/DNAMP1/SCLY.hpp
+++ b/DataSpec/DNAMP1/SCLY.hpp
@@ -21,15 +21,13 @@ struct SCLY : BigDNA
Value unknown;
Value objectCount;
Vector, AT_DNA_COUNT(objectCount)> objects;
- void addCMDLRigPairs(PAKRouter& pakRouter,
- std::unordered_map>& addTo) const;
+ void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const;
void nameIDs(PAKRouter& pakRouter) const;
};
Vector layers;
void exportToLayerDirectories(const PAK::Entry &, PAKRouter&, bool) const;
- void addCMDLRigPairs(PAKRouter& pakRouter,
- std::unordered_map>& addTo) const;
+ void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const;
void nameIDs(PAKRouter& pakRouter) const;
};
}
diff --git a/DataSpec/DNAMP1/ScriptObjects/Actor.hpp b/DataSpec/DNAMP1/ScriptObjects/Actor.hpp
index 0417bbcde..2ccdd7284 100644
--- a/DataSpec/DNAMP1/ScriptObjects/Actor.hpp
+++ b/DataSpec/DNAMP1/ScriptObjects/Actor.hpp
@@ -34,10 +34,9 @@ struct Actor : IScriptObject
Value scaleAdvancementDelta;
Value materialFlag54;
- void addCMDLRigPairs(PAKRouter& pakRouter,
- std::unordered_map>& addTo) const
+ void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const
{
- actorParameters.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
+ actorParameters.addCMDLRigPairs(pakRouter, charAssoc, animationParameters);
}
void nameIDs(PAKRouter& pakRouter) const
diff --git a/DataSpec/DNAMP1/ScriptObjects/ActorContraption.hpp b/DataSpec/DNAMP1/ScriptObjects/ActorContraption.hpp
index cdea46c76..bff8c616c 100644
--- a/DataSpec/DNAMP1/ScriptObjects/ActorContraption.hpp
+++ b/DataSpec/DNAMP1/ScriptObjects/ActorContraption.hpp
@@ -26,10 +26,9 @@ struct ActorContraption : IScriptObject
DamageInfo damageInfo;
Value active; // needs verification
- void addCMDLRigPairs(PAKRouter& pakRouter,
- std::unordered_map>& addTo) const
+ void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const
{
- actorParameters.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
+ actorParameters.addCMDLRigPairs(pakRouter, charAssoc, animationParameters);
}
void nameIDs(PAKRouter& pakRouter) const
diff --git a/DataSpec/DNAMP1/ScriptObjects/AmbientAI.hpp b/DataSpec/DNAMP1/ScriptObjects/AmbientAI.hpp
index d53293018..1e8b57119 100644
--- a/DataSpec/DNAMP1/ScriptObjects/AmbientAI.hpp
+++ b/DataSpec/DNAMP1/ScriptObjects/AmbientAI.hpp
@@ -27,10 +27,9 @@ struct AmbientAI : IScriptObject
Value impactAnim;
Value active;
- void addCMDLRigPairs(PAKRouter& pakRouter,
- std::unordered_map>& addTo) const
+ void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const
{
- actorParameters.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
+ actorParameters.addCMDLRigPairs(pakRouter, charAssoc, animationParameters);
}
void nameIDs(PAKRouter& pakRouter) const
diff --git a/DataSpec/DNAMP1/ScriptObjects/AtomicAlpha.hpp b/DataSpec/DNAMP1/ScriptObjects/AtomicAlpha.hpp
index 6e5389c4c..c7c57cb01 100644
--- a/DataSpec/DNAMP1/ScriptObjects/AtomicAlpha.hpp
+++ b/DataSpec/DNAMP1/ScriptObjects/AtomicAlpha.hpp
@@ -25,10 +25,9 @@ struct AtomicAlpha : IScriptObject
Value unknown4;
Value unknown5;
- void addCMDLRigPairs(PAKRouter& pakRouter,
- std::unordered_map>& addTo) const
+ void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const
{
- actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
+ actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
}
void nameIDs(PAKRouter& pakRouter) const
diff --git a/DataSpec/DNAMP1/ScriptObjects/AtomicBeta.hpp b/DataSpec/DNAMP1/ScriptObjects/AtomicBeta.hpp
index e06e85d1b..0ff7e317f 100644
--- a/DataSpec/DNAMP1/ScriptObjects/AtomicBeta.hpp
+++ b/DataSpec/DNAMP1/ScriptObjects/AtomicBeta.hpp
@@ -32,10 +32,9 @@ struct AtomicBeta : IScriptObject
Value unknown9;
Value unknown10;
- void addCMDLRigPairs(PAKRouter& pakRouter,
- std::unordered_map>& addTo) const
+ void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const
{
- actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
+ actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
}
void nameIDs(PAKRouter& pakRouter) const
diff --git a/DataSpec/DNAMP1/ScriptObjects/Babygoth.hpp b/DataSpec/DNAMP1/ScriptObjects/Babygoth.hpp
index 7b960459f..ab8e80952 100644
--- a/DataSpec/DNAMP1/ScriptObjects/Babygoth.hpp
+++ b/DataSpec/DNAMP1/ScriptObjects/Babygoth.hpp
@@ -26,8 +26,8 @@ struct Babygoth : IScriptObject
DamageInfo damageInfo3;
DamageVulnerability damageVulnerabilty1;
DamageVulnerability damageVulnerabilty2;
- UniqueID32 model;
- UniqueID32 skin;
+ UniqueID32 cmdlShelless;
+ UniqueID32 cskrShelless;
Value unknown3;
Value unknown4;
UniqueID32 particle2;
@@ -44,13 +44,19 @@ struct Babygoth : IScriptObject
Value unknown11;
UniqueID32 particle6;
- void addCMDLRigPairs(PAKRouter& pakRouter,
- std::unordered_map>& addTo) const
+ void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const
{
UniqueID32 cinf = patternedInfo.animationParameters.getCINF(pakRouter);
- actorParameters.addCMDLRigPairs(addTo, cinf);
- if (model && skin)
- addTo[model] = std::make_pair(skin, cinf);
+ actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
+
+ if (cmdlShelless && cskrShelless)
+ {
+ charAssoc.m_cmdlRigs[cmdlShelless] = std::make_pair(cskrShelless, cinf);
+ charAssoc.m_cskrCinfToCharacter[cskrShelless] = std::make_pair(
+ patternedInfo.animationParameters.animationCharacterSet, "ATTACH.SHELLESS.CSKR");
+ charAssoc.addAttachmentRig(patternedInfo.animationParameters.animationCharacterSet,
+ {}, cmdlShelless, "SHELLESS");
+ }
}
void nameIDs(PAKRouter& pakRouter) const
@@ -70,14 +76,14 @@ struct Babygoth : IScriptObject
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1);
ent->name = name + "_part1";
}
- if (model)
+ if (cmdlShelless)
{
- PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model);
+ PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(cmdlShelless);
ent->name = name + "_emodel";
}
- if (skin)
+ if (cskrShelless)
{
- PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(skin);
+ PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(cskrShelless);
ent->name = name + "_eskin";
}
if (particle2)
@@ -120,8 +126,8 @@ struct Babygoth : IScriptObject
g_curSpec->flattenDependencies(wpsc1, pathsOut);
g_curSpec->flattenDependencies(wpsc2, pathsOut);
g_curSpec->flattenDependencies(particle1, pathsOut);
- g_curSpec->flattenDependencies(model, pathsOut);
- g_curSpec->flattenDependencies(skin, pathsOut);
+ g_curSpec->flattenDependencies(cmdlShelless, pathsOut);
+ g_curSpec->flattenDependencies(cskrShelless, pathsOut);
g_curSpec->flattenDependencies(particle2, pathsOut);
g_curSpec->flattenDependencies(particle3, pathsOut);
g_curSpec->flattenDependencies(particle4, pathsOut);
diff --git a/DataSpec/DNAMP1/ScriptObjects/Beetle.hpp b/DataSpec/DNAMP1/ScriptObjects/Beetle.hpp
index a9673ee73..124e0d62f 100644
--- a/DataSpec/DNAMP1/ScriptObjects/Beetle.hpp
+++ b/DataSpec/DNAMP1/ScriptObjects/Beetle.hpp
@@ -27,10 +27,9 @@ struct Beetle : IScriptObject
Value unknown5;
Value unknown6;
- void addCMDLRigPairs(PAKRouter& pakRouter,
- std::unordered_map>& addTo) const
+ void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const
{
- actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
+ actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
}
void nameIDs(PAKRouter& pakRouter) const
diff --git a/DataSpec/DNAMP1/ScriptObjects/BloodFlower.hpp b/DataSpec/DNAMP1/ScriptObjects/BloodFlower.hpp
index a97c390f0..32fdf3e2d 100644
--- a/DataSpec/DNAMP1/ScriptObjects/BloodFlower.hpp
+++ b/DataSpec/DNAMP1/ScriptObjects/BloodFlower.hpp
@@ -29,10 +29,9 @@ struct BloodFlower : IScriptObject
UniqueID32 particle5;
Value unknown2;
- void addCMDLRigPairs(PAKRouter& pakRouter,
- std::unordered_map>& addTo) const
+ void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const
{
- actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
+ actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
}
void nameIDs(PAKRouter& pakRouter) const
diff --git a/DataSpec/DNAMP1/ScriptObjects/Burrower.hpp b/DataSpec/DNAMP1/ScriptObjects/Burrower.hpp
index c346509fe..098edfc20 100644
--- a/DataSpec/DNAMP1/ScriptObjects/Burrower.hpp
+++ b/DataSpec/DNAMP1/ScriptObjects/Burrower.hpp
@@ -24,10 +24,9 @@ struct Burrower : IScriptObject
Value unknown; // always FF
UniqueID32 particle4;
- void addCMDLRigPairs(PAKRouter& pakRouter,
- std::unordered_map>& addTo) const
+ void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const
{
- actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
+ actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
}
void nameIDs(PAKRouter& pakRouter) const
diff --git a/DataSpec/DNAMP1/ScriptObjects/ChozoGhost.hpp b/DataSpec/DNAMP1/ScriptObjects/ChozoGhost.hpp
index f8d774bd6..d0d9ba817 100644
--- a/DataSpec/DNAMP1/ScriptObjects/ChozoGhost.hpp
+++ b/DataSpec/DNAMP1/ScriptObjects/ChozoGhost.hpp
@@ -42,10 +42,9 @@ struct ChozoGhost : IScriptObject
Value unknown12;
Value unknown13;
- void addCMDLRigPairs(PAKRouter& pakRouter,
- std::unordered_map>& addTo) const
+ void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const
{
- actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
+ actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
}
void nameIDs(PAKRouter& pakRouter) const
diff --git a/DataSpec/DNAMP1/ScriptObjects/DoorArea.hpp b/DataSpec/DNAMP1/ScriptObjects/DoorArea.hpp
index 67881a3ba..5f14efd4c 100644
--- a/DataSpec/DNAMP1/ScriptObjects/DoorArea.hpp
+++ b/DataSpec/DNAMP1/ScriptObjects/DoorArea.hpp
@@ -25,10 +25,9 @@ struct DoorArea : IScriptObject
Value animationLength;
Value isMorphballDoor;
- void addCMDLRigPairs(PAKRouter& pakRouter,
- std::unordered_map>& addTo) const
+ void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const
{
- actorParameters.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
+ actorParameters.addCMDLRigPairs(pakRouter, charAssoc, animationParameters);
}
void nameIDs(PAKRouter& pakRouter) const
diff --git a/DataSpec/DNAMP1/ScriptObjects/Drone.hpp b/DataSpec/DNAMP1/ScriptObjects/Drone.hpp
index 8adf92b26..95cdaf09e 100644
--- a/DataSpec/DNAMP1/ScriptObjects/Drone.hpp
+++ b/DataSpec/DNAMP1/ScriptObjects/Drone.hpp
@@ -56,10 +56,9 @@ struct Drone : IScriptObject
Value sound; // verification needed
Value unknown30;
- void addCMDLRigPairs(PAKRouter& pakRouter,
- std::unordered_map>& addTo) const
+ void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const
{
- actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
+ actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
}
void nameIDs(PAKRouter& pakRouter) const
diff --git a/DataSpec/DNAMP1/ScriptObjects/ElitePirate.hpp b/DataSpec/DNAMP1/ScriptObjects/ElitePirate.hpp
index ae46ffe09..a1f380e60 100644
--- a/DataSpec/DNAMP1/ScriptObjects/ElitePirate.hpp
+++ b/DataSpec/DNAMP1/ScriptObjects/ElitePirate.hpp
@@ -53,11 +53,10 @@ struct ElitePirate : IScriptObject
Value unknown17;
Value unknown18;
- void addCMDLRigPairs(PAKRouter& pakRouter,
- std::unordered_map>& addTo) const
+ void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const
{
- actorParameters1.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
- actorParameters2.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
+ actorParameters1.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
+ actorParameters2.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
}
void nameIDs(PAKRouter& pakRouter) const
diff --git a/DataSpec/DNAMP1/ScriptObjects/EnergyBall.hpp b/DataSpec/DNAMP1/ScriptObjects/EnergyBall.hpp
index 4e68a8381..ccdab04b9 100644
--- a/DataSpec/DNAMP1/ScriptObjects/EnergyBall.hpp
+++ b/DataSpec/DNAMP1/ScriptObjects/EnergyBall.hpp
@@ -31,10 +31,9 @@ struct EnergyBall : IScriptObject
DamageInfo damageInfo2;
Value unknown6;
- void addCMDLRigPairs(PAKRouter& pakRouter,
- std::unordered_map>& addTo) const
+ void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const
{
- actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
+ actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
}
void nameIDs(PAKRouter& pakRouter) const
diff --git a/DataSpec/DNAMP1/ScriptObjects/Eyeball.hpp b/DataSpec/DNAMP1/ScriptObjects/Eyeball.hpp
index 527cabb9e..c51116b96 100644
--- a/DataSpec/DNAMP1/ScriptObjects/Eyeball.hpp
+++ b/DataSpec/DNAMP1/ScriptObjects/Eyeball.hpp
@@ -32,10 +32,9 @@ struct Eyeball : IScriptObject
Value unknown8;
Value unknown9;
- void addCMDLRigPairs(PAKRouter& pakRouter,
- std::unordered_map>& addTo) const
+ void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const
{
- actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
+ actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
}
void nameIDs(PAKRouter& pakRouter) const
diff --git a/DataSpec/DNAMP1/ScriptObjects/FireFlea.hpp b/DataSpec/DNAMP1/ScriptObjects/FireFlea.hpp
index 0c838911e..ee23c3a68 100644
--- a/DataSpec/DNAMP1/ScriptObjects/FireFlea.hpp
+++ b/DataSpec/DNAMP1/ScriptObjects/FireFlea.hpp
@@ -20,10 +20,9 @@ struct FireFlea : IScriptObject
Value unknown2;
Value unknown3;
- void addCMDLRigPairs(PAKRouter& pakRouter,
- std::unordered_map>& addTo) const
+ void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const
{
- actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
+ actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
}
void nameIDs(PAKRouter& pakRouter) const
diff --git a/DataSpec/DNAMP1/ScriptObjects/Flaahgra.hpp b/DataSpec/DNAMP1/ScriptObjects/Flaahgra.hpp
index d2bf67f35..cc2e69f66 100644
--- a/DataSpec/DNAMP1/ScriptObjects/Flaahgra.hpp
+++ b/DataSpec/DNAMP1/ScriptObjects/Flaahgra.hpp
@@ -34,11 +34,10 @@ struct Flaahgra : IScriptObject
AnimationParameters animationParameters;
UniqueID32 dependencyGroup;
- void addCMDLRigPairs(PAKRouter& pakRouter,
- std::unordered_map>& addTo) const
+ void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const
{
- actorParameters1.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
- actorParameters2.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
+ actorParameters1.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
+ actorParameters2.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
}
void nameIDs(PAKRouter& pakRouter) const
diff --git a/DataSpec/DNAMP1/ScriptObjects/FlaahgraTentacle.hpp b/DataSpec/DNAMP1/ScriptObjects/FlaahgraTentacle.hpp
index b15a6c730..fcadf23b3 100644
--- a/DataSpec/DNAMP1/ScriptObjects/FlaahgraTentacle.hpp
+++ b/DataSpec/DNAMP1/ScriptObjects/FlaahgraTentacle.hpp
@@ -17,10 +17,9 @@ struct FlaahgraTentacle : IScriptObject
PatternedInfo patternedInfo;
ActorParameters actorParameters;
- void addCMDLRigPairs(PAKRouter& pakRouter,
- std::unordered_map>& addTo) const
+ void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const
{
- actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
+ actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
}
void nameIDs(PAKRouter& pakRouter) const
diff --git a/DataSpec/DNAMP1/ScriptObjects/FlickerBat.hpp b/DataSpec/DNAMP1/ScriptObjects/FlickerBat.hpp
index 5224087b8..7976c404e 100644
--- a/DataSpec/DNAMP1/ScriptObjects/FlickerBat.hpp
+++ b/DataSpec/DNAMP1/ScriptObjects/FlickerBat.hpp
@@ -21,10 +21,9 @@ struct FlickerBat : IScriptObject
Value unknown3;
Value unknown4;
- void addCMDLRigPairs(PAKRouter& pakRouter,
- std::unordered_map>& addTo) const
+ void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const
{
- actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
+ actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
}
void nameIDs(PAKRouter& pakRouter) const
diff --git a/DataSpec/DNAMP1/ScriptObjects/FlyingPirate.hpp b/DataSpec/DNAMP1/ScriptObjects/FlyingPirate.hpp
index c889f6d5e..1afd7ac6a 100644
--- a/DataSpec/DNAMP1/ScriptObjects/FlyingPirate.hpp
+++ b/DataSpec/DNAMP1/ScriptObjects/FlyingPirate.hpp
@@ -47,10 +47,9 @@ struct FlyingPirate : IScriptObject
Value unknown19;
Value unknown20;
- void addCMDLRigPairs(PAKRouter& pakRouter,
- std::unordered_map>& addTo) const
+ void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const
{
- actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
+ actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
}
void nameIDs(PAKRouter& pakRouter) const
diff --git a/DataSpec/DNAMP1/ScriptObjects/Geemer.hpp b/DataSpec/DNAMP1/ScriptObjects/Geemer.hpp
index 9c7a7feb9..8329c0962 100644
--- a/DataSpec/DNAMP1/ScriptObjects/Geemer.hpp
+++ b/DataSpec/DNAMP1/ScriptObjects/Geemer.hpp
@@ -27,10 +27,9 @@ struct Geemer : IScriptObject
Value unknown9;
Value unknown10;
- void addCMDLRigPairs(PAKRouter& pakRouter,
- std::unordered_map>& addTo) const
+ void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations& charAssoc) const
{
- actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
+ actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
}
void nameIDs(PAKRouter& pakRouter) const
diff --git a/DataSpec/DNAMP1/ScriptObjects/GunTurret.hpp b/DataSpec/DNAMP1/ScriptObjects/GunTurret.hpp
index b9eed75e6..6899f3769 100644
--- a/DataSpec/DNAMP1/ScriptObjects/GunTurret.hpp
+++ b/DataSpec/DNAMP1/ScriptObjects/GunTurret.hpp
@@ -59,10 +59,9 @@ struct GunTurret : IScriptObject
Value unknown29;
Value unknown30;
- void addCMDLRigPairs(PAKRouter& pakRouter,
- std::unordered_map>& addTo) const
+ void addCMDLRigPairs(PAKRouter& pakRouter, CharacterAssociations