Example #1
0
 /// <summary>
 /// Attempts to save the SSBH supported file to given filepath
 /// </summary>
 /// <param name="filePath"></param>
 /// <param name="file"></param>
 public static void TrySaveSsbhFile(string filePath, SsbhFile file)
 {
     using (var exporter = new SsbhExporter(filePath))
     {
         exporter.WriteSsbhFile(file);
     }
 }
Example #2
0
 /// <summary>
 /// Tries to parse an SSBH file from a byte array
 /// </summary>
 /// <param name="fileData"></param>
 /// <param name="hbssFile"></param>
 /// <returns>true if parsing was successful</returns>
 public static bool TryParseSsbhFile(byte[] fileData, out SsbhFile hbssFile)
 {
     hbssFile = null;
     using (var parser = new SsbhParser(new MemoryStream(fileData)))
     {
         return(parser.TryParse(out hbssFile));
     }
 }
Example #3
0
 /// <summary>
 /// Attempts to save the SSBH supported file to given filepath
 /// </summary>
 /// <param name="filePath"></param>
 /// <param name="file"></param>
 public static void TrySaveSsbhFile(string filePath, SsbhFile file)
 {
     SsbhExporter.WriteSsbhFile(filePath, file, true);
 }
Example #4
0
 /// <summary>
 /// Tries to parse an SSBH file from a filepath
 /// </summary>
 /// <param name="filePath"></param>
 /// <param name="hbssFile"></param>
 /// <returns>true if parsing was successful</returns>
 public static bool TryParseSsbhFile(string filePath, out SsbhFile hbssFile)
 {
     return(TryParseSsbhFile(File.ReadAllBytes(filePath), out hbssFile));
 }