Esempio n. 1
0
 public static void SavePTPFile(GameFile objectFile, string path, PersonaEncoding oldEncoding = null)
 {
     if (objectFile.GameData is BMD bmd)
     {
         PTP PTP = new PTP(bmd);
         if (oldEncoding != null)
         {
             PTP.CopyOld2New(oldEncoding);
         }
         File.WriteAllBytes(path, PTP.GetData());
     }
 }
Esempio n. 2
0
 static void ExportPTP(GameFile objectFile, string value, string openedFileDir, Parameters parameters)
 {
     if (objectFile.GameData is BMD bmd)
     {
         string path = Path.Combine(openedFileDir, Path.GetFileNameWithoutExtension(objectFile.Name.Replace('/', '+')) + ".PTP");
         PTP    PTP  = new PTP(bmd);
         if (parameters.CopyOld2New)
         {
             PTP.CopyOld2New(Static.OldEncoding());
         }
         File.WriteAllBytes(path, PTP.GetData());
     }
 }