예제 #1
0
        public void LoadAllHairStyles()
        {
            int errorCount = 0;
            var hairTypes  = new DirectoryInfo(Utility.GetFullPath("chunk0/pl/hair")).GetDirectories().Select(x => x.Name);

            foreach (var type in hairTypes)
            {
                string fullPath = Path.Combine(Utility.GetFullPath("chunk0/pl/hair"), type, "mod", type + ".mod3");

                if (!File.Exists(fullPath))
                {
                    Console.WriteLine($"Hairstyle doesn't have a mod3 file, skipping it '{fullPath}'");
                    continue;
                }

                MOD3 mod = new MOD3(fullPath);

                if (mod.MeshParts.Count != mod.VertexBuffers.Count)
                {
                    errorCount++;
                }
            }

            Assert.AreEqual(0, errorCount, "Probably unrecognized VertexBuffer block type, see output.");
        }
예제 #2
0
        public void Load__hair103()
        {
            MOD3 mod = new MOD3(Utility.GetFullPath("chunk0/pl/hair/hair103/mod/hair103.mod3"));

            Assert.AreEqual(mod.MeshParts.Count, mod.VertexBuffers.Count, "Probably unrecognized VertexBuffer block type, see output.");
        }