示例#1
0
 public static void TestWEM()
 {
     using (var of = new System.Windows.Forms.OpenFileDialog())
     {
         of.Filter = "Witcher 3 BNK File | *.wem";
         if (of.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             var wem = new WEM.RiffFile(of.FileName);
             wem.WriteFile(Path.GetDirectoryName(of.FileName) + "\\generated.wem");
         }
     }
 }
示例#2
0
 private void ParseStream(Stream stream)
 {
     _riffFile = new RiffFile(stream);
     foreach (var chunk in _riffFile.Root.Subchunks)
     {
         var id = chunk.Id;
         if (!(id == "fmt "))
         {
             if (id == "data")
             {
                 ParseDataChunk(chunk);
             }
         }
         else
         {
             ParseFormatChunk(chunk);
         }
     }
 }