コード例 #1
0
 public void Export(CommandSubType com, ArgumentsWork.Parameters parameters, string dest)
 {
     if (com == CommandSubType.ALL)
     {
         ExportAll(parameters);
     }
 }
コード例 #2
0
 public void Import(CommandSubType com, ArgumentsWork.Parameters parameters, string src)
 {
     if (com == CommandSubType.ALL)
     {
         ImportAll(parameters);
     }
 }
コード例 #3
0
 public void Export(CommandSubType com, ArgumentsWork.Parameters parameters, string dest)
 {
     if (com == CommandSubType.TXT)
     {
         ExportTXT(dest, parameters);
     }
 }
コード例 #4
0
 public void Import(CommandSubType com, ArgumentsWork.Parameters parameters, string src)
 {
     if (com == CommandSubType.TXT)
     {
         ImportTXT(src, parameters);
     }
 }
コード例 #5
0
 public void Export(CommandSubType com, ArgumentsWork.Parameters parameters, string dest)
 {
     if (com == CommandSubType.Image)
     {
         ExportImg(dest);
     }
 }
コード例 #6
0
        public void Save(ArgumentsWork.Parameters parameters, string dest)
        {
            if (dest == "")
            {
                dest = Util.GetNewPath(source, "(NEW).DAT");
            }

            File.WriteAllBytes(dest, StringList.Get(parameters.Old ? new CharList(parameters.OldMap, parameters.OldFont) : new CharList(parameters.NewMap, parameters.NewFont)));
        }
コード例 #7
0
        public void Save(ArgumentsWork.Parameters parameters, string dest)
        {
            if (dest == "")
            {
                dest = Util.GetNewPath(source, "(NEW).FNT");
            }

            File.WriteAllBytes(dest, FNT.This);
        }
コード例 #8
0
        public void Save(ArgumentsWork.Parameters parameters, string dest)
        {
            if (dest == "")
            {
                dest = Util.GetNewPath(source, ".PTP");
            }

            PTP.SaveProject(dest);
        }
コード例 #9
0
        public void Save(ArgumentsWork.Parameters parameters, string dest)
        {
            if (dest == "")
            {
                dest = Util.GetNewPath(source, "(NEW).TBL");
            }

            File.WriteAllBytes(dest, TBL.Get(parameters.IsLittleEndian));
        }
コード例 #10
0
        private void ExportAll(string dest, ArgumentsWork.Parameters ParList)
        {
            List <string> filelist = BIN.GetFileList.Select(x => Path.Combine(Path.GetDirectoryName(Path.GetFullPath(source)), Path.GetFileName(source) + "+" + x.Replace('/', '+'))).ToList();

            for (int i = 0; i < filelist.Count; i++)
            {
                using (BinaryWriter writer = new BinaryWriter(File.Create(filelist[i])))
                    writer.Write(BIN[i]);
            }
        }
コード例 #11
0
        private void ExportAll(ArgumentsWork.Parameters ParList)
        {
            string temp  = Path.GetDirectoryName(Path.GetFullPath(source));
            string temp2 = Path.GetFileName(source);

            for (int i = 0; i < TBL.Count; i++)
            {
                File.WriteAllBytes(Path.Combine(temp, temp2 + "(" + i.ToString().PadLeft(2, '0') + ").DAT"), TBL[i]);
            }
        }
コード例 #12
0
        private void ExportAll(ArgumentsWork.Parameters ParList)
        {
            string temp  = Path.GetDirectoryName(source);
            string temp2 = Path.GetFileNameWithoutExtension(source);

            for (int i = 0; i < BVP.Count; i++)
            {
                File.WriteAllBytes(Path.Combine(temp, temp2 + "(" + i.ToString().PadLeft(3, '0') + ").BMD"), BVP[i]);
            }
        }
