Пример #1
0
		static List<VpkNode> LoadRootNodes(BinaryReader reader)
		{
			var nodes = new List<VpkNode>();

			VpkNode newNode = null;
			while (newNode == null || !string.IsNullOrEmpty(newNode.Name))
			{
				newNode = new VpkNode();
				newNode.Load(reader);
				if (!string.IsNullOrEmpty(newNode.Name))
				{
					nodes.Add(newNode);
					newNode.Children = LoadNodeChildren(reader, newNode);
				}
			}

			return nodes;
		}
Пример #2
0
        static VpkNode[] LoadNodeChildren(BinaryReader reader, VpkNode parent)
        {
            var nodes = new List <VpkNode>();

            VpkNode newNode = null;

            while (newNode == null || !string.IsNullOrEmpty(newNode.Name))
            {
                newNode = new VpkNode(parent);
                newNode.Load(reader);
                if (!string.IsNullOrEmpty(newNode.Name))
                {
                    nodes.Add(newNode);
                    newNode.Children = LoadNodeFileChildren(reader, newNode);
                }
            }

            return(nodes.ToArray());
        }
Пример #3
0
        static List <VpkNode> LoadRootNodes(BinaryReader reader)
        {
            var nodes = new List <VpkNode>();

            VpkNode newNode = null;

            while (newNode == null || !string.IsNullOrEmpty(newNode.Name))
            {
                newNode = new VpkNode();
                newNode.Load(reader);
                if (!string.IsNullOrEmpty(newNode.Name))
                {
                    nodes.Add(newNode);
                    newNode.Children = LoadNodeChildren(reader, newNode);
                }
            }

            return(nodes);
        }
Пример #4
0
		static VpkNode[] LoadNodeChildren(BinaryReader reader, VpkNode parent)
		{
			var nodes = new List<VpkNode>();

			VpkNode newNode = null;
			while (newNode == null || !string.IsNullOrEmpty(newNode.Name))
			{
				newNode = new VpkNode(parent);
				newNode.Load(reader);
				if (!string.IsNullOrEmpty(newNode.Name))
				{
					nodes.Add(newNode);
					newNode.Children = LoadNodeFileChildren(reader, newNode);
				}
			}

			return nodes.ToArray();
		}