static private ReadNodes ( |
||
reader | ||
return | Node[] |
internal static Node[] ReadNodes(BinaryReader reader)
{
long length = reader.BaseStream.Length;
if (length < 2)
return null;
ushort nodeCount = reader.ReadUInt16();
if (nodeCount > 256 || nodeCount < 16 || length < 2 + nodeCount * 4)
return null;
Node[] nodes = new Node[nodeCount];
for (int index = 0; index < nodeCount; index++)
nodes[index] = new Node(reader);
return nodes;
}
public override LoadMatchStrength LoadMatch(AssetLoader loader) { StringPackage.Node[] nodes = StringPackage.ReadNodes(loader.Reader); if (nodes == null || !nodes[nodes.Length - 1].CheckValidity(nodes.Length - 1, nodes)) { return(LoadMatchStrength.None); } return(LoadMatchStrength.Medium); }