コード例 #13
0
        public void Save(ArgumentsWork.Parameters parameters, string dest)
        {
            if (dest == "")
            {
                string fullpath = Path.GetFullPath(source);
                dest = Path.GetDirectoryName(fullpath) + "\\" + Path.GetFileNameWithoutExtension(fullpath) + "(NEW)" + Path.GetExtension(fullpath);
            }

            File.WriteAllBytes(dest, BIN.Get(parameters.IsLittleEndian));
        }
コード例 #14
0
        private void ExportBMD(string dest, ArgumentsWork.Parameters ParList)
        {
            if (dest == "")
            {
                dest = Util.GetNewPath(source, "(NEW).BMD");
            }

            PersonaEditorLib.FileStructure.BMD.BMD BMD = new PersonaEditorLib.FileStructure.BMD.BMD();
            BMD.Open(PTP);
            File.WriteAllBytes(dest, BMD.Get(ParList.IsLittleEndian));
        }
コード例 #15
0
 public void Import(CommandSubType com, ArgumentsWork.Parameters parameters, string src)
 {
     if (com == CommandSubType.BMD)
     {
         ImportBMD(src);
     }
     else if (com == CommandSubType.PTP)
     {
         ImportPTP(src, parameters);
     }
 }
コード例 #16
0
 public void Import(CommandSubType com, ArgumentsWork.Parameters parameters, string src)
 {
     if (com == CommandSubType.Image)
     {
         ImportImg(src);
     }
     if (com == CommandSubType.Table)
     {
         ImportWT(src);
     }
 }
コード例 #17
0
        private void ExportPTP(string dest, ArgumentsWork.Parameters ParList)
        {
            if (dest == "")
            {
                dest = Util.GetNewPath(source, ".PTP");
            }

            PersonaEditorLib.FileStructure.PTP.PTP PTP = new PersonaEditorLib.FileStructure.PTP.PTP(ParList.OldFont, ParList.OldMap, ParList.NewFont, ParList.NewMap);
            PTP.Open(BMD, ParList.CopyOld2New);
            PTP.SaveProject(dest);
        }
コード例 #18
0
        public FNTConsole(string filepath, ArgumentsWork.Parameters parameters)
        {
            Console.WriteLine("---------------------------------------------------");
            Console.WriteLine("-----Font decompressor/compressor by Meloman19-----");
            Console.WriteLine("-------------------Persona 3/4/5-------------------");
            Console.WriteLine("----------Based on RikuKH3's decompressor----------");
            Console.WriteLine("---------------------------------------------------");

            source = Path.GetFullPath(filepath);
            FNT    = new PersonaEditorLib.FileStructure.FNT.FNT(source);
        }
コード例 #19
0
 public void Export(CommandSubType com, ArgumentsWork.Parameters parameters, string dest)
 {
     if (com == CommandSubType.BMD)
     {
         ExportBMD(dest);
     }
     else if (com == CommandSubType.PTP)
     {
         ExportPTP(dest, parameters);
     }
 }
コード例 #20
0
        private void ExportTXT(string dest, ArgumentsWork.Parameters ParList)
        {
            if (dest == "")
            {
                dest = Util.GetNewPath(source, ".TXT");
            }

            for (int i = 0; i < StringList.Count; i++)
            {
                File.AppendAllText(dest, StringList[i].Item1 + "\t" + StringList[i].Item2 + "\r\n");
            }
        }
コード例 #21
0
        private void ImportPTP(string src, ArgumentsWork.Parameters ParList)
        {
            if (src == "")
            {
                src = Util.GetNewPath(source, ".PTP");
            }

            PersonaEditorLib.FileStructure.PTP.PTP PTP = new PersonaEditorLib.FileStructure.PTP.PTP(ParList.OldFont, ParList.OldMap, ParList.NewFont, ParList.NewMap);
            PersonaEditorLib.FileStructure.BMD.BMD BMD = new PersonaEditorLib.FileStructure.BMD.BMD();
            BMD.Open(PTP);
            BF.SetBMD(BMD.Get(ParList.IsLittleEndian));
        }
