public static List <Model> LoadModelsFromBnd(BND bnd)
        {
            var modelEntries = bnd.Where(x => x.Name.ToUpper().EndsWith(".FLVER"));

            if (modelEntries.Any())
            {
                return(modelEntries.Select(x => new Model(SoulsFormats.FLVER.Read(x.GetBytes()))).ToList());
            }
            else
            {
                return(new List <Model>());
            }
        }
Beispiel #2
0
        public static void AddTextureBnd(BND chrbnd, IProgress <double> prog)
        {
            var tpfFiles = chrbnd.Where(x => x.Name.EndsWith(".tpf")).ToList();
            int i        = 0;

            foreach (var t in tpfFiles)
            {
                SoulsFormats.TPF tpf = null;
                lock (_lock_IO)
                {
                    tpf = SoulsFormats.TPF.Read(t.GetBytes());
                }
                AddTpf(tpf);
                prog?.Report(1.0 * (++i) / tpfFiles.Count);
            }
        }