mirror of https://github.com/AxioDL/metaforce.git
Lots of reverse naming functionality added
This commit is contained in:
parent
fa8b48d43e
commit
d46f44cefa
|
@ -1024,6 +1024,36 @@ bool ReadCMDLToBlender(HECL::BlenderConnection& conn,
|
|||
return true;
|
||||
}
|
||||
|
||||
template <class PAKRouter, class MaterialSet>
|
||||
void NameCMDL(Athena::io::IStreamReader& reader,
|
||||
PAKRouter& pakRouter,
|
||||
typename PAKRouter::EntryType& entry,
|
||||
const SpecBase& dataspec)
|
||||
{
|
||||
Header head;
|
||||
head.read(reader);
|
||||
std::string bestName = HECL::Format("CMDL_%s", entry.id.toString().c_str());
|
||||
|
||||
/* Pre-read pass to determine maximum used vert indices */
|
||||
atUint32 matSecCount = 0;
|
||||
if (head.matSetCount)
|
||||
matSecCount = MaterialSet::OneSection() ? 1 : head.matSetCount;
|
||||
atUint32 lastDlSec = head.secCount;
|
||||
for (size_t s=0 ; s<lastDlSec ; ++s)
|
||||
{
|
||||
atUint64 secStart = reader.position();
|
||||
if (s < matSecCount)
|
||||
{
|
||||
MaterialSet matSet;
|
||||
matSet.read(reader);
|
||||
matSet.nameTextures(pakRouter, bestName.c_str(), s);
|
||||
}
|
||||
|
||||
if (s < head.secCount - 1)
|
||||
reader.seek(secStart + head.secSizes[s], Athena::Begin);
|
||||
}
|
||||
}
|
||||
|
||||
static void WriteDLVal(Athena::io::FileWriter& writer, GX::AttrType type, atUint32 val)
|
||||
{
|
||||
switch (type)
|
||||
|
|
|
@ -50,7 +50,7 @@ class UniqueID32 : public BigYAML
|
|||
uint32_t m_id = 0xffffffff;
|
||||
public:
|
||||
Delete expl;
|
||||
operator bool() const {return m_id != 0xffffffff;}
|
||||
operator bool() const {return m_id != 0xffffffff && m_id != 0;}
|
||||
void read(Athena::io::IStreamReader& reader)
|
||||
{m_id = reader.readUint32Big();}
|
||||
void write(Athena::io::IStreamWriter& writer) const
|
||||
|
@ -89,7 +89,7 @@ class UniqueID64 : public BigYAML
|
|||
uint64_t m_id = 0xffffffffffffffff;
|
||||
public:
|
||||
Delete expl;
|
||||
operator bool() const {return m_id != 0xffffffffffffffff;}
|
||||
operator bool() const {return m_id != 0xffffffffffffffff && m_id != 0;}
|
||||
void read(Athena::io::IStreamReader& reader)
|
||||
{m_id = reader.readUint64Big();}
|
||||
void write(Athena::io::IStreamWriter& writer) const
|
||||
|
@ -136,7 +136,7 @@ public:
|
|||
Delete expl;
|
||||
UniqueID128() {m_id[0]=0xffffffffffffffff; m_id[1]=0xffffffffffffffff;}
|
||||
operator bool() const
|
||||
{return m_id[0] != 0xffffffffffffffff && m_id[1] != 0xffffffffffffffff;}
|
||||
{return m_id[0] != 0xffffffffffffffff && m_id[0] != 0 && m_id[1] != 0xffffffffffffffff && m_id[1] != 0;}
|
||||
void read(Athena::io::IStreamReader& reader)
|
||||
{
|
||||
m_id[0] = reader.readUint64Big();
|
||||
|
|
|
@ -206,6 +206,8 @@ struct ResExtractor
|
|||
std::function<void(const HECL::SystemChar*)>)> func_b;
|
||||
const HECL::SystemChar* fileExts[4];
|
||||
unsigned weight;
|
||||
std::function<void(const SpecBase&, PAKEntryReadStream&, PAKRouter<PAKBRIDGE>&,
|
||||
typename PAKBRIDGE::PAKType::Entry&)> func_name;
|
||||
};
|
||||
|
||||
/* Level hierarchy representation */
|
||||
|
@ -304,18 +306,41 @@ public:
|
|||
}
|
||||
|
||||
/* Add RigPairs to global map */
|
||||
bridge.addCMDLRigPairs(m_cmdlRigs);
|
||||
bridge.addCMDLRigPairs(*this, m_cmdlRigs);
|
||||
|
||||
progress(++count / bridgesSz);
|
||||
++bridgeIdx;
|
||||
}
|
||||
|
||||
/* TEMP: CSV dump */
|
||||
for (auto& entry : m_uniqueEntries)
|
||||
{
|
||||
const NOD::Node* node;
|
||||
EntryType* ent = (EntryType*)lookupEntry(entry.first, &node);
|
||||
ResExtractor<BRIDGETYPE> extractor = BRIDGETYPE::LookupExtractor(*ent);
|
||||
if (extractor.func_name)
|
||||
{
|
||||
PAKEntryReadStream s = ent->beginReadStream(*node);
|
||||
extractor.func_name(m_dataSpec, s, *this, *ent);
|
||||
}
|
||||
}
|
||||
for (const auto& entry : m_sharedEntries)
|
||||
{
|
||||
const NOD::Node* node;
|
||||
EntryType* ent = (EntryType*)lookupEntry(entry.first, &node);
|
||||
ResExtractor<BRIDGETYPE> extractor = BRIDGETYPE::LookupExtractor(*ent);
|
||||
if (extractor.func_name)
|
||||
{
|
||||
PAKEntryReadStream s = ent->beginReadStream(*node);
|
||||
extractor.func_name(m_dataSpec, s, *this, *ent);
|
||||
}
|
||||
}
|
||||
|
||||
FILE* fp = HECL::Fopen(_S("/home/jacko/Desktop/mp_res.txt"), _S("w"));
|
||||
for (const auto& entry : m_uniqueEntries)
|
||||
for (auto& entry : m_uniqueEntries)
|
||||
{
|
||||
const EntryType* ent = entry.second.second;
|
||||
fprintf(fp, "%s\t0x%s\t\t", ent->type.toString().c_str(), entry.first.toString().c_str());
|
||||
fprintf(fp, "%s\t0x%s\t%s\t", ent->type.toString().c_str(), entry.first.toString().c_str(), ent->name.c_str());
|
||||
switch (ent->unique.m_type)
|
||||
{
|
||||
case UniqueResult::UNIQUE_NOTFOUND:
|
||||
|
@ -343,7 +368,7 @@ public:
|
|||
for (const auto& entry : m_sharedEntries)
|
||||
{
|
||||
const EntryType* ent = entry.second.second;
|
||||
fprintf(fp, "%s\t0x%s\t\t\n", ent->type.toString().c_str(), entry.first.toString().c_str());
|
||||
fprintf(fp, "%s\t0x%s\t%s\t\n", ent->type.toString().c_str(), entry.first.toString().c_str(), ent->name.c_str());
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
|
|
|
@ -66,6 +66,14 @@ struct CMDL
|
|||
return conn.saveBlend();
|
||||
}
|
||||
|
||||
static void Name(const SpecBase& dataSpec,
|
||||
PAKEntryReadStream& rs,
|
||||
PAKRouter<PAKBridge>& pakRouter,
|
||||
PAK::Entry& entry)
|
||||
{
|
||||
DNACMDL::NameCMDL<PAKRouter<PAKBridge>, MaterialSet>(rs, pakRouter, entry, dataSpec);
|
||||
}
|
||||
|
||||
static bool Cook(const HECL::ProjectPath& outPath,
|
||||
const HECL::ProjectPath& inPath,
|
||||
const DNACMDL::Mesh& mesh)
|
||||
|
|
|
@ -360,7 +360,6 @@ struct MaterialSet : BigDNA
|
|||
case ANIM_HSTRIP:
|
||||
case ANIM_VSTRIP:
|
||||
return __isz + 20;
|
||||
break;
|
||||
case ANIM_ROTATION:
|
||||
case ANIM_MODE_WHO_MUST_NOT_BE_NAMED:
|
||||
return __isz + 12;
|
||||
|
@ -411,6 +410,49 @@ struct MaterialSet : BigDNA
|
|||
DNACMDL::ReadMaterialSetToBlender_1_2(os, *this, pakRouter, entry, setIdx);
|
||||
}
|
||||
|
||||
template <class PAKRouter>
|
||||
void nameTextures(PAKRouter& pakRouter, const char* prefix, int setIdx) const
|
||||
{
|
||||
int matIdx = 0;
|
||||
for (const Material& mat : materials)
|
||||
{
|
||||
int stageIdx = 0;
|
||||
for (const Material::TEVStage& stage : mat.tevStages)
|
||||
{
|
||||
const Material::TEVStageTexInfo& texInfo = mat.tevStageTexInfo[stageIdx];
|
||||
if (texInfo.texSlot == 0xff)
|
||||
{
|
||||
++stageIdx;
|
||||
continue;
|
||||
}
|
||||
const NOD::Node* node;
|
||||
typename PAKRouter::EntryType* texEntry = (typename PAKRouter::EntryType*)
|
||||
pakRouter.lookupEntry(head.textureIDs[mat.textureIdxs[texInfo.texSlot]], &node);
|
||||
if (texEntry->name.size())
|
||||
{
|
||||
if (texEntry->name.size() < 5 || texEntry->name.compare(0, 5, "mult_"))
|
||||
texEntry->name = "mult_" + texEntry->name;
|
||||
++stageIdx;
|
||||
continue;
|
||||
}
|
||||
if (setIdx < 0)
|
||||
texEntry->name = HECL::Format("%s_%d_%d", prefix, matIdx, stageIdx);
|
||||
else
|
||||
texEntry->name = HECL::Format("%s_%d_%d_%d", prefix, setIdx, matIdx, stageIdx);
|
||||
|
||||
if (mat.flags.lightmap() && stageIdx == 0)
|
||||
{
|
||||
texEntry->name += "light";
|
||||
++stageIdx;
|
||||
continue;
|
||||
}
|
||||
|
||||
++stageIdx;
|
||||
}
|
||||
++matIdx;
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -42,9 +42,10 @@ PAKBridge::PAKBridge(HECL::Database::Project& project,
|
|||
PAKEntryReadStream rs = entry.beginReadStream(m_node);
|
||||
MLVL mlvl;
|
||||
mlvl.read(rs);
|
||||
const PAK::Entry* nameEnt = m_pak.lookupEntry(mlvl.worldNameId);
|
||||
PAK::Entry* nameEnt = (PAK::Entry*)m_pak.lookupEntry(mlvl.worldNameId);
|
||||
if (nameEnt)
|
||||
{
|
||||
nameEnt->name = entry.name + "_name";
|
||||
PAKEntryReadStream rs = nameEnt->beginReadStream(m_node);
|
||||
STRG mlvlName;
|
||||
mlvlName.read(rs);
|
||||
|
@ -92,10 +93,11 @@ void PAKBridge::build()
|
|||
unsigned layerIdx = 0;
|
||||
|
||||
/* Make MAPW available to lookup MAPAs */
|
||||
const PAK::Entry* worldMapEnt = m_pak.lookupEntry(mlvl.worldMap);
|
||||
PAK::Entry* worldMapEnt = (PAK::Entry*)m_pak.lookupEntry(mlvl.worldMap);
|
||||
std::vector<UniqueID32> mapw;
|
||||
if (worldMapEnt)
|
||||
{
|
||||
worldMapEnt->name = entry.name + "_mapw";
|
||||
PAKEntryReadStream rs = worldMapEnt->beginReadStream(m_node);
|
||||
rs.seek(8, Athena::Current);
|
||||
atUint32 areaCount = rs.readUint32Big();
|
||||
|
@ -104,13 +106,21 @@ void PAKBridge::build()
|
|||
mapw.emplace_back(rs);
|
||||
}
|
||||
|
||||
PAK::Entry* savwEnt = (PAK::Entry*)m_pak.lookupEntry(mlvl.saveWorldId);
|
||||
if (savwEnt)
|
||||
savwEnt->name = entry.name + "_savw";
|
||||
|
||||
PAK::Entry* skyEnt = (PAK::Entry*)m_pak.lookupEntry(mlvl.worldSkyboxId);
|
||||
if (skyEnt)
|
||||
skyEnt->name = entry.name + "_skybox";
|
||||
|
||||
/* Index areas */
|
||||
unsigned ai = 0;
|
||||
for (const MLVL::Area& area : mlvl.areas)
|
||||
{
|
||||
Level::Area& areaDeps = level.areas[area.areaMREAId];
|
||||
MLVL::LayerFlags& layerFlags = mlvl.layerFlags[ai];
|
||||
const PAK::Entry* areaNameEnt = m_pak.lookupEntry(area.areaNameId);
|
||||
PAK::Entry* areaNameEnt = (PAK::Entry*)m_pak.lookupEntry(area.areaNameId);
|
||||
if (areaNameEnt)
|
||||
{
|
||||
STRG areaName;
|
||||
|
@ -141,6 +151,19 @@ void PAKBridge::build()
|
|||
HECL::SNPrintf(num, 16, _S("%02u "), ai);
|
||||
areaDeps.name = num + areaDeps.name;
|
||||
|
||||
std::string lowerName(areaDeps.name);
|
||||
for (char& ch : lowerName)
|
||||
{
|
||||
ch = tolower(ch);
|
||||
if (ch == ' ')
|
||||
ch = '_';
|
||||
}
|
||||
if (areaNameEnt)
|
||||
areaNameEnt->name = lowerName + "_name";
|
||||
PAK::Entry* areaEnt = (PAK::Entry*)m_pak.lookupEntry(area.areaMREAId);
|
||||
if (areaEnt)
|
||||
areaEnt->name = lowerName;
|
||||
|
||||
areaDeps.layers.reserve(area.depLayerCount-1);
|
||||
unsigned r=0;
|
||||
for (unsigned l=1 ; l<area.depLayerCount ; ++l)
|
||||
|
@ -182,7 +205,8 @@ void PAKBridge::build()
|
|||
}
|
||||
}
|
||||
|
||||
void PAKBridge::addCMDLRigPairs(std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void PAKBridge::addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
for (const std::pair<UniqueID32, PAK::Entry*>& entry : m_pak.m_idMap)
|
||||
{
|
||||
|
@ -194,9 +218,33 @@ void PAKBridge::addCMDLRigPairs(std::unordered_map<UniqueID32, std::pair<UniqueI
|
|||
for (const ANCS::CharacterSet::CharacterInfo& ci : ancs.characterSet.characters)
|
||||
{
|
||||
addTo[ci.cmdl] = std::make_pair(ci.cskr, ci.cinf);
|
||||
if (ci.cmdlOverlay)
|
||||
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)
|
||||
{
|
||||
addTo[ci.cmdlOverlay] = std::make_pair(ci.cskrOverlay, ci.cinf);
|
||||
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());
|
||||
}
|
||||
}
|
||||
std::map<atUint32, DNAANCS::AnimationResInfo<UniqueID32>> animInfo;
|
||||
ancs.getAnimationResInfo(animInfo);
|
||||
for (auto& ae : animInfo)
|
||||
{
|
||||
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());
|
||||
}
|
||||
}
|
||||
else if (entry.second->type == FOURCC('MREA'))
|
||||
{
|
||||
PAKEntryReadStream rs = entry.second->beginReadStream(m_node);
|
||||
MREA::AddCMDLRigPairs(rs, pakRouter, addTo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -208,17 +256,17 @@ ResExtractor<PAKBridge> PAKBridge::LookupExtractor(const PAK::Entry& entry)
|
|||
case SBIG('STRG'):
|
||||
return {STRG::Extract, nullptr, {_S(".yaml")}};
|
||||
case SBIG('SCAN'):
|
||||
return {SCAN::Extract, nullptr, {_S(".yaml")}};
|
||||
return {SCAN::Extract, nullptr, {_S(".yaml")}, 0, SCAN::Name};
|
||||
case SBIG('TXTR'):
|
||||
return {TXTR::Extract, nullptr, {_S(".png")}};
|
||||
case SBIG('CMDL'):
|
||||
return {nullptr, CMDL::Extract, {_S(".blend")}, 1};
|
||||
return {nullptr, CMDL::Extract, {_S(".blend")}, 1, CMDL::Name};
|
||||
case SBIG('ANCS'):
|
||||
return {nullptr, ANCS::Extract, {_S(".yaml"), _S(".blend")}, 2};
|
||||
case SBIG('MLVL'):
|
||||
return {nullptr, MLVL::Extract, {_S(".blend")}, 3};
|
||||
case SBIG('MREA'):
|
||||
return {nullptr, MREA::Extract, {_S(".blend")}, 4};
|
||||
return {nullptr, MREA::Extract, {_S(".blend")}, 4, MREA::Name};
|
||||
case SBIG('MAPA'):
|
||||
return {nullptr, MAPA::Extract, {_S(".blend")}, 4};
|
||||
}
|
||||
|
|
|
@ -34,7 +34,8 @@ public:
|
|||
const PAKType& getPAK() const {return m_pak;}
|
||||
const NOD::Node& getNode() const {return m_node;}
|
||||
|
||||
void addCMDLRigPairs(std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const;
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -35,6 +35,26 @@ void MREA::ReadBabeDeadToBlender_1_2(HECL::BlenderConnection::PyOutStream& os,
|
|||
}
|
||||
}
|
||||
|
||||
void MREA::AddCMDLRigPairs(PAKEntryReadStream& rs,
|
||||
PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo)
|
||||
{
|
||||
/* Do extract */
|
||||
Header head;
|
||||
head.read(rs);
|
||||
rs.seekAlign32();
|
||||
|
||||
/* Skip to SCLY */
|
||||
atUint32 curSec = 0;
|
||||
atUint64 secStart = rs.position();
|
||||
while (curSec != head.sclySecIdx)
|
||||
secStart += head.secSizes[curSec++];
|
||||
rs.seek(secStart, Athena::Begin);
|
||||
SCLY scly;
|
||||
scly.read(rs);
|
||||
scly.addCMDLRigPairs(pakRouter, addTo);
|
||||
}
|
||||
|
||||
bool MREA::Extract(const SpecBase& dataSpec,
|
||||
PAKEntryReadStream& rs,
|
||||
const HECL::ProjectPath& outPath,
|
||||
|
@ -159,5 +179,43 @@ bool MREA::Extract(const SpecBase& dataSpec,
|
|||
return conn.saveBlend();
|
||||
}
|
||||
|
||||
void MREA::Name(const SpecBase& dataSpec,
|
||||
PAKEntryReadStream& rs,
|
||||
PAKRouter<PAKBridge>& pakRouter,
|
||||
PAK::Entry& entry)
|
||||
{
|
||||
/* Do extract */
|
||||
Header head;
|
||||
head.read(rs);
|
||||
rs.seekAlign32();
|
||||
|
||||
/* One shared material set for all meshes */
|
||||
atUint64 secStart = rs.position();
|
||||
MaterialSet matSet;
|
||||
matSet.read(rs);
|
||||
matSet.nameTextures(pakRouter, HECL::Format("MREA_%s", entry.id.toString().c_str()).c_str(), -1);
|
||||
rs.seek(secStart + head.secSizes[0], Athena::Begin);
|
||||
|
||||
/* Skip to SCLY */
|
||||
atUint32 curSec = 1;
|
||||
secStart = rs.position();
|
||||
while (curSec != head.sclySecIdx)
|
||||
secStart += head.secSizes[curSec++];
|
||||
rs.seek(secStart, Athena::Begin);
|
||||
SCLY scly;
|
||||
scly.read(rs);
|
||||
scly.nameIDs(pakRouter);
|
||||
|
||||
/* Skip to PATH */
|
||||
while (curSec != head.pathSecIdx)
|
||||
secStart += head.secSizes[curSec++];
|
||||
rs.seek(secStart, Athena::Begin);
|
||||
|
||||
UniqueID32 pathID(rs);
|
||||
const NOD::Node* node;
|
||||
PAK::Entry* pathEnt = (PAK::Entry*)pakRouter.lookupEntry(pathID, &node);
|
||||
pathEnt->name = entry.name + "_path";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -103,6 +103,10 @@ struct MREA
|
|||
static void ReadBabeDeadToBlender_1_2(HECL::BlenderConnection::PyOutStream& os,
|
||||
Athena::io::IStreamReader& rs);
|
||||
|
||||
static void AddCMDLRigPairs(PAKEntryReadStream& rs,
|
||||
PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo);
|
||||
|
||||
static bool Extract(const SpecBase& dataSpec,
|
||||
PAKEntryReadStream& rs,
|
||||
const HECL::ProjectPath& outPath,
|
||||
|
@ -110,6 +114,11 @@ struct MREA
|
|||
const PAK::Entry& entry,
|
||||
bool,
|
||||
std::function<void(const HECL::SystemChar*)>);
|
||||
|
||||
static void Name(const SpecBase& dataSpec,
|
||||
PAKEntryReadStream& rs,
|
||||
PAKRouter<PAKBridge>& pakRouter,
|
||||
PAK::Entry& entry);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -55,7 +55,10 @@ void PAK::read(Athena::io::IStreamReader& reader)
|
|||
{
|
||||
std::unordered_map<UniqueID32, Entry*>::iterator found = m_idMap.find(entry.id);
|
||||
if (found != m_idMap.end())
|
||||
{
|
||||
m_nameMap[entry.name] = found->second;
|
||||
found->second->name = entry.name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -36,6 +36,7 @@ struct PAK : BigDNA
|
|||
Value<atUint32> size;
|
||||
Value<atUint32> offset;
|
||||
UniqueResult unique;
|
||||
std::string name;
|
||||
|
||||
std::unique_ptr<atUint8[]> getBuffer(const NOD::Node& pak, atUint64& szOut) const;
|
||||
inline PAKEntryReadStream beginReadStream(const NOD::Node& pak, atUint64 off=0) const
|
||||
|
@ -52,7 +53,7 @@ struct PAK : BigDNA
|
|||
std::unordered_map<UniqueID32, Entry*> m_idMap;
|
||||
std::unordered_map<std::string, Entry*> m_nameMap;
|
||||
|
||||
inline const Entry* lookupEntry(const UniqueID32& id) const
|
||||
const Entry* lookupEntry(const UniqueID32& id) const
|
||||
{
|
||||
std::unordered_map<UniqueID32, Entry*>::const_iterator result = m_idMap.find(id);
|
||||
if (result != m_idMap.end())
|
||||
|
@ -60,7 +61,7 @@ struct PAK : BigDNA
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
inline const Entry* lookupEntry(const std::string& name) const
|
||||
const Entry* lookupEntry(const std::string& name) const
|
||||
{
|
||||
std::unordered_map<std::string, Entry*>::const_iterator result = m_nameMap.find(name);
|
||||
if (result != m_nameMap.end())
|
||||
|
@ -68,7 +69,7 @@ struct PAK : BigDNA
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
inline std::string bestEntryName(const Entry& entry) const
|
||||
std::string bestEntryName(const Entry& entry) const
|
||||
{
|
||||
/* Prefer named entries first */
|
||||
for (const NameEntry& nentry : m_nameEntries)
|
||||
|
@ -79,7 +80,7 @@ struct PAK : BigDNA
|
|||
return entry.type.toString() + '_' + entry.id.toString();
|
||||
}
|
||||
|
||||
typedef UniqueID32 IDType;
|
||||
using IDType = UniqueID32;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -80,6 +80,29 @@ struct SCAN : BigYAML
|
|||
fclose(fp);
|
||||
return true;
|
||||
}
|
||||
|
||||
static void Name(const SpecBase& dataSpec,
|
||||
PAKEntryReadStream& rs,
|
||||
PAKRouter<PAKBridge>& pakRouter,
|
||||
PAK::Entry& entry)
|
||||
{
|
||||
SCAN scan;
|
||||
scan.read(rs);
|
||||
if (scan.string)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(scan.string);
|
||||
ent->name = HECL::Format("SCAN_%s_strg", entry.id.toString().c_str());
|
||||
}
|
||||
for (int i=0 ; i<4 ; ++i)
|
||||
{
|
||||
const Texture& tex = scan.textures[i];
|
||||
if (tex.texture)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(tex.texture);
|
||||
ent->name = HECL::Format("SCAN_%s_tex%d", entry.id.toString().c_str(), i+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ size_t SCLY::binarySize(size_t __isz) const
|
|||
return __EnumerateSize(__isz, layers);
|
||||
}
|
||||
|
||||
void SCLY::exportToLayerDirectories(const PAK::Entry& entry, PAKRouter<PAKBridge> &pakRouter, bool force)
|
||||
void SCLY::exportToLayerDirectories(const PAK::Entry& entry, PAKRouter<PAKBridge> &pakRouter, bool force) const
|
||||
{
|
||||
for (atUint32 i = 0; i < layerCount; i++)
|
||||
{
|
||||
|
@ -54,6 +54,32 @@ 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
|
||||
{
|
||||
for (const ScriptLayer& layer : layers)
|
||||
layer.addCMDLRigPairs(pakRouter, addTo);
|
||||
}
|
||||
|
||||
void SCLY::ScriptLayer::addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
for (const std::shared_ptr<IScriptObject>& obj : objects)
|
||||
obj->addCMDLRigPairs(pakRouter, addTo);
|
||||
}
|
||||
|
||||
void SCLY::nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
for (const ScriptLayer& layer : layers)
|
||||
layer.nameIDs(pakRouter);
|
||||
}
|
||||
|
||||
void SCLY::ScriptLayer::nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
for (const std::shared_ptr<IScriptObject>& obj : objects)
|
||||
obj->nameIDs(pakRouter);
|
||||
}
|
||||
|
||||
void SCLY::fromYAML(Athena::io::YAMLDocReader& docin)
|
||||
{
|
||||
fourCC = docin.readUint32("fourCC");
|
||||
|
|
|
@ -29,6 +29,9 @@ struct SCLY : BigYAML
|
|||
void read(Athena::io::IStreamReader &rs);
|
||||
void write(Athena::io::IStreamWriter &ws) const;
|
||||
size_t binarySize(size_t __isz) const;
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const;
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const;
|
||||
};
|
||||
Vector<ScriptLayer, DNA_COUNT(layerCount)> layers;
|
||||
|
||||
|
@ -36,7 +39,10 @@ struct SCLY : BigYAML
|
|||
void write(Athena::io::IStreamWriter &ws) const;
|
||||
size_t binarySize(size_t __isz) const;
|
||||
|
||||
void exportToLayerDirectories(const PAK::Entry &, PAKRouter<PAKBridge>&, bool);
|
||||
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 nameIDs(PAKRouter<PAKBridge>& pakRouter) const;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,6 +35,23 @@ struct Actor : IScriptObject
|
|||
Value<bool> unknown12;
|
||||
Value<bool> unknown13;
|
||||
Value<bool> unknown14;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (model)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model);
|
||||
ent->name = name + "_model";
|
||||
}
|
||||
animationParameters.nameANCS(pakRouter, name + "_animp");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,6 +27,23 @@ struct ActorContraption : IScriptObject
|
|||
UniqueID32 particle;
|
||||
DamageInfo damageInfo;
|
||||
Value<bool> active; // needs verification
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (particle)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle);
|
||||
ent->name = name + "_part";
|
||||
}
|
||||
animationParameters.nameANCS(pakRouter, name + "_animp");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,18 @@ struct AmbientAI : IScriptObject
|
|||
Value<atUint32> unknown5;
|
||||
Value<atUint32> unknown6;
|
||||
Value<bool> unknown7;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
animationParameters.nameANCS(pakRouter, name + "_animp");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,6 +26,28 @@ struct AtomicAlpha : IScriptObject
|
|||
Value<float> unknown3;
|
||||
Value<bool> unknown4;
|
||||
Value<bool> unknown5;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (wpsc)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc);
|
||||
ent->name = name + "_wpsc";
|
||||
}
|
||||
if (model)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model);
|
||||
ent->name = name + "_model";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,33 @@ struct AtomicBeta : IScriptObject
|
|||
Value<atUint32> unknown8;
|
||||
Value<atUint32> unknown9;
|
||||
Value<float> unknown10;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (elsc)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(elsc);
|
||||
ent->name = name + "_elsc";
|
||||
}
|
||||
if (wpsc)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc);
|
||||
ent->name = name + "_wpsc";
|
||||
}
|
||||
if (part)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(part);
|
||||
ent->name = name + "_part";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,6 +45,76 @@ struct Babygoth : IScriptObject
|
|||
UniqueID32 texture;
|
||||
Value<atUint32> unknown11;
|
||||
UniqueID32 particle6;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
UniqueID32 cinf = patternedInfo.animationParameters.getCINF(pakRouter);
|
||||
actorParameters.addCMDLRigPairs(addTo, cinf);
|
||||
if (model && skin)
|
||||
addTo[model] = std::make_pair(skin, cinf);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (wpsc1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc1);
|
||||
ent->name = name + "_wpsc1";
|
||||
}
|
||||
if (wpsc2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc2);
|
||||
ent->name = name + "_wpsc2";
|
||||
}
|
||||
if (particle1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1);
|
||||
ent->name = name + "_part1";
|
||||
}
|
||||
if (model)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model);
|
||||
ent->name = name + "_emodel";
|
||||
}
|
||||
if (skin)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(skin);
|
||||
ent->name = name + "_eskin";
|
||||
}
|
||||
if (particle2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle2);
|
||||
ent->name = name + "_part2";
|
||||
}
|
||||
if (particle3)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle3);
|
||||
ent->name = name + "_part3";
|
||||
}
|
||||
if (particle4)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle4);
|
||||
ent->name = name + "_part4";
|
||||
}
|
||||
if (particle5)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle5);
|
||||
ent->name = name + "_part5";
|
||||
}
|
||||
if (texture)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture);
|
||||
ent->name = name + "_tex";
|
||||
}
|
||||
if (particle6)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle6);
|
||||
ent->name = name + "_part6";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,23 @@ struct Beetle : IScriptObject
|
|||
Value<atUint32> unknown4;
|
||||
Value<float> unknown5;
|
||||
Value<float> unknown6;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (model)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model);
|
||||
ent->name = name + "_model";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,53 @@ struct BloodFlower : IScriptObject
|
|||
Value<float> unknown1;
|
||||
UniqueID32 particle5;
|
||||
Value<float> unknown2;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (wpsc1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc1);
|
||||
ent->name = name + "_wpsc1";
|
||||
}
|
||||
if (wpsc2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc2);
|
||||
ent->name = name + "_wpsc2";
|
||||
}
|
||||
if (particle1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1);
|
||||
ent->name = name + "_part1";
|
||||
}
|
||||
if (particle2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle2);
|
||||
ent->name = name + "_part2";
|
||||
}
|
||||
if (particle3)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle3);
|
||||
ent->name = name + "_part3";
|
||||
}
|
||||
if (particle4)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle4);
|
||||
ent->name = name + "_part4";
|
||||
}
|
||||
if (particle5)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle5);
|
||||
ent->name = name + "_part5";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,43 @@ struct Burrower : IScriptObject
|
|||
UniqueID32 particle3;
|
||||
Value<atUint32> unknown; // always FF
|
||||
UniqueID32 particle4;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (wpsc)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc);
|
||||
ent->name = name + "_wpsc";
|
||||
}
|
||||
if (particle1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1);
|
||||
ent->name = name + "_part1";
|
||||
}
|
||||
if (particle2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle2);
|
||||
ent->name = name + "_part2";
|
||||
}
|
||||
if (particle3)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle3);
|
||||
ent->name = name + "_part3";
|
||||
}
|
||||
if (particle4)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle4);
|
||||
ent->name = name + "_part4";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,15 @@ struct CameraFilterKeyframe : IScriptObject
|
|||
Value<float> unknown7;
|
||||
Value<float> unknown8;
|
||||
UniqueID32 texture;
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (texture)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture);
|
||||
ent->name = name + "_texture";
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,6 +43,33 @@ struct ChozoGhost : IScriptObject
|
|||
Value<float> unknown11;
|
||||
Value<atUint32> unknown12;
|
||||
Value<atUint32> unknown13;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (wpsc1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc1);
|
||||
ent->name = name + "_wpsc1";
|
||||
}
|
||||
if (wpsc2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc2);
|
||||
ent->name = name + "_wpsc2";
|
||||
}
|
||||
if (particle)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle);
|
||||
ent->name = name + "_part";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,25 @@ struct DamageableTrigger : IScriptObject
|
|||
Value<bool> lockOn;
|
||||
Value<bool> active;
|
||||
VisorParameters visorParameters;
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (texture1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture1);
|
||||
ent->name = name + "_texture1";
|
||||
}
|
||||
if (texture2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture2);
|
||||
ent->name = name + "_texture2";
|
||||
}
|
||||
if (texture3)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture3);
|
||||
ent->name = name + "_texture3";
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,21 @@ struct Debris : IScriptObject
|
|||
Value<atVec3f> unknown9;
|
||||
Value<bool> unknown10;
|
||||
Value<bool> unknown11;
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (model)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model);
|
||||
ent->name = name + "_model";
|
||||
}
|
||||
if (particle)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle);
|
||||
ent->name = name + "_part";
|
||||
}
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,6 +51,31 @@ struct DebrisExtended : IScriptObject
|
|||
Value<bool> unknown28;
|
||||
Value<bool> unknown29;
|
||||
Value<bool> unknown30;
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (model)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model);
|
||||
ent->name = name + "_model";
|
||||
}
|
||||
if (particle1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1);
|
||||
ent->name = name + "_part1";
|
||||
}
|
||||
if (particle2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle2);
|
||||
ent->name = name + "_part2";
|
||||
}
|
||||
if (particle3)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle3);
|
||||
ent->name = name + "_part3";
|
||||
}
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,6 +26,18 @@ struct DoorArea : IScriptObject
|
|||
Value<bool> unknown6;
|
||||
Value<float> unknown7;
|
||||
Value<bool> unknown8;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
animationParameters.nameANCS(pakRouter, name + "_animp");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,6 +57,28 @@ struct Drone : IScriptObject
|
|||
Value<float> unknon29;
|
||||
Value<atUint32> sound; // verification needed
|
||||
Value<bool> unknown30;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (crsc)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(crsc);
|
||||
ent->name = name + "_crsc";
|
||||
}
|
||||
flareDefinition1.nameIDs(pakRouter, name + "_flare1");
|
||||
flareDefinition2.nameIDs(pakRouter, name + "_flare2");
|
||||
flareDefinition3.nameIDs(pakRouter, name + "_flare3");
|
||||
flareDefinition4.nameIDs(pakRouter, name + "_flare4");
|
||||
flareDefinition5.nameIDs(pakRouter, name + "_flare5");
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,6 +36,20 @@ struct Effect : IScriptObject
|
|||
Value<bool> unknown16;
|
||||
Value<bool> unknown17;
|
||||
LightParameters lightParameters;
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (part)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(part);
|
||||
ent->name = name + "_part";
|
||||
}
|
||||
if (elsc)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(elsc);
|
||||
ent->name = name + "_elsc";
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,15 @@ struct ElectroMagneticPulse : IScriptObject
|
|||
Value<float> unknown7;
|
||||
Value<float> unknown8;
|
||||
UniqueID32 particle;
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (particle)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle);
|
||||
ent->name = name + "_part";
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,6 +54,66 @@ struct ElitePirate : IScriptObject
|
|||
Value<atUint32> soundID5;
|
||||
Value<bool> unknown17;
|
||||
Value<bool> unknown18;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters1.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters2.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (particle1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1);
|
||||
ent->name = name + "_part1";
|
||||
}
|
||||
if (particle2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle2);
|
||||
ent->name = name + "_part2";
|
||||
}
|
||||
if (model)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model);
|
||||
ent->name = name + "_model";
|
||||
}
|
||||
if (particle3)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle3);
|
||||
ent->name = name + "_part3";
|
||||
}
|
||||
if (particle4)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle4);
|
||||
ent->name = name + "_part4";
|
||||
}
|
||||
if (particle5)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle5);
|
||||
ent->name = name + "_part5";
|
||||
}
|
||||
if (particle6)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle6);
|
||||
ent->name = name + "_part6";
|
||||
}
|
||||
if (particle7)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle7);
|
||||
ent->name = name + "_part7";
|
||||
}
|
||||
if (elsc)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(elsc);
|
||||
ent->name = name + "_elsc";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters1.nameIDs(pakRouter, name + "_actp1");
|
||||
actorParameters2.nameIDs(pakRouter, name + "_actp2");
|
||||
animationParameters.nameANCS(pakRouter, name + "_animp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,38 @@ struct EnergyBall : IScriptObject
|
|||
UniqueID32 particle2;
|
||||
DamageInfo damageInfo2;
|
||||
Value<float> unknown6;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (texture)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture);
|
||||
ent->name = name + "_texture";
|
||||
}
|
||||
if (particle1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1);
|
||||
ent->name = name + "_part1";
|
||||
}
|
||||
if (particle2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle2);
|
||||
ent->name = name + "_part2";
|
||||
}
|
||||
if (elsc)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(elsc);
|
||||
ent->name = name + "_elsc";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,43 @@ struct Eyeball : IScriptObject
|
|||
Value<atUint32> unknown7; // always ff
|
||||
Value<atUint32> unknown8;
|
||||
Value<bool> unknown9;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (wpsc)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc);
|
||||
ent->name = name + "_wpsc";
|
||||
}
|
||||
if (particle1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1);
|
||||
ent->name = name + "_part1";
|
||||
}
|
||||
if (particle2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle2);
|
||||
ent->name = name + "_part2";
|
||||
}
|
||||
if (texture1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture1);
|
||||
ent->name = name + "_tex1";
|
||||
}
|
||||
if (texture2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture2);
|
||||
ent->name = name + "_tex2";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,18 @@ struct FireFlea : IScriptObject
|
|||
Value<bool> unknown1;
|
||||
Value<bool> unknown2;
|
||||
Value<float> unknown3;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,6 +48,16 @@ struct FishCloud : IScriptObject
|
|||
Value<atUint32> unknown28;
|
||||
Value<bool> unknown29;
|
||||
Value<bool> unknown30;
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (model)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model);
|
||||
ent->name = name + "_model";
|
||||
}
|
||||
animationParameters.nameANCS(pakRouter, name + "_animp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,6 +35,41 @@ struct Flaahgra : IScriptObject
|
|||
Value<float> unknown7;
|
||||
AnimationParameters animationParameters;
|
||||
UniqueID32 dependencyGroup;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters1.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
actorParameters2.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (wpsc1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc1);
|
||||
ent->name = name + "_wpsc1";
|
||||
}
|
||||
if (wpsc2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc2);
|
||||
ent->name = name + "_wpsc2";
|
||||
}
|
||||
if (particle)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle);
|
||||
ent->name = name + "_part";
|
||||
}
|
||||
if (dependencyGroup)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(dependencyGroup);
|
||||
ent->name = name + "_dgrp";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters1.nameIDs(pakRouter, name + "_actp1");
|
||||
actorParameters2.nameIDs(pakRouter, name + "_actp2");
|
||||
animationParameters.nameANCS(pakRouter, name + "_animp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,6 +18,18 @@ struct FlaahgraTentacle : IScriptObject
|
|||
Value<atVec3f> scale;
|
||||
PatternedInfo patternedInfo;
|
||||
ActorParameters actorParameters;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,18 @@ struct FlickerBat : IScriptObject
|
|||
Value<bool> unknown2;
|
||||
Value<bool> unknown3;
|
||||
Value<bool> unknown4;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,6 +48,53 @@ struct FlyingPirate : IScriptObject
|
|||
Value<float> unknown18;
|
||||
Value<float> unknown19;
|
||||
Value<float> unknown20;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (wpsc1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc1);
|
||||
ent->name = name + "_wpsc1";
|
||||
}
|
||||
if (wpsc2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc2);
|
||||
ent->name = name + "_wpsc2";
|
||||
}
|
||||
if (wpsc3)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc3);
|
||||
ent->name = name + "_wpsc3";
|
||||
}
|
||||
if (particle1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1);
|
||||
ent->name = name + "_part1";
|
||||
}
|
||||
if (particle2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle2);
|
||||
ent->name = name + "_part2";
|
||||
}
|
||||
if (particle3)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle3);
|
||||
ent->name = name + "_part3";
|
||||
}
|
||||
if (particle4)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle4);
|
||||
ent->name = name + "_part4";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,18 @@ struct Geemer : IScriptObject
|
|||
Value<atUint32> unknown8;
|
||||
Value<atUint32> unknown9;
|
||||
Value<atUint32> unknown10;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,6 +60,63 @@ struct GunTurret : IScriptObject
|
|||
Value<atUint32> unknown28;
|
||||
Value<float> unknown29;
|
||||
Value<bool> unknown30;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (unknown18)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(unknown18);
|
||||
ent->name = name + "_unknown18";
|
||||
}
|
||||
if (model)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model);
|
||||
ent->name = name + "_model";
|
||||
}
|
||||
if (particle1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1);
|
||||
ent->name = name + "_part1";
|
||||
}
|
||||
if (particle2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle2);
|
||||
ent->name = name + "_part2";
|
||||
}
|
||||
if (particle3)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle3);
|
||||
ent->name = name + "_part3";
|
||||
}
|
||||
if (particle4)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle4);
|
||||
ent->name = name + "_part4";
|
||||
}
|
||||
if (particle5)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle5);
|
||||
ent->name = name + "_part5";
|
||||
}
|
||||
if (particle6)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle6);
|
||||
ent->name = name + "_part6";
|
||||
}
|
||||
if (particle7)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle7);
|
||||
ent->name = name + "_part7";
|
||||
}
|
||||
animationParameters.nameANCS(pakRouter, name + "_animp");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,6 +18,15 @@ struct HUDMemo : IScriptObject
|
|||
Value<atUint32> memoType;
|
||||
UniqueID32 message;
|
||||
Value<bool> active;
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (message)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(message);
|
||||
ent->name = name + "_message";
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef __DNAMP1_SCRIPTOBJECT_HPP
|
||||
#define __DNAMP1_SCRIPTOBJECT_HPP
|
||||
#include "../../DNACommon/DNACommon.hpp"
|
||||
#include "../DNAMP1.hpp"
|
||||
#include <stdio.h>
|
||||
|
||||
namespace Retro
|
||||
|
@ -28,6 +29,10 @@ struct IScriptObject : BigYAML
|
|||
virtual ~IScriptObject()
|
||||
{
|
||||
}
|
||||
|
||||
virtual void addCMDLRigPairs(PAKRouter<PAKBridge>&,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>&) const {}
|
||||
virtual void nameIDs(PAKRouter<PAKBridge>& pakRouter) const {}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,6 +49,68 @@ struct IceSheegoth : IScriptObject
|
|||
UniqueID32 particle6;
|
||||
Value<bool> unknown12;
|
||||
Value<bool> unknown13;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (wpsc1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc1);
|
||||
ent->name = name + "_wpsc1";
|
||||
}
|
||||
if (wpsc2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc2);
|
||||
ent->name = name + "_wpsc2";
|
||||
}
|
||||
if (particle1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1);
|
||||
ent->name = name + "_part1";
|
||||
}
|
||||
if (particle2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle2);
|
||||
ent->name = name + "_part2";
|
||||
}
|
||||
if (particle3)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle3);
|
||||
ent->name = name + "_part3";
|
||||
}
|
||||
if (particle4)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle4);
|
||||
ent->name = name + "_part4";
|
||||
}
|
||||
if (particle5)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle5);
|
||||
ent->name = name + "_part5";
|
||||
}
|
||||
if (elsc)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(elsc);
|
||||
ent->name = name + "_elsc";
|
||||
}
|
||||
if (texture)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture);
|
||||
ent->name = name + "_texture";
|
||||
}
|
||||
if (particle6)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle6);
|
||||
ent->name = name + "_part6";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,18 @@ struct IceZoomer : IScriptObject
|
|||
Value<atUint32> unknown8;
|
||||
DamageVulnerability damageVulnerabilty;
|
||||
Value<float> unknown9;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,18 @@ struct JellyZap : IScriptObject
|
|||
Value<float> unknown11;
|
||||
Value<float> unknown12;
|
||||
Value<bool> unknown13;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,6 +44,36 @@ struct Magdolite : IScriptObject
|
|||
Value<float> unknown7;
|
||||
Value<float> unknown8;
|
||||
Value<float> unknown9;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
UniqueID32 cinf = patternedInfo.animationParameters.getCINF(pakRouter);
|
||||
actorParameters.addCMDLRigPairs(addTo, cinf);
|
||||
if (model && skin)
|
||||
addTo[model] = std::make_pair(skin, cinf);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (model)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model);
|
||||
ent->name = name + "_emodel";
|
||||
}
|
||||
if (skin)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(skin);
|
||||
ent->name = name + "_eskin";
|
||||
}
|
||||
if (magdoliteParameters.particle)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(magdoliteParameters.particle);
|
||||
ent->name = name + "_part";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,18 @@ struct MetareeAlpha : IScriptObject
|
|||
Value<float> unknown3;
|
||||
Value<float> unknown4;
|
||||
Value<float> unknown5;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,22 @@ struct MetroidAlpha : IScriptObject
|
|||
AnimationParameters animationParameters3;
|
||||
AnimationParameters animationParameters4;
|
||||
Value<bool> unknown8;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
animationParameters1.nameANCS(pakRouter, name + "_animp1");
|
||||
animationParameters2.nameANCS(pakRouter, name + "_animp2");
|
||||
animationParameters3.nameANCS(pakRouter, name + "_animp3");
|
||||
animationParameters4.nameANCS(pakRouter, name + "_animp4");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,6 +35,43 @@ struct MetroidBeta : IScriptObject
|
|||
UniqueID32 particle3;
|
||||
UniqueID32 particle4;
|
||||
Value<bool> unknown10;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (particle1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1);
|
||||
ent->name = name + "_part1";
|
||||
}
|
||||
if (particle2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle2);
|
||||
ent->name = name + "_part2";
|
||||
}
|
||||
if (particle3)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle3);
|
||||
ent->name = name + "_part3";
|
||||
}
|
||||
if (particle4)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle4);
|
||||
ent->name = name + "_part4";
|
||||
}
|
||||
if (swhc)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(swhc);
|
||||
ent->name = name + "_swhc";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -125,9 +125,58 @@ struct MetroidPrimeStage1 : IScriptObject
|
|||
Value<atUint32> unknown6;
|
||||
Value<atUint32> unknown7;
|
||||
Value<atUint32> unknown8;
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter, const std::string& name) const
|
||||
{
|
||||
if (unknown1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(unknown1);
|
||||
ent->name = name + "_unk1";
|
||||
}
|
||||
if (unknown3)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(unknown3);
|
||||
ent->name = name + "_unk3";
|
||||
}
|
||||
if (unknown4)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(unknown4);
|
||||
ent->name = name + "_unk4";
|
||||
}
|
||||
}
|
||||
} primeStruct5;
|
||||
Value<float> unknown14;
|
||||
DamageInfo damageInfo2;
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter, const std::string& name) const
|
||||
{
|
||||
if (particle1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1);
|
||||
ent->name = name + "_part1";
|
||||
}
|
||||
if (particle2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle2);
|
||||
ent->name = name + "_part2";
|
||||
}
|
||||
if (texture1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture1);
|
||||
ent->name = name + "_tex1";
|
||||
}
|
||||
if (texture2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture2);
|
||||
ent->name = name + "_tex2";
|
||||
}
|
||||
if (wpsc)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc);
|
||||
ent->name = name + "_wpsc";
|
||||
}
|
||||
primeStruct5.nameIDs(pakRouter, name + "_prime5");
|
||||
}
|
||||
} primeStruct4_1, primeStruct4_2, primeStruct4_3, primeStruct4_4;
|
||||
|
||||
UniqueID32 wpsc1;
|
||||
|
@ -163,7 +212,94 @@ struct MetroidPrimeStage1 : IScriptObject
|
|||
Value<atUint32> unknown2;
|
||||
Value<atUint32> unknown3;
|
||||
} primeStruct6_1, primeStruct6_2, primeStruct6_3, primeStruct6_4;
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter, const std::string& name) const
|
||||
{
|
||||
if (particle1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1);
|
||||
ent->name = name + "_part1";
|
||||
}
|
||||
if (particle2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle2);
|
||||
ent->name = name + "_part2";
|
||||
}
|
||||
if (particle3)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle3);
|
||||
ent->name = name + "_part3";
|
||||
}
|
||||
if (particle4)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle4);
|
||||
ent->name = name + "_part4";
|
||||
}
|
||||
if (particle5)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle5);
|
||||
ent->name = name + "_part5";
|
||||
}
|
||||
if (particle6)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle6);
|
||||
ent->name = name + "_part6";
|
||||
}
|
||||
if (particle7)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle7);
|
||||
ent->name = name + "_part7";
|
||||
}
|
||||
if (particle8)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle8);
|
||||
ent->name = name + "_part8";
|
||||
}
|
||||
if (swhc)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(swhc);
|
||||
ent->name = name + "_swhc";
|
||||
}
|
||||
if (texture1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture1);
|
||||
ent->name = name + "_tex1";
|
||||
}
|
||||
if (texture2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture2);
|
||||
ent->name = name + "_tex2";
|
||||
}
|
||||
if (wpsc1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc1);
|
||||
ent->name = name + "_wpsc1";
|
||||
}
|
||||
if (wpsc2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc2);
|
||||
ent->name = name + "_wpsc2";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
primeStruct4_1.nameIDs(pakRouter, name + "_prime41");
|
||||
primeStruct4_2.nameIDs(pakRouter, name + "_prime42");
|
||||
primeStruct4_3.nameIDs(pakRouter, name + "_prime43");
|
||||
primeStruct4_4.nameIDs(pakRouter, name + "_prime44");
|
||||
}
|
||||
} massivePrimeStruct;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
massivePrimeStruct.actorParameters.addCMDLRigPairs(addTo,
|
||||
massivePrimeStruct.patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
massivePrimeStruct.nameIDs(pakRouter, name + "_massiveStruct");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,33 @@ struct MetroidPrimeStage2 : IScriptObject
|
|||
UniqueID32 elsc;
|
||||
Value<atUint32> unknown;
|
||||
UniqueID32 particle2;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (particle1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1);
|
||||
ent->name = name + "_part1";
|
||||
}
|
||||
if (particle2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle2);
|
||||
ent->name = name + "_part2";
|
||||
}
|
||||
if (elsc)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(elsc);
|
||||
ent->name = name + "_elsc";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,6 +18,15 @@ struct Midi : IScriptObject
|
|||
Value<float> unknown2;
|
||||
Value<float> unknown3;
|
||||
Value<atUint32> unknown4;
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (song)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(song);
|
||||
ent->name = name + "_song";
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,38 @@ struct NewIntroBoss : IScriptObject
|
|||
UniqueID32 particle2;
|
||||
UniqueID32 texture1;
|
||||
UniqueID32 texture2;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (particle1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1);
|
||||
ent->name = name + "_part1";
|
||||
}
|
||||
if (particle2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle2);
|
||||
ent->name = name + "_part2";
|
||||
}
|
||||
if (texture1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture1);
|
||||
ent->name = name + "_tex1";
|
||||
}
|
||||
if (texture2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture2);
|
||||
ent->name = name + "_tex2";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -191,6 +191,18 @@ struct Oculus : IScriptObject
|
|||
{
|
||||
return "Retro::DNAMP1::Oculus";
|
||||
}
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,6 +57,83 @@ struct OmegaPirate : IScriptObject
|
|||
UniqueID32 model2;
|
||||
UniqueID32 skin;
|
||||
UniqueID32 rig;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) 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);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (particle1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1);
|
||||
ent->name = name + "_part1";
|
||||
}
|
||||
if (particle2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle2);
|
||||
ent->name = name + "_part2";
|
||||
}
|
||||
if (particle3)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle3);
|
||||
ent->name = name + "_part3";
|
||||
}
|
||||
if (particle4)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle4);
|
||||
ent->name = name + "_part4";
|
||||
}
|
||||
if (particle5)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle5);
|
||||
ent->name = name + "_part5";
|
||||
}
|
||||
if (particle6)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle6);
|
||||
ent->name = name + "_part6";
|
||||
}
|
||||
if (particle7)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle7);
|
||||
ent->name = name + "_part7";
|
||||
}
|
||||
if (elsc)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(elsc);
|
||||
ent->name = name + "_elsc";
|
||||
}
|
||||
if (model1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model1);
|
||||
ent->name = name + "_model1";
|
||||
}
|
||||
if (model2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model2);
|
||||
ent->name = name + "_model2";
|
||||
}
|
||||
if (skin)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(skin);
|
||||
ent->name = name + "_skin";
|
||||
}
|
||||
if (rig)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(rig);
|
||||
ent->name = name + "_rig";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters1.nameIDs(pakRouter, name + "_actp1");
|
||||
actorParameters2.nameIDs(pakRouter, name + "_actp2");
|
||||
animationParameters.nameANCS(pakRouter, name + "_animp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define _DNAMP1_PARAMETERS_HPP_
|
||||
|
||||
#include "../../DNACommon/DNACommon.hpp"
|
||||
#include "../ANCS.hpp"
|
||||
|
||||
namespace Retro
|
||||
{
|
||||
|
@ -92,6 +93,29 @@ struct AnimationParameters : BigYAML
|
|||
UniqueID32 animationCharacterSet;
|
||||
Value<atUint32> character;
|
||||
Value<atUint32> defaultAnimation;
|
||||
|
||||
UniqueID32 getCINF(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (!animationCharacterSet)
|
||||
return UniqueID32();
|
||||
const NOD::Node* node;
|
||||
const PAK::Entry* ancsEnt = pakRouter.lookupEntry(animationCharacterSet, &node);
|
||||
ANCS ancs;
|
||||
{
|
||||
PAKEntryReadStream rs = ancsEnt->beginReadStream(*node);
|
||||
ancs.read(rs);
|
||||
}
|
||||
return ancs.characterSet.characters.at(character).cinf;
|
||||
}
|
||||
|
||||
void nameANCS(PAKRouter<PAKBridge>& pakRouter, const std::string& name) const
|
||||
{
|
||||
if (!animationCharacterSet)
|
||||
return;
|
||||
PAK::Entry* ancsEnt = (PAK::Entry*)pakRouter.lookupEntry(animationCharacterSet);
|
||||
if (ancsEnt->name.empty())
|
||||
ancsEnt->name = name;
|
||||
}
|
||||
};
|
||||
|
||||
struct BehaveChance : BigYAML
|
||||
|
@ -168,6 +192,15 @@ struct FlareDefinition : BigYAML
|
|||
Value<float> unknown1;
|
||||
Value<float> unknown2;
|
||||
Value<atVec4f> unknown4; // CColor
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter, const std::string& name) const
|
||||
{
|
||||
if (texture)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture);
|
||||
ent->name = name + "_texture";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
struct GrappleParameters : BigYAML
|
||||
|
@ -196,18 +229,6 @@ struct HealthInfo : BigYAML
|
|||
Value<float> knockbackResistence;
|
||||
};
|
||||
|
||||
struct HudColor : BigYAML
|
||||
{
|
||||
DECL_YAML
|
||||
Value<atVec4f> unknown1;
|
||||
Value<atVec4f> unknown2;
|
||||
Value<atVec4f> unknown3;
|
||||
Value<atVec4f> unknown4;
|
||||
Value<atVec4f> unknown5;
|
||||
Value<atVec4f> unknown6;
|
||||
Value<atVec4f> unknown7;
|
||||
};
|
||||
|
||||
struct LightParameters : BigYAML
|
||||
{
|
||||
DECL_YAML
|
||||
|
@ -270,6 +291,26 @@ struct PatternedInfo : BigYAML
|
|||
Value<atVec3f> unknown14;
|
||||
UniqueID32 particle2;
|
||||
Value<atUint32> soundID2;
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter, const std::string& name) const
|
||||
{
|
||||
animationParameters.nameANCS(pakRouter, name + "_animp");
|
||||
if (stateMachine)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(stateMachine);
|
||||
ent->name = name + "_fsm";
|
||||
}
|
||||
if (particle1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1);
|
||||
ent->name = name + "_part1";
|
||||
}
|
||||
if (particle2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle2);
|
||||
ent->name = name + "_part2";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
struct PlayerHintParameters : BigYAML
|
||||
|
@ -298,6 +339,15 @@ struct ScannableParameters : BigYAML
|
|||
DECL_YAML
|
||||
Value<atUint32> propertyCount;
|
||||
UniqueID32 scanId;
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter, const std::string& name) const
|
||||
{
|
||||
if (scanId)
|
||||
{
|
||||
PAK::Entry* scanEnt = (PAK::Entry*)pakRouter.lookupEntry(scanId);
|
||||
scanEnt->name = name + "_scan";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
struct VisorParameters : BigYAML
|
||||
|
@ -327,6 +377,40 @@ struct ActorParameters : BigYAML
|
|||
Value<bool> unknown4;
|
||||
Value<bool> unknown5;
|
||||
Value<float> unknown6;
|
||||
|
||||
void addCMDLRigPairs(std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo,
|
||||
const UniqueID32& cinf) const
|
||||
{
|
||||
if (xrayModel && xraySkin)
|
||||
addTo[xrayModel] = std::make_pair(xraySkin, cinf);
|
||||
if (thermalModel && thermalSkin)
|
||||
addTo[thermalModel] = std::make_pair(thermalSkin, cinf);
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter, const std::string& name) const
|
||||
{
|
||||
scannableParameters.nameIDs(pakRouter, name);
|
||||
if (xrayModel)
|
||||
{
|
||||
PAK::Entry* xmEnt = (PAK::Entry*)pakRouter.lookupEntry(xrayModel);
|
||||
xmEnt->name = name + "_xraymodel";
|
||||
}
|
||||
if (xraySkin)
|
||||
{
|
||||
PAK::Entry* xsEnt = (PAK::Entry*)pakRouter.lookupEntry(xraySkin);
|
||||
xsEnt->name = name + "_xrayskin";
|
||||
}
|
||||
if (thermalModel)
|
||||
{
|
||||
PAK::Entry* xmEnt = (PAK::Entry*)pakRouter.lookupEntry(thermalModel);
|
||||
xmEnt->name = name + "_thermalmodel";
|
||||
}
|
||||
if (thermalSkin)
|
||||
{
|
||||
PAK::Entry* xsEnt = (PAK::Entry*)pakRouter.lookupEntry(thermalSkin);
|
||||
xsEnt->name = name + "_thermalskin";
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,6 +37,18 @@ struct Parasite : IScriptObject
|
|||
Value<float> unknown17;
|
||||
Value<float> unknown18;
|
||||
Value<bool> unknown19;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,23 @@ struct PhazonHealingNodule : IScriptObject
|
|||
Value<bool> unknown1;
|
||||
UniqueID32 elsc;
|
||||
String<-1> unknown2;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (elsc)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(elsc);
|
||||
ent->name = name + "_elsc";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,30 @@ struct PhazonPool : IScriptObject
|
|||
Value<float> unknown7;
|
||||
Value<bool> unknown8;
|
||||
Value<float> unknown9;
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (particle1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1);
|
||||
ent->name = name + "_part1";
|
||||
}
|
||||
if (particle2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle2);
|
||||
ent->name = name + "_part2";
|
||||
}
|
||||
if (model1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model1);
|
||||
ent->name = name + "_model1";
|
||||
}
|
||||
if (model2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model2);
|
||||
ent->name = name + "_model2";
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,28 @@ struct Pickup : IScriptObject
|
|||
Value<bool> active;
|
||||
Value<float> unknown1;
|
||||
UniqueID32 particle;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (particle)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle);
|
||||
ent->name = name + "_part";
|
||||
}
|
||||
if (model)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model);
|
||||
ent->name = name + "_model";
|
||||
}
|
||||
animationParameters.nameANCS(pakRouter, name + "_animp");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,6 +31,28 @@ struct Platform : IScriptObject
|
|||
Value<bool> unknown5;
|
||||
Value<atUint32> unknown6;
|
||||
Value<atUint32> unknown7;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (dcln)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(dcln);
|
||||
ent->name = name + "_dcln";
|
||||
}
|
||||
if (model)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model);
|
||||
ent->name = name + "_model";
|
||||
}
|
||||
animationParameters.nameANCS(pakRouter, name + "_animp");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,6 +36,23 @@ struct PlayerActor : IScriptObject
|
|||
Vector<bool, DNA_COUNT(propertyCount)> bools;
|
||||
} playerParameters;
|
||||
Value<atUint32> unknown8;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (model)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model);
|
||||
ent->name = name + "_model";
|
||||
}
|
||||
animationParameters.nameANCS(pakRouter, name + "_animp");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,6 +18,11 @@ struct PointOfInterest : IScriptObject
|
|||
Value<bool> unknown1;
|
||||
ScannableParameters scannableParameters;
|
||||
Value<float> unknown2;
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
scannableParameters.nameIDs(pakRouter, name + "_scanp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,28 @@ struct PuddleSpore : IScriptObject
|
|||
Value<float> unknown7;
|
||||
UniqueID32 wpsc;
|
||||
DamageInfo damageInfo;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (particle)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle);
|
||||
ent->name = name + "_part";
|
||||
}
|
||||
if (wpsc)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc);
|
||||
ent->name = name + "_wpsc";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,6 +29,23 @@ struct PuddleToadGamma : IScriptObject
|
|||
DamageInfo damageInfo1;
|
||||
DamageInfo damageInfo2;
|
||||
UniqueID32 dcln;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (dcln)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(dcln);
|
||||
ent->name = name + "_dcln";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,28 @@ struct Puffer : IScriptObject
|
|||
Value<bool> unknown5;
|
||||
DamageInfo damageInfo2;
|
||||
Value<atUint32> unknown6;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (particle)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle);
|
||||
ent->name = name + "_part";
|
||||
}
|
||||
if (texture)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture);
|
||||
ent->name = name + "_texture";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,6 +57,30 @@ struct Ridley : IScriptObject
|
|||
Value<float> unknown11;
|
||||
Value<atVec4f> unknown12; //CColor
|
||||
Value<atVec4f> unknown13; //CColor
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter, const std::string& name) const
|
||||
{
|
||||
if (particle1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1);
|
||||
ent->name = name + "_part1";
|
||||
}
|
||||
if (particle2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle2);
|
||||
ent->name = name + "_part2";
|
||||
}
|
||||
if (texture1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture1);
|
||||
ent->name = name + "_tex1";
|
||||
}
|
||||
if (texture2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture2);
|
||||
ent->name = name + "_tex2";
|
||||
}
|
||||
}
|
||||
} ridleyStruct1;
|
||||
|
||||
Value<atUint32> soundID1;
|
||||
|
@ -544,6 +568,109 @@ struct Ridley : IScriptObject
|
|||
{
|
||||
return "Retro::DNAMP1::Ridley";
|
||||
}
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (particle)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle);
|
||||
ent->name = name + "_part";
|
||||
}
|
||||
if (model1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model1);
|
||||
ent->name = name + "_model1";
|
||||
}
|
||||
if (model2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model2);
|
||||
ent->name = name + "_model2";
|
||||
}
|
||||
if (model3)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model3);
|
||||
ent->name = name + "_model3";
|
||||
}
|
||||
if (model4)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model4);
|
||||
ent->name = name + "_model4";
|
||||
}
|
||||
if (model5)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model5);
|
||||
ent->name = name + "_model5";
|
||||
}
|
||||
if (model6)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model6);
|
||||
ent->name = name + "_model6";
|
||||
}
|
||||
if (model7)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model7);
|
||||
ent->name = name + "_model7";
|
||||
}
|
||||
if (model8)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model8);
|
||||
ent->name = name + "_model8";
|
||||
}
|
||||
if (model9)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model9);
|
||||
ent->name = name + "_model9";
|
||||
}
|
||||
if (model10)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model10);
|
||||
ent->name = name + "_model10";
|
||||
}
|
||||
if (model11)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model11);
|
||||
ent->name = name + "_model11";
|
||||
}
|
||||
if (model12)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model12);
|
||||
ent->name = name + "_model12";
|
||||
}
|
||||
if (wpsc1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc1);
|
||||
ent->name = name + "_wpsc1";
|
||||
}
|
||||
if (wpsc2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc2);
|
||||
ent->name = name + "_wpsc2";
|
||||
}
|
||||
if (wpsc3)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc3);
|
||||
ent->name = name + "_wpsc3";
|
||||
}
|
||||
if (wpsc4)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc4);
|
||||
ent->name = name + "_wpsc4";
|
||||
}
|
||||
if (elsc)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(elsc);
|
||||
ent->name = name + "_elsc";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
ridleyStruct1.nameIDs(pakRouter, name + "_ridley1");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,6 +20,18 @@ struct Ripper : IScriptObject
|
|||
PatternedInfo patternedInfo;
|
||||
ActorParameters actorParameters;
|
||||
GrappleParameters grappleParameters;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@ struct ScriptBeam : IScriptObject
|
|||
DECL_YAML
|
||||
Value<atUint32> propertyCount;
|
||||
Value<atUint32> unknown1;
|
||||
UniqueID32 particel1;
|
||||
UniqueID32 particel2;
|
||||
UniqueID32 particle1;
|
||||
UniqueID32 particle2;
|
||||
UniqueID32 texture1;
|
||||
UniqueID32 texture2;
|
||||
Value<float> unknown2;
|
||||
|
@ -37,8 +37,42 @@ struct ScriptBeam : IScriptObject
|
|||
Value<float> unknown10;
|
||||
Value<atVec4f> unknown11; // CColor
|
||||
Value<atVec4f> unknown12; // CColor
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter, const std::string& name) const
|
||||
{
|
||||
if (particle1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1);
|
||||
ent->name = name + "_part1";
|
||||
}
|
||||
if (particle2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle2);
|
||||
ent->name = name + "_part2";
|
||||
}
|
||||
if (texture1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture1);
|
||||
ent->name = name + "_tex1";
|
||||
}
|
||||
if (texture2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture2);
|
||||
ent->name = name + "_tex2";
|
||||
}
|
||||
}
|
||||
} beamParametrs;
|
||||
DamageInfo damageInfo;
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (wpsc)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc);
|
||||
ent->name = name + "_wpsc";
|
||||
}
|
||||
beamParametrs.nameIDs(pakRouter, name + "_beamp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,6 +26,28 @@ struct Seedling : IScriptObject
|
|||
Value<float> unknown4;
|
||||
Value<float> unknown5;
|
||||
Value<float> unknown6;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (unknown1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(unknown1);
|
||||
ent->name = name + "_unk1";
|
||||
}
|
||||
if (unknown2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(unknown2);
|
||||
ent->name = name + "_unk2";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,6 +37,18 @@ struct SnakeWeedSwarm : IScriptObject
|
|||
Value<atUint32> unknown17;
|
||||
Value<atUint32> unknown18;
|
||||
Value<atUint32> unknown19;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
animationParameters.nameANCS(pakRouter, name + "_animp");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,6 +48,28 @@ struct SpacePirate : IScriptObject
|
|||
Value<atUint32> soundID5;
|
||||
Value<float> unknown19;
|
||||
Value<float> unknown20;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (wpsc1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc1);
|
||||
ent->name = name + "_wpsc1";
|
||||
}
|
||||
if (wpsc2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc2);
|
||||
ent->name = name + "_wpsc2";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,18 @@ struct SpankWeed : IScriptObject
|
|||
Value<float> unknown3;
|
||||
Value<float> unknown4;
|
||||
Value<float> unknown5;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,15 @@ struct Steam : IScriptObject
|
|||
Value<float> unknown6;
|
||||
Value<float> unknown7;
|
||||
Value<bool> unknown8;
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (texture)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture);
|
||||
ent->name = name + "_texture";
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,6 +36,148 @@ struct Thardus : IScriptObject
|
|||
Value<atUint32> unknown10;
|
||||
Value<atUint32> unknown11;
|
||||
Value<atUint32> unknown12;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (models[0])
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(models[0]);
|
||||
ent->name = name + "_model1";
|
||||
}
|
||||
if (models[1])
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(models[1]);
|
||||
ent->name = name + "_model2";
|
||||
}
|
||||
if (models[2])
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(models[2]);
|
||||
ent->name = name + "_model3";
|
||||
}
|
||||
if (models[3])
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(models[3]);
|
||||
ent->name = name + "_model4";
|
||||
}
|
||||
if (models[4])
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(models[4]);
|
||||
ent->name = name + "_model5";
|
||||
}
|
||||
if (models[5])
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(models[5]);
|
||||
ent->name = name + "_model6";
|
||||
}
|
||||
if (models[6])
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(models[6]);
|
||||
ent->name = name + "_model7";
|
||||
}
|
||||
if (models[7])
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(models[7]);
|
||||
ent->name = name + "_model8";
|
||||
}
|
||||
if (models[8])
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(models[8]);
|
||||
ent->name = name + "_model9";
|
||||
}
|
||||
if (models[9])
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(models[9]);
|
||||
ent->name = name + "_model10";
|
||||
}
|
||||
if (models[10])
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(models[10]);
|
||||
ent->name = name + "_model11";
|
||||
}
|
||||
if (models[11])
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(models[11]);
|
||||
ent->name = name + "_model12";
|
||||
}
|
||||
if (models[12])
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(models[12]);
|
||||
ent->name = name + "_model13";
|
||||
}
|
||||
if (models[13])
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(models[13]);
|
||||
ent->name = name + "_model14";
|
||||
}
|
||||
if (particles1[0])
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particles1[0]);
|
||||
ent->name = name + "_part1";
|
||||
}
|
||||
if (particles1[1])
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particles1[1]);
|
||||
ent->name = name + "_part2";
|
||||
}
|
||||
if (particles1[2])
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particles1[2]);
|
||||
ent->name = name + "_part3";
|
||||
}
|
||||
if (stateMachine)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(stateMachine);
|
||||
ent->name = name + "_fsm";
|
||||
}
|
||||
if (particles2[0])
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particles2[0]);
|
||||
ent->name = name + "_part4";
|
||||
}
|
||||
if (particles2[1])
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particles2[1]);
|
||||
ent->name = name + "_part5";
|
||||
}
|
||||
if (particles2[2])
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particles2[2]);
|
||||
ent->name = name + "_part6";
|
||||
}
|
||||
if (particles2[3])
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particles2[3]);
|
||||
ent->name = name + "_part7";
|
||||
}
|
||||
if (particles2[4])
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particles2[4]);
|
||||
ent->name = name + "_part8";
|
||||
}
|
||||
if (particles2[5])
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particles2[5]);
|
||||
ent->name = name + "_part9";
|
||||
}
|
||||
if (particle)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle);
|
||||
ent->name = name + "_part10";
|
||||
}
|
||||
if (texture)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture);
|
||||
ent->name = name + "_texture";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,28 @@ struct ThardusRockProjectile : IScriptObject
|
|||
Value<float> unknown3;
|
||||
UniqueID32 model;
|
||||
UniqueID32 stateMachine;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (model)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model);
|
||||
ent->name = name + "_model";
|
||||
}
|
||||
if (stateMachine)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(stateMachine);
|
||||
ent->name = name + "_fsm";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,18 @@ struct Tryclops : IScriptObject
|
|||
Value<float> unknown2;
|
||||
Value<float> unknown3;
|
||||
Value<float> unknown4;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,15 @@ struct VisorFlare : IScriptObject
|
|||
Value<float> unknown6;
|
||||
Value<atUint32> unknown7;
|
||||
FlareDefinition flareDefinitions[5];
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
flareDefinitions[0].nameIDs(pakRouter, name + "_flare1");
|
||||
flareDefinitions[1].nameIDs(pakRouter, name + "_flare2");
|
||||
flareDefinitions[2].nameIDs(pakRouter, name + "_flare3");
|
||||
flareDefinitions[3].nameIDs(pakRouter, name + "_flare4");
|
||||
flareDefinitions[4].nameIDs(pakRouter, name + "_flare5");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,6 +23,15 @@ struct VisorGoo : IScriptObject
|
|||
Value<atVec4f> unknown6; // CColor
|
||||
Value<atUint32> unknown7;
|
||||
Value<bool> unknown8;
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (particle)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle);
|
||||
ent->name = name + "_part";
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,6 +51,28 @@ struct WallCrawlerSwarm : IScriptObject
|
|||
DamageVulnerability damageVulnerabilty;
|
||||
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
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (particle1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1);
|
||||
ent->name = name + "_part1";
|
||||
}
|
||||
if (particle2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle2);
|
||||
ent->name = name + "_part2";
|
||||
}
|
||||
animationParameters.nameANCS(pakRouter, name + "_animp");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,28 @@ struct Warwasp : IScriptObject
|
|||
DamageInfo damageInfo2;
|
||||
UniqueID32 particle;
|
||||
Value<atUint32> unknown3;
|
||||
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
actorParameters.addCMDLRigPairs(addTo, patternedInfo.animationParameters.getCINF(pakRouter));
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (wpsc1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(wpsc1);
|
||||
ent->name = name + "_wpsc";
|
||||
}
|
||||
if (particle)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle);
|
||||
ent->name = name + "_part";
|
||||
}
|
||||
patternedInfo.nameIDs(pakRouter, name + "_patterned");
|
||||
actorParameters.nameIDs(pakRouter, name + "_actp");
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -94,6 +94,70 @@ struct Water : IScriptObject
|
|||
Value<atUint32> unknown38;
|
||||
Value<atUint32> unknown39;
|
||||
Value<bool> unknown40;
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (texture1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture1);
|
||||
ent->name = name + "_tex1";
|
||||
}
|
||||
if (texture2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture2);
|
||||
ent->name = name + "_tex2";
|
||||
}
|
||||
if (texture3)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture3);
|
||||
ent->name = name + "_tex3";
|
||||
}
|
||||
if (texture4)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture4);
|
||||
ent->name = name + "_tex4";
|
||||
}
|
||||
if (texture5)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture5);
|
||||
ent->name = name + "_tex5";
|
||||
}
|
||||
if (texture6)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture6);
|
||||
ent->name = name + "_tex6";
|
||||
}
|
||||
if (texture34)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(texture34);
|
||||
ent->name = name + "_tex34";
|
||||
}
|
||||
if (particle1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle1);
|
||||
ent->name = name + "_part1";
|
||||
}
|
||||
if (particle2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle2);
|
||||
ent->name = name + "_part2";
|
||||
}
|
||||
if (particle3)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle3);
|
||||
ent->name = name + "_part3";
|
||||
}
|
||||
if (particle4)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle4);
|
||||
ent->name = name + "_part4";
|
||||
}
|
||||
if (particle5)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(particle5);
|
||||
ent->name = name + "_part5";
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -283,6 +283,25 @@ struct WorldTeleporter : IScriptObject
|
|||
{
|
||||
return "Retro::DNAMP1::WorldTeleporter";
|
||||
}
|
||||
|
||||
void nameIDs(PAKRouter<PAKBridge>& pakRouter) const
|
||||
{
|
||||
if (model1)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model1);
|
||||
ent->name = name + "_model1";
|
||||
}
|
||||
if (model2)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(model2);
|
||||
ent->name = name + "_model2";
|
||||
}
|
||||
if (strg)
|
||||
{
|
||||
PAK::Entry* ent = (PAK::Entry*)pakRouter.lookupEntry(strg);
|
||||
ent->name = name + "_strg";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -186,7 +186,8 @@ void PAKBridge::build()
|
|||
}
|
||||
}
|
||||
|
||||
void PAKBridge::addCMDLRigPairs(std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
void PAKBridge::addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const
|
||||
{
|
||||
for (const std::pair<UniqueID32, DNAMP1::PAK::Entry*>& entry : m_pak.m_idMap)
|
||||
{
|
||||
|
|
|
@ -35,7 +35,8 @@ public:
|
|||
const PAKType& getPAK() const {return m_pak;}
|
||||
const NOD::Node& getNode() const {return m_node;}
|
||||
|
||||
void addCMDLRigPairs(std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const;
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID32, std::pair<UniqueID32, UniqueID32>>& addTo) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -199,7 +199,8 @@ void PAKBridge::build()
|
|||
}
|
||||
}
|
||||
|
||||
void PAKBridge::addCMDLRigPairs(std::unordered_map<UniqueID64, std::pair<UniqueID64, UniqueID64>>& addTo) const
|
||||
void PAKBridge::addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID64, std::pair<UniqueID64, UniqueID64>>& addTo) const
|
||||
{
|
||||
for (const std::pair<UniqueID64, PAK::Entry*>& entry : m_pak.m_idMap)
|
||||
{
|
||||
|
|
|
@ -35,7 +35,8 @@ public:
|
|||
inline const PAKType& getPAK() const {return m_pak;}
|
||||
inline const NOD::Node& getNode() const {return m_node;}
|
||||
|
||||
void addCMDLRigPairs(std::unordered_map<UniqueID64, std::pair<UniqueID64, UniqueID64>>& addTo) const;
|
||||
void addCMDLRigPairs(PAKRouter<PAKBridge>& pakRouter,
|
||||
std::unordered_map<UniqueID64, std::pair<UniqueID64, UniqueID64>>& addTo) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -61,7 +61,10 @@ void PAK::read(Athena::io::IStreamReader& reader)
|
|||
{
|
||||
auto search = m_idMap.find(entry.id);
|
||||
if (search != m_idMap.end())
|
||||
{
|
||||
m_nameMap[entry.name] = search->second;
|
||||
search->second->name = entry.name;
|
||||
}
|
||||
}
|
||||
}
|
||||
void PAK::write(Athena::io::IStreamWriter& writer) const
|
||||
|
|
|
@ -45,6 +45,7 @@ struct PAK : BigDNA
|
|||
Value<atUint32> size;
|
||||
Value<atUint32> offset;
|
||||
UniqueResult unique;
|
||||
std::string name;
|
||||
|
||||
std::unique_ptr<atUint8[]> getBuffer(const NOD::Node& pak, atUint64& szOut) const;
|
||||
inline PAKEntryReadStream beginReadStream(const NOD::Node& pak, atUint64 off=0) const
|
||||
|
|
Loading…
Reference in New Issue