コード例 #22
0
        private void ExportPTP(string dest, ArgumentsWork.Parameters ParList)
        {
            if (dest == "")
            {
                dest = Util.GetNewPath(source, ".PTP");
            }

            PersonaEditorLib.FileStructure.BMD.BMD BMD = new PersonaEditorLib.FileStructure.BMD.BMD();
            BMD.Open(BF.GetBMD(), Path.GetFileNameWithoutExtension(dest), true);
            PersonaEditorLib.FileStructure.PTP.PTP PTP = new PersonaEditorLib.FileStructure.PTP.PTP(ParList.OldFont, ParList.OldMap, ParList.NewFont, ParList.NewMap);
            PTP.Open(BMD, ParList.CopyOld2New);
            PTP.SaveProject(dest);
        }
コード例 #23
0
        private void ImportAll(ArgumentsWork.Parameters ParList)
        {
            string temp  = Path.GetDirectoryName(Path.GetFullPath(source));
            string temp2 = Path.GetFileName(source);

            for (int i = 0; i < TBL.Count; i++)
            {
                string name = Path.Combine(temp, temp2 + "(" + i.ToString().PadLeft(2, '0') + ")(NEW).DAT");
                if (File.Exists(name))
                {
                    TBL[i] = File.ReadAllBytes(name);
                }
            }
        }
コード例 #24
0
        private void ImportAll(string src, ArgumentsWork.Parameters ParList)
        {
            List <string> filelist = BIN.GetFileList.Select(x => Path.Combine(Path.GetDirectoryName(source), Path.GetFileName(source) + "+" + x.Replace('/', '+')))
                                     .Select(x => Path.Combine(Path.GetDirectoryName(x), Path.GetFileNameWithoutExtension(x) + "(NEW)" + Path.GetExtension(x))).ToList();

            List <FileInfo> Files = new List <FileInfo>(new DirectoryInfo(Path.GetDirectoryName(Path.GetFullPath(source))).GetFiles());

            for (int i = 0; i < filelist.Count; i++)
            {
                var temp = Files.Find(x => x.Name == filelist[i]);
                if (temp != null)
                {
                    using (BinaryReader reader = new BinaryReader(File.OpenRead(temp.FullName)))
                        BIN[i] = reader.ReadBytes((int)reader.BaseStream.Length);
                }
            }
        }
コード例 #25
0
 private void ImportTXT(string src, ArgumentsWork.Parameters ParList)
 {
     StringList.Import(src);
 }
コード例 #26
0
 public TEXTConsole(string filepath, ArgumentsWork.Parameters parameters)
 {
     source     = Path.GetFullPath(filepath);
     StringList = new PersonaEditorLib.FileStructure.StringList(source, parameters.Length,
                                                                parameters.Old ? new CharList(parameters.OldMap, parameters.OldFont) : new CharList(parameters.NewMap, parameters.NewFont));
 }
コード例 #27
0
 private void ExportTXT(string dest, ArgumentsWork.Parameters ParList)
 {
     PTP.ExportTXT(dest, ParList.Map, ParList.RemoveSplit);
 }
コード例 #28
0
 private void ImportTXT(string src, ArgumentsWork.Parameters ParList)
 {
     PTP.ImportTXT(src, ParList.Map, ParList.Auto, ParList.Width, ParList.SkipEmpty, ParList.Encode);
 }
コード例 #29
0
 public PTPConsole(string filepath, ArgumentsWork.Parameters parameters)
 {
     source = Path.GetFullPath(filepath);
     PTP    = new PersonaEditorLib.FileStructure.PTP.PTP(parameters.OldFont, parameters.OldMap, parameters.NewFont, parameters.NewMap);
     PTP.Open(source);
 }
コード例 #30
0
 public TBLConsole(string filepath, ArgumentsWork.Parameters parameters)
 {
     source = Path.GetFullPath(filepath);
     TBL    = new PersonaEditorLib.FileStructure.TBL.TBL(source, parameters.IsLittleEndian);
 }