2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 01:07:43 +00:00

Initial PATH extraction support

This commit is contained in:
Jack Andersen
2018-02-23 20:17:17 -10:00
parent e4ff23c279
commit 96662eb47c
13 changed files with 242 additions and 7 deletions

View File

@@ -58,6 +58,24 @@ void MREA::AddCMDLRigPairs(PAKEntryReadStream& rs,
scly.addCMDLRigPairs(pakRouter, addTo);
}
UniqueID32 MREA::GetPATHId(PAKEntryReadStream& rs)
{
/* Do extract */
Header head;
head.read(rs);
rs.seekAlign32();
/* Skip to PATH */
atUint32 curSec = 0;
atUint64 secStart = rs.position();
while (curSec != head.pathSecIdx)
secStart += head.secSizes[curSec++];
if (!head.secSizes[curSec])
return {};
rs.seek(secStart, athena::Begin);
return {rs};
}
/* Collision octree dumper */
static void OutputOctreeNode(hecl::blender::PyOutStream& os, athena::io::MemoryReader& r,
BspNodeType type, const zeus::CAABox& aabb)