Skip to content

Commit

Permalink
Starfield Navmesh geometry parsing readded
Browse files Browse the repository at this point in the history
  • Loading branch information
Noggog committed Aug 18, 2024
1 parent 10837db commit 29c5bfd
Show file tree
Hide file tree
Showing 4 changed files with 1,653 additions and 86 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ public partial IANavmeshParentGetter GetParentCustom(int location)
return NavmeshGeometryBinaryCreateTranslation.GetBinaryParent(new OverlayStream(_structData.Slice(8), _package));
}

// partial void CustomTrianglesEndPos()
// {
// var count = BinaryPrimitives.ReadUInt32LittleEndian(_structData.Slice(VerticesEndingPos));
// TrianglesEndingPos = VerticesEndingPos + checked((int)((count * 0x15) + 4));
// }
partial void CustomTrianglesEndPos()
{
var count = BinaryPrimitives.ReadUInt32LittleEndian(_structData.Slice(VerticesEndingPos));
TrianglesEndingPos = VerticesEndingPos + checked((int)((count * 0x15) + 4));
}

class TrianglesOverlay : IReadOnlyList<INavmeshTriangleGetter>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,20 @@
<UInt32 name="CrcHash" default="0xA5E9A03C" />
<RefDirect name="Parent" refName="ANavmeshParent" binary="Custom" byteLength="8" />
<RefList name="Vertices" counterLength="4" refName="NavmeshVertex" />
<ByteArray name="UnknownEnd" />
<!-- <RefList name="Triangles" refName="NavmeshTriangle" counterLength="4" binaryOverlay="Custom" />-->
<!-- <RefList name="EdgeLinks" refName="EdgeLink" counterLength="4" />-->
<!-- <RefList name="DoorTriangles" refName="DoorTriangle" counterLength="4" />-->
<!-- <RefList name="Cover" counterLength="4" refName="NavmeshCover" />-->
<!-- <RefList name="CoverTriangleMappings" counterLength="4" refName="NavmeshCoverTriangleMap" />-->
<!-- <RefList name="Waypoints" refName="NavmeshWaypoint" counterLength="4" />-->
<!-- <UInt32 name="GridSize" max="12" />-->
<!-- <P2Float name="GridMaxDistance" />-->
<!-- <P3Float name="GridMin" />-->
<!-- <P3Float name="GridMax" />-->
<!-- <RefList name="GridArrays" refName="NavmeshGridArray" />-->
<!-- <Break />-->
<!-- <Int32 name="Unknown3" />-->
</Fields>
<RefList name="Triangles" refName="NavmeshTriangle" counterLength="4" binaryOverlay="Custom" />
<RefList name="EdgeLinks" refName="EdgeLink" counterLength="4" />
<RefList name="DoorTriangles" refName="DoorTriangle" counterLength="4" />
<RefList name="Cover" counterLength="4" refName="NavmeshCover" />
<RefList name="CoverTriangleMappings" counterLength="4" refName="NavmeshCoverTriangleMap" />
<RefList name="Waypoints" refName="NavmeshWaypoint" counterLength="4" />
<UInt32 name="GridSize" max="12" />
<P2Float name="GridMaxDistance" />
<P3Float name="GridMin" />
<P3Float name="GridMax" />
<RefList name="GridArrays" refName="NavmeshGridArray" />
<Break />
<Int32 name="Unknown3" />
</Fields>df
</Object>
<Object name="ANavmeshParent" abstract="true" objType="Subrecord">
</Object>
Expand Down
Loading

0 comments on commit 29c5bfd

Please sign in to comment.