mirror of https://github.com/AxioDL/metaforce.git
Shader refactor bug fixes and attachment model extract/cook
This commit is contained in:
parent
c91e5df986
commit
1559163f98
|
@ -14,8 +14,6 @@
|
|||
<mapping directory="$PROJECT_DIR$/hecl/extern/athena" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/hecl/extern/boo" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/hecl/extern/boo/glslang" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/hecl/extern/boo/lib/graphicsdev/NX/libdrm_nouveau" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/hecl/extern/boo/lib/graphicsdev/NX/mesa" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/hecl/extern/boo/lib/graphicsdev/nx/libdrm_nouveau" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/hecl/extern/boo/lib/graphicsdev/nx/mesa" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/hecl/extern/boo/logvisor" vcs="Git" />
|
||||
|
|
|
@ -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<typename ANCSDNA::CSKRType*, typename ANCSDNA::CINFType*>;
|
||||
RigPair rigPair(&cskr, &cinf);
|
||||
|
||||
PAKEntryReadStream rs = cmdlE->beginReadStream(*node);
|
||||
DNACMDL::ReadCMDLToBlender<PAKRouter, MaterialSet, RigPair, SurfaceHeader, CMDLVersion>
|
||||
(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<typename PAKRouter::IDType> 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<atUint32, AnimationResInfo<typename PAKRouter::IDType>> animResInfo;
|
||||
|
|
|
@ -19,7 +19,7 @@ struct CharacterResInfo
|
|||
IDTYPE cmdl;
|
||||
IDTYPE cskr;
|
||||
IDTYPE cinf;
|
||||
std::vector<std::pair<hecl::FourCC, std::pair<IDTYPE, IDTYPE>>> overlays;
|
||||
std::vector<std::pair<std::string, std::pair<IDTYPE, IDTYPE>>> overlays;
|
||||
};
|
||||
|
||||
template <typename IDTYPE>
|
||||
|
|
|
@ -427,6 +427,31 @@ public:
|
|||
/** Resource cooker function */
|
||||
typedef std::function<bool(const hecl::ProjectPath&, const hecl::ProjectPath&)> ResCooker;
|
||||
|
||||
/** Mappings of resources involved in extracting characters */
|
||||
template <class IDType>
|
||||
struct CharacterAssociations
|
||||
{
|
||||
using RigPair = std::pair<IDType, IDType>;
|
||||
/* CMDL -> (CSKR, CINF) */
|
||||
std::unordered_map<IDType, RigPair> m_cmdlRigs;
|
||||
/* (CSKR, CINF) -> ANCS */
|
||||
std::unordered_map<IDType, std::pair<IDType, std::string>> m_cskrCinfToCharacter;
|
||||
/* ANCS -> (CINF, CMDL) */
|
||||
std::unordered_multimap<IDType, std::pair<RigPair, std::string>> m_characterToAttachmentRigs;
|
||||
using MultimapIteratorPair = std::pair<
|
||||
typename std::unordered_multimap<IDType, std::pair<RigPair, std::string>>::const_iterator,
|
||||
typename std::unordered_multimap<IDType, std::pair<RigPair, std::string>>::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 */
|
||||
|
|
|
@ -143,7 +143,7 @@ void PAKRouter<BRIDGETYPE>::build(std::vector<BRIDGETYPE>& 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<BRIDGETYPE>::build(std::vector<BRIDGETYPE>& 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<BRIDGETYPE>::enterPAKBridge(const BRIDGETYPE& pakBridge)
|
|||
template <class BRIDGETYPE>
|
||||
hecl::ProjectPath PAKRouter<BRIDGETYPE>::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<BRIDGETYPE>::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<BRIDGETYPE>::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<BRIDGETYPE>::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<BRIDGETYPE>::lookupEntry(co
|
|||
}
|
||||
|
||||
template <class BRIDGETYPE>
|
||||
const typename PAKRouter<BRIDGETYPE>::RigPair* PAKRouter<BRIDGETYPE>::lookupCMDLRigPair(const IDType& id) const
|
||||
const typename CharacterAssociations<typename PAKRouter<BRIDGETYPE>::IDType>::RigPair*
|
||||
PAKRouter<BRIDGETYPE>::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 <class BRIDGETYPE>
|
||||
const typename CharacterAssociations<typename PAKRouter<BRIDGETYPE>::IDType>::MultimapIteratorPair
|
||||
PAKRouter<BRIDGETYPE>::lookupCharacterAttachmentRigs(const IDType& id) const
|
||||
{
|
||||
return m_charAssoc.m_characterToAttachmentRigs.equal_range(id);
|
||||
}
|
||||
|
||||
template <class BRIDGETYPE>
|
||||
const zeus::CMatrix4f* PAKRouter<BRIDGETYPE>::lookupMAPATransform(const IDType& id) const
|
||||
{
|
||||
|
|
|
@ -154,7 +154,6 @@ public:
|
|||
using PAKType = typename BRIDGETYPE::PAKType;
|
||||
using IDType = typename PAKType::IDType;
|
||||
using EntryType = typename PAKType::Entry;
|
||||
using RigPair = std::pair<IDType, IDType>;
|
||||
|
||||
private:
|
||||
const std::vector<BRIDGETYPE>* m_bridges = nullptr;
|
||||
|
@ -169,8 +168,7 @@ private:
|
|||
std::unordered_map<IDType, std::pair<size_t, const EntryType*>> m_uniqueEntries;
|
||||
std::unordered_map<IDType, std::pair<size_t, const EntryType*>> m_sharedEntries;
|
||||
std::unordered_map<IDType, hecl::ProjectPath> m_overrideEntries;
|
||||
std::unordered_map<IDType, RigPair> m_cmdlRigs;
|
||||
std::unordered_map<IDType, std::pair<IDType, std::string>> m_cskrCinfToCharacter;
|
||||
CharacterAssociations<IDType> m_charAssoc;
|
||||
std::unordered_map<IDType, zeus::CMatrix4f> 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<IDType>::RigPair* lookupCMDLRigPair(const IDType& id) const;
|
||||
const typename CharacterAssociations<IDType>::MultimapIteratorPair lookupCharacterAttachmentRigs(const IDType& id) const;
|
||||
const zeus::CMatrix4f* lookupMAPATransform(const IDType& mapaId) const;
|
||||
|
||||
hecl::ProjectPath getAreaLayerWorking(const IDType& areaId, int layerIdx) const;
|
||||
|
|
|
@ -399,8 +399,8 @@ void ANCS::CharacterSet::CharacterInfo::Enumerate<BigDNA::Read>(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<BigDNA::Write>(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<BigDNA::Write>(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<BigDNA::BinarySize>(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<BigDNA::ReadYaml>(athena::io::
|
|||
|
||||
if (sectionCount > 3)
|
||||
{
|
||||
reader.enumerate("cmdlOverride", cmdlOverlay);
|
||||
reader.enumerate("cmdlIce", cmdlIce);
|
||||
}
|
||||
|
||||
animIdxs.clear();
|
||||
|
@ -614,7 +614,7 @@ void ANCS::CharacterSet::CharacterInfo::Enumerate<BigDNA::WriteYaml>(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<BigDNA::WriteYaml>(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;
|
||||
}
|
||||
|
|
|
@ -139,8 +139,8 @@ struct ANCS : BigDNA
|
|||
};
|
||||
std::vector<Effect> effects;
|
||||
|
||||
UniqueID32Zero cmdlOverlay;
|
||||
UniqueID32Zero cskrOverlay;
|
||||
UniqueID32Zero cmdlIce;
|
||||
UniqueID32Zero cskrIce;
|
||||
|
||||
std::vector<atUint32> 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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ bool CMDL::Extract(const SpecBase& dataSpec,
|
|||
std::function<void(const hecl::SystemChar*)> fileChanged)
|
||||
{
|
||||
/* Check for RigPair */
|
||||
const PAKRouter<PAKBridge>::RigPair* rp = pakRouter.lookupCMDLRigPair(entry.id);
|
||||
const typename CharacterAssociations<UniqueID32>::RigPair* rp = pakRouter.lookupCMDLRigPair(entry.id);
|
||||
CINF cinf;
|
||||
CSKR cskr;
|
||||
std::pair<CSKR*,CINF*> loadRp(nullptr, nullptr);
|
||||
|
|
|
@ -216,9 +216,7 @@ void PAKBridge::build()
|
|||
}
|
||||
}
|
||||
|
||||
void PAKBridge::addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, std::string>>& cskrCinfToAncs) const
|
||||
void PAKBridge::addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
for (const std::pair<UniqueID32, PAK::Entry>& entry : m_pak.m_entries)
|
||||
{
|
||||
|
@ -229,23 +227,26 @@ void PAKBridge::addCMDLRigPairs(PAKRouter<PAKBridge>& 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<atUint32, DNAANCS::AnimationResInfo<UniqueID32>> animInfo;
|
||||
|
@ -254,19 +255,21 @@ void PAKBridge::addCMDLRigPairs(PAKRouter<PAKBridge>& 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,9 +29,7 @@ public:
|
|||
const PAKType& getPAK() const {return m_pak;}
|
||||
const nod::Node& getNode() const {return m_node;}
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, std::string>>& cskrCinfToAncs) const;
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const;
|
||||
|
||||
void addPATHToMREA(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, UniqueID32>& pathToMrea) const;
|
||||
|
|
|
@ -42,8 +42,7 @@ void MREA::ReadBabeDeadToBlender_1_2(hecl::blender::PyOutStream& os,
|
|||
}
|
||||
|
||||
void MREA::AddCMDLRigPairs(PAKEntryReadStream& rs,
|
||||
PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo)
|
||||
PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& 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)
|
||||
|
|
|
@ -102,8 +102,7 @@ struct MREA
|
|||
athena::io::IStreamReader& rs);
|
||||
|
||||
static void AddCMDLRigPairs(PAKEntryReadStream& rs,
|
||||
PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo);
|
||||
PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc);
|
||||
|
||||
static UniqueID32 GetPATHId(PAKEntryReadStream& rs);
|
||||
|
||||
|
|
|
@ -63,18 +63,16 @@ void SCLY::exportToLayerDirectories(const PAK::Entry& entry, PAKRouter<PAKBridge
|
|||
}
|
||||
}
|
||||
|
||||
void SCLY::addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void SCLY::addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
for (const ScriptLayer& layer : layers)
|
||||
layer.addCMDLRigPairs(pakRouter, addTo);
|
||||
layer.addCMDLRigPairs(pakRouter, charAssoc);
|
||||
}
|
||||
|
||||
void SCLY::ScriptLayer::addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void SCLY::ScriptLayer::addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
for (const std::unique_ptr<IScriptObject>& obj : objects)
|
||||
obj->addCMDLRigPairs(pakRouter, addTo);
|
||||
obj->addCMDLRigPairs(pakRouter, charAssoc);
|
||||
}
|
||||
|
||||
void SCLY::nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -21,15 +21,13 @@ struct SCLY : BigDNA
|
|||
Value<atUint8> unknown;
|
||||
Value<atUint32> objectCount;
|
||||
Vector<std::unique_ptr<IScriptObject>, AT_DNA_COUNT(objectCount)> objects;
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const;
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const;
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const;
|
||||
};
|
||||
Vector<ScriptLayer, AT_DNA_COUNT(layerCount)> layers;
|
||||
|
||||
void exportToLayerDirectories(const PAK::Entry &, PAKRouter<PAKBridge>&, bool) const;
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const;
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const;
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -34,10 +34,9 @@ struct Actor : IScriptObject
|
|||
Value<bool> scaleAdvancementDelta;
|
||||
Value<bool> materialFlag54;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -26,10 +26,9 @@ struct ActorContraption : IScriptObject
|
|||
DamageInfo damageInfo;
|
||||
Value<bool> active; // needs verification
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -27,10 +27,9 @@ struct AmbientAI : IScriptObject
|
|||
Value<atInt32> impactAnim;
|
||||
Value<bool> active;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -25,10 +25,9 @@ struct AtomicAlpha : IScriptObject
|
|||
Value<bool> unknown4;
|
||||
Value<bool> unknown5;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -32,10 +32,9 @@ struct AtomicBeta : IScriptObject
|
|||
Value<atUint32> unknown9;
|
||||
Value<float> unknown10;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -26,8 +26,8 @@ struct Babygoth : IScriptObject
|
|||
DamageInfo damageInfo3;
|
||||
DamageVulnerability damageVulnerabilty1;
|
||||
DamageVulnerability damageVulnerabilty2;
|
||||
UniqueID32 model;
|
||||
UniqueID32 skin;
|
||||
UniqueID32 cmdlShelless;
|
||||
UniqueID32 cskrShelless;
|
||||
Value<float> unknown3;
|
||||
Value<atUint32> unknown4;
|
||||
UniqueID32 particle2;
|
||||
|
@ -44,13 +44,19 @@ struct Babygoth : IScriptObject
|
|||
Value<atUint32> unknown11;
|
||||
UniqueID32 particle6;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& 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<PAKBridge>& 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);
|
||||
|
|
|
@ -27,10 +27,9 @@ struct Beetle : IScriptObject
|
|||
Value<float> unknown5;
|
||||
Value<float> unknown6;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -29,10 +29,9 @@ struct BloodFlower : IScriptObject
|
|||
UniqueID32 particle5;
|
||||
Value<float> unknown2;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -24,10 +24,9 @@ struct Burrower : IScriptObject
|
|||
Value<atUint32> unknown; // always FF
|
||||
UniqueID32 particle4;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -42,10 +42,9 @@ struct ChozoGhost : IScriptObject
|
|||
Value<atUint32> unknown12;
|
||||
Value<atUint32> unknown13;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -25,10 +25,9 @@ struct DoorArea : IScriptObject
|
|||
Value<float> animationLength;
|
||||
Value<bool> isMorphballDoor;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -56,10 +56,9 @@ struct Drone : IScriptObject
|
|||
Value<atUint32> sound; // verification needed
|
||||
Value<bool> unknown30;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -53,11 +53,10 @@ struct ElitePirate : IScriptObject
|
|||
Value<bool> unknown17;
|
||||
Value<bool> unknown18;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& 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<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -31,10 +31,9 @@ struct EnergyBall : IScriptObject
|
|||
DamageInfo damageInfo2;
|
||||
Value<float> unknown6;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -32,10 +32,9 @@ struct Eyeball : IScriptObject
|
|||
Value<atUint32> unknown8;
|
||||
Value<bool> unknown9;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -20,10 +20,9 @@ struct FireFlea : IScriptObject
|
|||
Value<bool> unknown2;
|
||||
Value<float> unknown3;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -34,11 +34,10 @@ struct Flaahgra : IScriptObject
|
|||
AnimationParameters animationParameters;
|
||||
UniqueID32 dependencyGroup;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& 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<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -17,10 +17,9 @@ struct FlaahgraTentacle : IScriptObject
|
|||
PatternedInfo patternedInfo;
|
||||
ActorParameters actorParameters;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -21,10 +21,9 @@ struct FlickerBat : IScriptObject
|
|||
Value<bool> unknown3;
|
||||
Value<bool> unknown4;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -47,10 +47,9 @@ struct FlyingPirate : IScriptObject
|
|||
Value<float> unknown19;
|
||||
Value<float> unknown20;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -27,10 +27,9 @@ struct Geemer : IScriptObject
|
|||
Value<atUint32> unknown9;
|
||||
Value<atUint32> unknown10;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -59,10 +59,9 @@ struct GunTurret : IScriptObject
|
|||
Value<float> unknown29;
|
||||
Value<bool> unknown30;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -41,7 +41,7 @@ struct IScriptObject : BigDNAVYaml
|
|||
virtual ~IScriptObject() = default;
|
||||
|
||||
virtual void addCMDLRigPairs(PAKRouter<PAKBridge>&,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>&) const {}
|
||||
CharacterAssociations<UniqueID32>& charAssoc) const {}
|
||||
virtual void nameIDs(PAKRouter<PAKBridge>& pakRouter) const {}
|
||||
virtual void gatherDependencies(std::vector<hecl::ProjectPath>& pathsOut,
|
||||
std::vector<hecl::ProjectPath>& lazyOut) const {}
|
||||
|
|
|
@ -48,10 +48,9 @@ struct IceSheegoth : IScriptObject
|
|||
Value<bool> unknown12;
|
||||
Value<bool> unknown13;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -27,10 +27,9 @@ struct IceZoomer : IScriptObject
|
|||
DamageVulnerability damageVulnerabilty;
|
||||
Value<float> unknown9;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -31,10 +31,9 @@ struct JellyZap : IScriptObject
|
|||
Value<float> unknown12;
|
||||
Value<bool> unknown13;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -22,8 +22,8 @@ struct Magdolite : IScriptObject
|
|||
DamageInfo damageInfo2;
|
||||
DamageVulnerability damageVulnerabilty1;
|
||||
DamageVulnerability damageVulnerabilty2;
|
||||
UniqueID32 model;
|
||||
UniqueID32 skin;
|
||||
UniqueID32 cmdlHeadless;
|
||||
UniqueID32 cskrHeadless;
|
||||
Value<float> unknown3;
|
||||
Value<float> unknown4;
|
||||
Value<float> unknown5;
|
||||
|
@ -43,25 +43,31 @@ struct Magdolite : IScriptObject
|
|||
Value<float> unknown8;
|
||||
Value<float> unknown9;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& 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 (cmdlHeadless && cskrHeadless)
|
||||
{
|
||||
charAssoc.m_cmdlRigs[cmdlHeadless] = std::make_pair(cskrHeadless, cinf);
|
||||
charAssoc.m_cskrCinfToCharacter[cskrHeadless] = std::make_pair(
|
||||
patternedInfo.animationParameters.animationCharacterSet, "ATTACH.HEADLESS.CSKR");
|
||||
charAssoc.addAttachmentRig(patternedInfo.animationParameters.animationCharacterSet,
|
||||
{}, cmdlHeadless, "HEADLESS");
|
||||
}
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (model)
|
||||
if (cmdlHeadless)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model);
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(cmdlHeadless);
|
||||
ent->name = name + "_emodel";
|
||||
}
|
||||
if (skin)
|
||||
if (cskrHeadless)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(skin);
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(cskrHeadless);
|
||||
ent->name = name + "_eskin";
|
||||
}
|
||||
if (magdoliteParameters.particle)
|
||||
|
@ -76,8 +82,8 @@ struct Magdolite : IScriptObject
|
|||
void gatherDependencies(std::vector<hecl::ProjectPath>& pathsOut,
|
||||
std::vector<hecl::ProjectPath>& lazyOut) const
|
||||
{
|
||||
g_curSpec->flattenDependencies(model, pathsOut);
|
||||
g_curSpec->flattenDependencies(skin, pathsOut);
|
||||
g_curSpec->flattenDependencies(cmdlHeadless, pathsOut);
|
||||
g_curSpec->flattenDependencies(cskrHeadless, pathsOut);
|
||||
g_curSpec->flattenDependencies(magdoliteParameters.particle, pathsOut);
|
||||
patternedInfo.depIDs(pathsOut);
|
||||
actorParameters.depIDs(pathsOut, lazyOut);
|
||||
|
|
|
@ -23,10 +23,9 @@ struct MetareeAlpha : IScriptObject
|
|||
Value<float> unknown4;
|
||||
Value<float> unknown5;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -31,10 +31,9 @@ struct MetroidAlpha : IScriptObject
|
|||
AnimationParameters animationParameters4;
|
||||
Value<bool> unknown8;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -34,10 +34,9 @@ struct MetroidBeta : IScriptObject
|
|||
UniqueID32 particle4;
|
||||
Value<bool> unknown10;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -328,11 +328,10 @@ struct MetroidPrimeStage1 : IScriptObject
|
|||
}
|
||||
} massivePrimeStruct;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
massivePrimeStruct.actorParameters.addCMDLRigPairs(addTo,
|
||||
massivePrimeStruct.patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
massivePrimeStruct.actorParameters.addCMDLRigPairs(pakRouter, charAssoc,
|
||||
massivePrimeStruct.patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -22,10 +22,9 @@ struct MetroidPrimeStage2 : IScriptObject
|
|||
Value<atUint32> unknown;
|
||||
UniqueID32 particle2;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -24,10 +24,9 @@ struct NewIntroBoss : IScriptObject
|
|||
UniqueID32 texture1;
|
||||
UniqueID32 texture2;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -29,10 +29,9 @@ struct Oculus : IScriptObject
|
|||
/* Trilogy addition */
|
||||
Value<float> unknown8;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -52,17 +52,25 @@ struct OmegaPirate : IScriptObject
|
|||
Value<atUint32> soundID5;
|
||||
Value<bool> unknown17;
|
||||
Value<bool> unknown18;
|
||||
UniqueID32 model2;
|
||||
UniqueID32 skin;
|
||||
UniqueID32 rig;
|
||||
UniqueID32 cmdlPhazonVeins;
|
||||
UniqueID32 cskrPhazonVeins;
|
||||
UniqueID32 cinfPhazonVeins;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters1.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters2.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
|
||||
if (model2 && skin && rig)
|
||||
addTo[model2] = std::make_pair(skin, rig);
|
||||
actorParameters1.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
actorParameters2.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
if (cmdlPhazonVeins && cskrPhazonVeins && cinfPhazonVeins)
|
||||
{
|
||||
charAssoc.m_cmdlRigs[cmdlPhazonVeins] = std::make_pair(cskrPhazonVeins, cinfPhazonVeins);
|
||||
charAssoc.m_cskrCinfToCharacter[cskrPhazonVeins] = std::make_pair(
|
||||
patternedInfo.animationParameters.animationCharacterSet, "ATTACH.VEINS.CSKR");
|
||||
charAssoc.m_cskrCinfToCharacter[cinfPhazonVeins] = std::make_pair(
|
||||
patternedInfo.animationParameters.animationCharacterSet,
|
||||
hecl::Format("CINF_%08X.CINF", cinfPhazonVeins.toUint32()));
|
||||
charAssoc.addAttachmentRig(patternedInfo.animationParameters.animationCharacterSet,
|
||||
cinfPhazonVeins, cmdlPhazonVeins, "VEINS");
|
||||
}
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
@ -112,19 +120,19 @@ struct OmegaPirate : IScriptObject
|
|||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model1);
|
||||
ent->name = name + "_model1";
|
||||
}
|
||||
if (model2)
|
||||
if (cmdlPhazonVeins)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model2);
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(cmdlPhazonVeins);
|
||||
ent->name = name + "_model2";
|
||||
}
|
||||
if (skin)
|
||||
if (cskrPhazonVeins)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(skin);
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(cskrPhazonVeins);
|
||||
ent->name = name + "_skin";
|
||||
}
|
||||
if (rig)
|
||||
if (cinfPhazonVeins)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(rig);
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(cinfPhazonVeins);
|
||||
ent->name = name + "_rig";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
|
@ -145,9 +153,9 @@ struct OmegaPirate : IScriptObject
|
|||
g_curSpec->flattenDependencies(particle7, pathsOut);
|
||||
g_curSpec->flattenDependencies(elsc, pathsOut);
|
||||
g_curSpec->flattenDependencies(model1, pathsOut);
|
||||
g_curSpec->flattenDependencies(model2, pathsOut);
|
||||
g_curSpec->flattenDependencies(skin, pathsOut);
|
||||
g_curSpec->flattenDependencies(rig, pathsOut);
|
||||
g_curSpec->flattenDependencies(cmdlPhazonVeins, pathsOut);
|
||||
g_curSpec->flattenDependencies(cskrPhazonVeins, pathsOut);
|
||||
g_curSpec->flattenDependencies(cinfPhazonVeins, pathsOut);
|
||||
patternedInfo.depIDs(pathsOut);
|
||||
actorParameters1.depIDs(pathsOut, lazyOut);
|
||||
actorParameters2.depIDs(pathsOut, lazyOut);
|
||||
|
|
|
@ -402,10 +402,10 @@ struct ActorParameters : BigDNA
|
|||
Value<atUint32> propertyCount;
|
||||
LightParameters lightParameters;
|
||||
ScannableParameters scannableParameters;
|
||||
UniqueID32 xrayModel;
|
||||
UniqueID32 xraySkin;
|
||||
UniqueID32 thermalModel;
|
||||
UniqueID32 thermalSkin;
|
||||
UniqueID32 cmdlXray;
|
||||
UniqueID32 cskrXray;
|
||||
UniqueID32 cmdlThermal;
|
||||
UniqueID32 cskrThermal;
|
||||
Value<bool> globalTimeProvider;
|
||||
Value<float> fadeInTime;
|
||||
Value<float> fadeOutTime;
|
||||
|
@ -415,36 +415,47 @@ struct ActorParameters : BigDNA
|
|||
Value<bool> noSortThermal;
|
||||
Value<float> thermalMag;
|
||||
|
||||
void addCMDLRigPairs(std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo,
|
||||
const UniqueID32& cinf) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc,
|
||||
const AnimationParameters& animParms) const
|
||||
{
|
||||
if (xrayModel && xraySkin)
|
||||
addTo[xrayModel] = std::make_pair(xraySkin, cinf);
|
||||
if (thermalModel && thermalSkin)
|
||||
addTo[thermalModel] = std::make_pair(thermalSkin, cinf);
|
||||
auto cinf = animParms.getCINF(pakRouter);
|
||||
if (cmdlXray && cskrXray)
|
||||
{
|
||||
charAssoc.m_cmdlRigs[cmdlXray] = std::make_pair(cskrXray, cinf);
|
||||
charAssoc.m_cskrCinfToCharacter[cskrXray] = std::make_pair(
|
||||
animParms.animationCharacterSet, "ATTACH.XRAY.CSKR");
|
||||
charAssoc.addAttachmentRig(animParms.animationCharacterSet, {}, cmdlXray, "XRAY");
|
||||
}
|
||||
if (cmdlThermal && cskrThermal)
|
||||
{
|
||||
charAssoc.m_cmdlRigs[cmdlThermal] = std::make_pair(cskrThermal, cinf);
|
||||
charAssoc.m_cskrCinfToCharacter[cskrThermal] = std::make_pair(
|
||||
animParms.animationCharacterSet, "ATTACH.THERMAL.CSKR");
|
||||
charAssoc.addAttachmentRig(animParms.animationCharacterSet, {}, cmdlThermal, "THERMAL");
|
||||
}
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter, const std::string& name) const
|
||||
{
|
||||
scannableParameters.nameIDs(pakRouter, name);
|
||||
if (xrayModel)
|
||||
if (cmdlXray)
|
||||
{
|
||||
PAK::Entry* xmEnt = (PAK::Entry*)pakRouter.lookupEntry(xrayModel);
|
||||
PAK::Entry* xmEnt = (PAK::Entry*)pakRouter.lookupEntry(cmdlXray);
|
||||
xmEnt->name = name + "_xraymodel";
|
||||
}
|
||||
if (xraySkin)
|
||||
if (cskrXray)
|
||||
{
|
||||
PAK::Entry* xsEnt = (PAK::Entry*)pakRouter.lookupEntry(xraySkin);
|
||||
PAK::Entry* xsEnt = (PAK::Entry*)pakRouter.lookupEntry(cskrXray);
|
||||
xsEnt->name = name + "_xrayskin";
|
||||
}
|
||||
if (thermalModel)
|
||||
if (cmdlThermal)
|
||||
{
|
||||
PAK::Entry* xmEnt = (PAK::Entry*)pakRouter.lookupEntry(thermalModel);
|
||||
PAK::Entry* xmEnt = (PAK::Entry*)pakRouter.lookupEntry(cmdlThermal);
|
||||
xmEnt->name = name + "_thermalmodel";
|
||||
}
|
||||
if (thermalSkin)
|
||||
if (cskrThermal)
|
||||
{
|
||||
PAK::Entry* xsEnt = (PAK::Entry*)pakRouter.lookupEntry(thermalSkin);
|
||||
PAK::Entry* xsEnt = (PAK::Entry*)pakRouter.lookupEntry(cskrThermal);
|
||||
xsEnt->name = name + "_thermalskin";
|
||||
}
|
||||
}
|
||||
|
@ -453,10 +464,10 @@ struct ActorParameters : BigDNA
|
|||
std::vector<hecl::ProjectPath>& lazyOut) const
|
||||
{
|
||||
scannableParameters.depIDs(lazyOut);
|
||||
g_curSpec->flattenDependencies(xrayModel, pathsOut);
|
||||
g_curSpec->flattenDependencies(xraySkin, pathsOut);
|
||||
g_curSpec->flattenDependencies(thermalModel, pathsOut);
|
||||
g_curSpec->flattenDependencies(thermalSkin, pathsOut);
|
||||
g_curSpec->flattenDependencies(cmdlXray, pathsOut);
|
||||
g_curSpec->flattenDependencies(cskrXray, pathsOut);
|
||||
g_curSpec->flattenDependencies(cmdlThermal, pathsOut);
|
||||
g_curSpec->flattenDependencies(cskrThermal, pathsOut);
|
||||
}
|
||||
|
||||
void scanIDs(std::vector<Scan>& scansOut) const
|
||||
|
|
|
@ -36,10 +36,9 @@ struct Parasite : IScriptObject
|
|||
Value<float> unknown18;
|
||||
Value<bool> unknown19;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -20,10 +20,9 @@ struct PhazonHealingNodule : IScriptObject
|
|||
UniqueID32 elsc;
|
||||
String<-1> unknown2;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -29,10 +29,9 @@ struct Pickup : IScriptObject
|
|||
Value<float> unknown1;
|
||||
UniqueID32 particle;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -30,10 +30,9 @@ struct Platform : IScriptObject
|
|||
Value<atUint32> maxRainSplashes;
|
||||
Value<atUint32> rainGenRate;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -30,10 +30,9 @@ struct PlayerActor : IScriptObject
|
|||
PlayerParameters playerParameters;
|
||||
Value<atUint32> beamId;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -27,10 +27,9 @@ struct PuddleSpore : IScriptObject
|
|||
UniqueID32 wpsc;
|
||||
DamageInfo damageInfo;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -28,10 +28,9 @@ struct PuddleToadGamma : IScriptObject
|
|||
DamageInfo damageInfo2;
|
||||
UniqueID32 dcln;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -27,10 +27,9 @@ struct Puffer : IScriptObject
|
|||
DamageInfo damageInfo2;
|
||||
Value<atUint32> unknown6;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -130,10 +130,9 @@ struct Ridley : IScriptObject
|
|||
/* Trilogy addition */
|
||||
DamageInfo damageInfo9;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -19,10 +19,9 @@ struct Ripper : IScriptObject
|
|||
ActorParameters actorParameters;
|
||||
GrappleParameters grappleParameters;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -25,10 +25,9 @@ struct Seedling : IScriptObject
|
|||
Value<float> unknown5;
|
||||
Value<float> unknown6;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -36,10 +36,9 @@ struct SnakeWeedSwarm : IScriptObject
|
|||
Value<atUint32> unknown18;
|
||||
Value<atUint32> unknown19;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -47,10 +47,9 @@ struct SpacePirate : IScriptObject
|
|||
Value<float> unknown19;
|
||||
Value<float> unknown20;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -22,10 +22,9 @@ struct SpankWeed : IScriptObject
|
|||
Value<float> unknown4;
|
||||
Value<float> unknown5;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -35,10 +35,9 @@ struct Thardus : IScriptObject
|
|||
Value<atUint32> unknown11;
|
||||
Value<atUint32> unknown12;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -22,10 +22,9 @@ struct ThardusRockProjectile : IScriptObject
|
|||
UniqueID32 model;
|
||||
UniqueID32 stateMachine;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -21,10 +21,9 @@ struct Tryclops : IScriptObject
|
|||
Value<float> unknown3;
|
||||
Value<float> unknown4;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -50,10 +50,9 @@ struct WallCrawlerSwarm : IScriptObject
|
|||
Value<atUint32> soundID1; // verification needed
|
||||
Value<atUint32> soundID2; // verification needed
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -24,10 +24,9 @@ struct Warwasp : IScriptObject
|
|||
UniqueID32 particle;
|
||||
Value<atUint32> unknown3;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters.addCMDLRigPairs(pakRouter, charAssoc, patternedInfo.animationParameters);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
|
|
|
@ -56,8 +56,8 @@ void ANCS::CharacterSet::CharacterInfo::Enumerate<BigDNA::Read>(typename Read::S
|
|||
|
||||
if (sectionCount > 3)
|
||||
{
|
||||
cmdlOverlay.read(reader);
|
||||
cskrOverlay.read(reader);
|
||||
cmdlIce.read(reader);
|
||||
cskrIce.read(reader);
|
||||
}
|
||||
|
||||
animIdxs.clear();
|
||||
|
@ -89,7 +89,7 @@ void ANCS::CharacterSet::CharacterInfo::Enumerate<BigDNA::Write>(typename Write:
|
|||
sectionCount = 6;
|
||||
else if (animIdxs.size())
|
||||
sectionCount = 5;
|
||||
else if (cmdlOverlay)
|
||||
else if (cmdlIce)
|
||||
sectionCount = 4;
|
||||
else if (effects.size())
|
||||
sectionCount = 3;
|
||||
|
@ -143,8 +143,8 @@ void ANCS::CharacterSet::CharacterInfo::Enumerate<BigDNA::Write>(typename Write:
|
|||
|
||||
if (sectionCount > 3)
|
||||
{
|
||||
cmdlOverlay.write(writer);
|
||||
cskrOverlay.write(writer);
|
||||
cmdlIce.write(writer);
|
||||
cskrIce.write(writer);
|
||||
}
|
||||
|
||||
if (sectionCount > 4)
|
||||
|
@ -173,7 +173,7 @@ void ANCS::CharacterSet::CharacterInfo::Enumerate<BigDNA::BinarySize>(typename B
|
|||
sectionCount = 6;
|
||||
else if (animIdxs.size())
|
||||
sectionCount = 5;
|
||||
else if (cmdlOverlay)
|
||||
else if (cmdlIce)
|
||||
sectionCount = 4;
|
||||
else if (effects.size())
|
||||
sectionCount = 3;
|
||||
|
@ -286,7 +286,7 @@ void ANCS::CharacterSet::CharacterInfo::Enumerate<BigDNA::ReadYaml>(typename Rea
|
|||
|
||||
if (sectionCount > 3)
|
||||
{
|
||||
reader.enumerate("cmdlOverlay", cmdlOverlay);
|
||||
reader.enumerate("cmdlIce", cmdlIce);
|
||||
}
|
||||
|
||||
animIdxs.clear();
|
||||
|
@ -316,7 +316,7 @@ void ANCS::CharacterSet::CharacterInfo::Enumerate<BigDNA::WriteYaml>(typename Wr
|
|||
sectionCount = 6;
|
||||
else if (animIdxs.size())
|
||||
sectionCount = 5;
|
||||
else if (cmdlOverlay)
|
||||
else if (cmdlIce)
|
||||
sectionCount = 4;
|
||||
else if (effects.size())
|
||||
sectionCount = 3;
|
||||
|
@ -359,7 +359,7 @@ void ANCS::CharacterSet::CharacterInfo::Enumerate<BigDNA::WriteYaml>(typename Wr
|
|||
|
||||
if (sectionCount > 3)
|
||||
{
|
||||
writer.enumerate("cmdlOverlay", cmdlOverlay);
|
||||
writer.enumerate("cmdlIce", cmdlIce);
|
||||
}
|
||||
|
||||
if (sectionCount > 4)
|
||||
|
|
|
@ -80,8 +80,8 @@ struct ANCS : BigDNA
|
|||
};
|
||||
std::vector<Effect> effects;
|
||||
|
||||
UniqueID32 cmdlOverlay;
|
||||
UniqueID32 cskrOverlay;
|
||||
UniqueID32 cmdlIce;
|
||||
UniqueID32 cskrIce;
|
||||
|
||||
std::vector<atUint32> animIdxs;
|
||||
|
||||
|
@ -198,8 +198,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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ bool CMDL::Extract(const SpecBase& dataSpec,
|
|||
std::function<void(const hecl::SystemChar*)>)
|
||||
{
|
||||
/* Check for RigPair */
|
||||
const PAKRouter<PAKBridge>::RigPair* rp = pakRouter.lookupCMDLRigPair(entry.id);
|
||||
const typename CharacterAssociations<UniqueID32>::RigPair* rp = pakRouter.lookupCMDLRigPair(entry.id);
|
||||
CINF cinf;
|
||||
CSKR cskr;
|
||||
std::pair<CSKR*,CINF*> loadRp(nullptr, nullptr);
|
||||
|
|
|
@ -169,9 +169,7 @@ void PAKBridge::build()
|
|||
}
|
||||
}
|
||||
|
||||
void PAKBridge::addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, std::string>>& cskrCinfToAncs) const
|
||||
void PAKBridge::addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const
|
||||
{
|
||||
for (const std::pair<UniqueID32, DNAMP2::PAK::Entry>& entry : m_pak.m_entries)
|
||||
{
|
||||
|
@ -182,13 +180,13 @@ void PAKBridge::addCMDLRigPairs(PAKRouter<PAKBridge>& 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()));
|
||||
if (ci.cmdlOverlay)
|
||||
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()));
|
||||
if (ci.cmdlIce)
|
||||
{
|
||||
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()));
|
||||
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()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,9 +30,7 @@ public:
|
|||
const PAKType& getPAK() const {return m_pak;}
|
||||
const nod::Node& getNode() const {return m_node;}
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, std::string>>& cskrCinfToAncs) const;
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID32>& charAssoc) const;
|
||||
|
||||
void addMAPATransforms(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, zeus::CMatrix4f>& addTo,
|
||||
|
|
|
@ -294,7 +294,7 @@ struct CHAR : BigDNA
|
|||
chOut.cinf = characterInfo.cinf;
|
||||
|
||||
for (const CharacterInfo::Overlay& overlay : characterInfo.overlays)
|
||||
chOut.overlays.emplace_back(overlay.type, std::make_pair(overlay.cmdl, overlay.cskr));
|
||||
chOut.overlays.emplace_back(overlay.type.toString(), std::make_pair(overlay.cmdl, overlay.cskr));
|
||||
}
|
||||
|
||||
void getAnimationResInfo(PAKRouter<PAKBridge>* pakRouter,
|
||||
|
|
|
@ -14,7 +14,7 @@ bool CMDL::Extract(const SpecBase& dataSpec,
|
|||
std::function<void(const hecl::SystemChar*)>)
|
||||
{
|
||||
/* Check for RigPair */
|
||||
const PAKRouter<PAKBridge>::RigPair* rp = pakRouter.lookupCMDLRigPair(entry.id);
|
||||
const typename CharacterAssociations<UniqueID64>::RigPair* rp = pakRouter.lookupCMDLRigPair(entry.id);
|
||||
CINF cinf;
|
||||
CSKR cskr;
|
||||
std::pair<CSKR*,CINF*> loadRp(nullptr, nullptr);
|
||||
|
|
|
@ -178,9 +178,7 @@ void PAKBridge::build()
|
|||
}
|
||||
}
|
||||
|
||||
void PAKBridge::addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID64, std::pair<UniqueID64, UniqueID64>>& addTo,
|
||||
std::unordered_map<UniqueID64, std::pair<UniqueID64, std::string>>& cskrCinfToChar) const
|
||||
void PAKBridge::addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID64>& charAssoc) const
|
||||
{
|
||||
for (const std::pair<UniqueID64, PAK::Entry>& entry : m_pak.m_entries)
|
||||
{
|
||||
|
@ -190,13 +188,15 @@ void PAKBridge::addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
|||
CHAR aChar;
|
||||
aChar.read(rs);
|
||||
const CHAR::CharacterInfo& ci = aChar.characterInfo;
|
||||
addTo[ci.cmdl] = std::make_pair(ci.cskr, ci.cinf);
|
||||
cskrCinfToChar[ci.cskr] = std::make_pair(entry.second.id, hecl::Format("%s.CSKR", ci.name.c_str()));
|
||||
cskrCinfToChar[ci.cinf] = std::make_pair(entry.second.id, hecl::Format("CINF_%" PRIX64 ".CINF", ci.cinf.toUint64()));
|
||||
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_%" PRIX64 ".CINF", ci.cinf.toUint64()));
|
||||
for (const CHAR::CharacterInfo::Overlay& overlay : ci.overlays)
|
||||
{
|
||||
addTo[overlay.cmdl] = std::make_pair(overlay.cskr, ci.cinf);
|
||||
cskrCinfToChar[overlay.cskr] = std::make_pair(entry.second.id,
|
||||
charAssoc.m_cmdlRigs[overlay.cmdl] = std::make_pair(overlay.cskr, ci.cinf);
|
||||
charAssoc.m_cskrCinfToCharacter[overlay.cskr] = std::make_pair(entry.second.id,
|
||||
hecl::Format("%s.%.4s.CSKR", ci.name.c_str(), overlay.type.getChars()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,9 +29,7 @@ public:
|
|||
const PAKType& getPAK() const {return m_pak;}
|
||||
const nod::Node& getNode() const {return m_node;}
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID64, std::pair<UniqueID64, UniqueID64>>& addTo,
|
||||
std::unordered_map<UniqueID64, std::pair<UniqueID64, std::string>>& cskrCinfToChar) const;
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter, CharacterAssociations<UniqueID64>& charAssoc) const;
|
||||
|
||||
void addMAPATransforms(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID64, zeus::CMatrix4f>& addTo,
|
||||
|
|
|
@ -466,11 +466,31 @@ void SpecBase::flattenDependenciesBlend(const hecl::ProjectPath& in,
|
|||
else if (charIdx < actor.subtypes.size())
|
||||
doSubtype(actor.subtypes[charIdx]);
|
||||
|
||||
for (const Actor::Attachment& att : actor.attachments)
|
||||
{
|
||||
if (hecl::IsPathBlend(att.mesh))
|
||||
{
|
||||
flattenDependenciesBlend(att.mesh, pathsOut, btok);
|
||||
pathsOut.push_back(att.mesh);
|
||||
}
|
||||
|
||||
hecl::SystemStringConv chSysName(att.name);
|
||||
pathsOut.push_back(asGlob.ensureAuxInfo(hecl::SystemString(_S("ATTACH.")) +
|
||||
chSysName.c_str() + _S(".CSKR")));
|
||||
|
||||
if (att.armature >= 0)
|
||||
{
|
||||
const auto& arm = actor.armatures[att.armature];
|
||||
hecl::SystemStringConv armSysName(arm.name);
|
||||
pathsOut.push_back(asGlob.ensureAuxInfo(hecl::SystemString(armSysName.sys_str()) + _S(".CINF")));
|
||||
}
|
||||
}
|
||||
|
||||
for (const auto& act : actNames)
|
||||
{
|
||||
hecl::SystemStringConv actSysName(act);
|
||||
pathsOut.push_back(asGlob.ensureAuxInfo(hecl::SystemString(actSysName.sys_str()) + _S(".ANIM")));
|
||||
hecl::ProjectPath evntPath = asGlob.getWithExtension(
|
||||
hecl::ProjectPath evntPath = asGlob.ensureAuxInfo({}).getWithExtension(
|
||||
hecl::SysFormat(_S(".%s.evnt.yaml"), actSysName.c_str()).c_str(), true);
|
||||
if (evntPath.isFile())
|
||||
pathsOut.push_back(evntPath);
|
||||
|
@ -1208,6 +1228,21 @@ bool SpecBase::addFileToIndex(const hecl::ProjectPath& path,
|
|||
}
|
||||
}
|
||||
|
||||
std::vector<std::string> attachmentNames = ds.getAttachmentNames();
|
||||
for (const auto& attachment : attachmentNames)
|
||||
{
|
||||
hecl::SystemStringConv attachmentSys(attachment);
|
||||
hecl::ProjectPath subPath = asGlob.ensureAuxInfo(hecl::SystemString(_S("ATTACH.")) +
|
||||
attachmentSys.c_str() + _S(".CSKR"));
|
||||
urde::SObjectTag pathTag = buildTagFromPath(subPath, m_backgroundBlender);
|
||||
m_tagToPath[pathTag] = subPath;
|
||||
m_pathToTag[subPath.hash()] = pathTag;
|
||||
WriteTag(cacheWriter, pathTag, subPath);
|
||||
#if DUMP_CACHE_FILL
|
||||
DumpCacheAdd(pathTag, subPath);
|
||||
#endif
|
||||
}
|
||||
|
||||
for (const std::string& act : actionNames)
|
||||
{
|
||||
hecl::SystemStringConv sysStr(act);
|
||||
|
|
|
@ -4,3 +4,4 @@ add_library(NESEmulator CNESEmulator.hpp CNESEmulator.cpp CNESShader.hpp CNESSha
|
|||
apu.c fixNES/audio_fds.c fixNES/audio_mmc5.c fixNES/audio_vrc6.c fixNES/audio_vrc7.c
|
||||
fixNES/audio_n163.c fixNES/audio_s5b.c fixNES/cpu.c ppu.c fixNES/mem.c fixNES/input.c
|
||||
fixNES/mapper.c fixNES/mapperList.c fixNES/fm2play.c fixNES/vrc_irq.c ${MAPPER_SRCS})
|
||||
add_dependencies(NESEmulator ${HECL_APPLICATION_REPS_TARGETS_LIST})
|
||||
|
|
|
@ -102,8 +102,6 @@ struct GeometryUniformLayout
|
|||
|
||||
struct SShader
|
||||
{
|
||||
|
||||
|
||||
std::vector<TCachedToken<CTexture>> x0_textures;
|
||||
std::unordered_map<int, CModelShaders::ShaderPipelines> m_shaders;
|
||||
MaterialSet m_matSet;
|
||||
|
|
|
@ -174,12 +174,15 @@ void CModelShaders::Initialize()
|
|||
default:
|
||||
lightingFuncs = ExtensionLightingFuncsGLSL;
|
||||
postFuncs = ExtensionPostFuncsGLSL;
|
||||
break;
|
||||
case boo::IGraphicsDataFactory::Platform::D3D11:
|
||||
lightingFuncs = ExtensionLightingFuncsHLSL;
|
||||
postFuncs = ExtensionPostFuncsHLSL;
|
||||
break;
|
||||
case boo::IGraphicsDataFactory::Platform::Metal:
|
||||
lightingFuncs = ExtensionLightingFuncsMetal;
|
||||
postFuncs = ExtensionPostFuncsMetal;
|
||||
break;
|
||||
}
|
||||
for (auto& ext : g_ExtensionSlots)
|
||||
{
|
||||
|
@ -196,10 +199,10 @@ void CModelShaders::Shutdown()
|
|||
CModelShaders::ShaderPipelines CModelShaders::BuildExtendedShader(const hecl::Backend::ShaderTag& tag,
|
||||
const hecl::Frontend::IR& ir)
|
||||
{
|
||||
auto search = g_ShaderPipelines.find(ir.m_hash);
|
||||
auto search = g_ShaderPipelines.find(tag.val64());
|
||||
if (search != g_ShaderPipelines.cend())
|
||||
return search->second;
|
||||
ShaderPipelines& newPipelines = g_ShaderPipelines[ir.m_hash];
|
||||
ShaderPipelines& newPipelines = g_ShaderPipelines[tag.val64()];
|
||||
newPipelines = std::make_shared<ShaderPipelinesData>();
|
||||
int idx = 0;
|
||||
for (const auto& ext : g_ExtensionSlots)
|
||||
|
|
|
@ -266,7 +266,6 @@ CMain::BooSetter::BooSetter(boo::IGraphicsDataFactory* factory,
|
|||
const boo::ObjToken<boo::ITextureR>& spareTex)
|
||||
{
|
||||
CGraphics::InitializeBoo(factory, cmdQ, spareTex);
|
||||
CStopwatch sw;
|
||||
CParticleSwooshShaders::Initialize();
|
||||
CThermalColdFilter::Initialize();
|
||||
CThermalHotFilter::Initialize();
|
||||
|
@ -288,7 +287,6 @@ CMain::BooSetter::BooSetter(boo::IGraphicsDataFactory* factory,
|
|||
CScanLinesFilter::Initialize();
|
||||
CRandomStaticFilter::Initialize();
|
||||
CNESShader::Initialize();
|
||||
sw.report("shad init");
|
||||
}
|
||||
|
||||
void CMain::RegisterResourceTweaks()
|
||||
|
|
2
hecl
2
hecl
|
@ -1 +1 @@
|
|||
Subproject commit 2aa3182734c78a67637c6bfcee6d39a33cd5ff61
|
||||
Subproject commit 62e5d91fe64ecbdd7417c126b0134f266b900c4f
|
Loading…
Reference in New Issue