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

Implement CPFArea constructor

This commit is contained in:
Jack Andersen
2018-02-13 21:51:18 -10:00
parent 74ce62726d
commit 98518e7d44
20 changed files with 375 additions and 216 deletions

View File

@@ -805,17 +805,17 @@ bool MREA::CookPath(const hecl::ProjectPath& outPath,
{
PATH path = {};
path.version = 4;
path.unkStructCount = 1;
path.unkStructs.emplace_back();
PATH::UnknownStruct& s = path.unkStructs.back();
s.unk1 = 1;
s.unk2[0] = atVec3f{FLT_MAX, FLT_MAX, FLT_MAX};
s.unk2[1] = atVec3f{-FLT_MAX, -FLT_MAX, -FLT_MAX};
s.unk2[2] = atVec3f{0.f, 0.f, 0.f};
path.octreeNodeCount = 1;
path.octree.emplace_back();
PATH::OctreeNode& s = path.octree.back();
s.isLeaf = 1;
s.points[0] = atVec3f{FLT_MAX, FLT_MAX, FLT_MAX};
s.points[1] = atVec3f{-FLT_MAX, -FLT_MAX, -FLT_MAX};
s.points[2] = atVec3f{0.f, 0.f, 0.f};
for (int i=0 ; i<8 ; ++i)
s.unk3[i] = ~0;
s.unk4 = 0;
s.unk5 = 0;
s.children[i] = 0xffffffff;
s.regionCount = 0;
s.regionStart = 0;
athena::io::FileWriter w(outPath.getAbsolutePath());
path.write(w);