Example #1
0
        static void Main()
        {
            Console.WriteLine("Hello World!");

            //string csgoDir = Path.Combine("C:\\", "Program Files (x86)", "Steam", "steamapps", "common", "Counter-Strike Global Offensive");
            //string csgoDir = Path.Combine("D:\\", "Games", "Steam", "steamapps", "common", "Counter-Strike Global Offensive");
            string csgoDir = Path.Combine("E:\\", "Games", "Steam Games", "steamapps", "common", "Counter-Strike Global Offensive");

            var loader = new MapLoader.MapLoader(csgoDir, "de_overpass");

            //loader.Load();
            loader.Export("export");
            Console.ReadKey();
        }
        public static void Export(this MapLoader.MapLoader map, string path)
        {
            ExportModel(map.Brushes, Path.Combine(path, "brushes.obj"));

            /*foreach (var p in map.Parts)
             * {
             *  var t = p.Texture;
             *  var mip = t?.Mipmaps[0];
             *  if (mip != null && mip.HasValue)
             *  {
             *      var data = new byte[mip.Value.Data.GetLength(2)];
             *      for (var i = 0; i < mip.Value.Data.GetLength(2); i++)
             *      {
             *          data[i] = mip.Value.Data[0, 0, i];
             *      }
             *  }
             * }*/
        }