Beispiel #1
0
        public void BuildFromTextureList(List <Texture> textures)
        {
            textures.Sort((a, b) => a.NameHash.CompareTo(b.NameHash));

            var texturehashes = new List <uint>();

            foreach (var tex in textures)
            {
                texturehashes.Add(tex.NameHash);
            }

            TextureNameHashes            = new ResourceSimpleList64_uint();
            TextureNameHashes.data_items = texturehashes.ToArray();
            Textures            = new ResourcePointerList64 <Texture>();
            Textures.data_items = textures.ToArray();
            BuildDict();
        }
Beispiel #2
0
        public void ReadXml(XmlNode node, string ddsfolder)
        {
            var textures      = new List <Texture>();
            var texturehashes = new List <uint>();

            var inodes = node.SelectNodes("Item");

            if (inodes != null)
            {
                foreach (XmlNode inode in inodes)
                {
                    var tex = new Texture();
                    tex.ReadXml(inode, ddsfolder);
                    textures.Add(tex);
                    texturehashes.Add(tex.NameHash);
                }
            }

            TextureNameHashes            = new ResourceSimpleList64_uint();
            TextureNameHashes.data_items = texturehashes.ToArray();
            Textures            = new ResourcePointerList64 <Texture>();
            Textures.data_items = textures.ToArray();
            BuildDict();
        }