From b49b86887eb1985d69e882d4fb8672d7939bba56 Mon Sep 17 00:00:00 2001 From: korenkonder Date: Wed, 3 Jun 2020 01:45:36 +0300 Subject: [PATCH] Release v0.4.9.3.2 (Hotfix) CLI, Tables --- KKdBaseLib/Auth2D.cs | 4 +- KKdBaseLib/Extensions.cs | 4 +- KKdBaseLib/Interpolation/PDI.cs | 2 +- KKdBaseLib/KKdBaseLib.csproj | 7 +- KKdBaseLib/Mat2.cs | 4 +- KKdBaseLib/Mat3.cs | 4 +- KKdBaseLib/Mat4.cs | 8 +- KKdBaseLib/Properties/AssemblyInfo.cs | 2 +- KKdBaseLib/Tables.cs | 2 +- KKdMainLib/DataBank.cs | 2 +- KKdMainLib/FARC.cs | 22 +- KKdMainLib/KKdMainLib.csproj | 17 +- KKdMainLib/MotHead.cs | 2 +- KKdMainLib/Properties/AssemblyInfo.cs | 2 +- KKdMainLib/Properties/Resources.Designer.cs | 18 +- KKdMainLib/Tables.cs | 21 +- KKdSoundLib/KKdSoundLib.csproj | 4 +- KKdSoundLib/Properties/AssemblyInfo.cs | 2 +- PD_Tool/PD_Tool.csproj | 267 ++++++-------------- PD_Tool/Program.cs | 53 ++-- PD_Tool/Properties/AssemblyInfo.cs | 2 +- PD_Tool/classes/FARC.cs | 2 +- 22 files changed, 184 insertions(+), 267 deletions(-) diff --git a/KKdBaseLib/Auth2D.cs b/KKdBaseLib/Auth2D.cs index b7e2124..e914075 100644 --- a/KKdBaseLib/Auth2D.cs +++ b/KKdBaseLib/Auth2D.cs @@ -213,12 +213,12 @@ namespace KKdBaseLib.Auth2D public CountPointer Identifiers; public override string ToString() => $"Width: {Width}; Height: {Height}; Color: {Color:X2)}"; - + public struct Identifier { public Pointer Name; public uint ID; - + public override string ToString() => $"ID: {ID}; Name: {Name}"; } } diff --git a/KKdBaseLib/Extensions.cs b/KKdBaseLib/Extensions.cs index 0def7df..8854228 100644 --- a/KKdBaseLib/Extensions.cs +++ b/KKdBaseLib/Extensions.cs @@ -7,7 +7,7 @@ namespace KKdBaseLib public static double Acos (this double d ) => Math.Acos (d ); public static double Asin (this double d ) => Math.Asin (d ); public static double Atan (this double d ) => Math.Atan (d ); - public static double Aсtg (this double d ) => 1 / Math.Atan (d ); + public static double Actg (this double d ) => 1 / Math.Atan (d ); public static double Cos (this double d ) => Math.Cos (d ); public static double Cosh (this double val) => Math.Cosh (val); public static double Sin (this double a ) => Math.Sin (a ); @@ -36,7 +36,7 @@ namespace KKdBaseLib public static float Acos (this float d ) => (float) Math.Acos (d ) ; public static float Asin (this float d ) => (float) Math.Asin (d ) ; public static float Atan (this float d ) => (float) Math.Atan (d ) ; - public static float Aсtg (this float d ) => (float)(1 / Math.Atan (d )); + public static float Actg (this float d ) => (float)(1 / Math.Atan (d )); public static float Cos (this float d ) => (float) Math.Cos (d ) ; public static float Cosh (this float val) => (float) Math.Cosh (val) ; public static float Sin (this float a ) => (float) Math.Sin (a ) ; diff --git a/KKdBaseLib/Interpolation/PDI.cs b/KKdBaseLib/Interpolation/PDI.cs index 18a28d6..a0817d5 100644 --- a/KKdBaseLib/Interpolation/PDI.cs +++ b/KKdBaseLib/Interpolation/PDI.cs @@ -124,7 +124,7 @@ namespace KKdBaseLib.Interpolation else result = frame > c.F ? n.V : c.V; return result; } - + public void ResetFrameCount() { f = -df; t = f / rf; } public override string ToString() => $"F: {f}; T: {t}; V: {v}"; diff --git a/KKdBaseLib/KKdBaseLib.csproj b/KKdBaseLib/KKdBaseLib.csproj index 0188dc1..794f857 100644 --- a/KKdBaseLib/KKdBaseLib.csproj +++ b/KKdBaseLib/KKdBaseLib.csproj @@ -1,4 +1,4 @@ - + korenkonder @@ -9,7 +9,7 @@ 0.4.9.3 KKdBaseLib KKdBaseLib - netstandard2.0 + net461 KKdBaseLib 0.4.9.3 @@ -39,4 +39,7 @@ 8.0 IDE0004, IDE0044, IDE0045, IDE0046, IDE0055, IDE0059, IDE0069, IDE1006 + + + diff --git a/KKdBaseLib/Mat2.cs b/KKdBaseLib/Mat2.cs index f08475f..f7f9062 100644 --- a/KKdBaseLib/Mat2.cs +++ b/KKdBaseLib/Mat2.cs @@ -69,7 +69,7 @@ namespace KKdBaseLib if (irow != icol) for (int k = 0; k < 2; k++) - (inverse[irow, k], inverse[icol, k]) = (inverse[icol, k], inverse[irow, k]); + { float t = inverse[irow, k]; inverse[irow, k] = inverse[icol, k]; inverse[icol, k] = t; } rowIdx[i] = irow; colIdx[i] = icol; @@ -97,7 +97,7 @@ namespace KKdBaseLib int ir = rowIdx[j]; int ic = colIdx[j]; for (int k = 0; k < 2; k++) - (inverse[k, ic], inverse[k, ir]) = (inverse[k, ir], inverse[k, ic]); + { float t = inverse[k, ic]; inverse[k, ic] = inverse[k, ir]; inverse[k, ir] = t; } } result.Row0.X = inverse[0, 0]; result.Row0.Y = inverse[0, 1]; diff --git a/KKdBaseLib/Mat3.cs b/KKdBaseLib/Mat3.cs index 618a39f..c4c8565 100644 --- a/KKdBaseLib/Mat3.cs +++ b/KKdBaseLib/Mat3.cs @@ -154,7 +154,7 @@ namespace KKdBaseLib if (irow != icol) for (int k = 0; k < 3; k++) - (inverse[irow, k], inverse[icol, k]) = (inverse[icol, k], inverse[irow, k]); + { float t = inverse[irow, k]; inverse[irow, k] = inverse[icol, k]; inverse[icol, k] = t; } rowIdx[i] = irow; colIdx[i] = icol; @@ -182,7 +182,7 @@ namespace KKdBaseLib int ir = rowIdx[j]; int ic = colIdx[j]; for (int k = 0; k < 3; k++) - (inverse[k, ic], inverse[k, ir]) = (inverse[k, ir], inverse[k, ic]); + { float t = inverse[k, ic]; inverse[k, ic] = inverse[k, ir]; inverse[k, ir] = t; } } result.Row0.X = inverse[0, 0]; result.Row0.Y = inverse[0, 1]; result.Row0.Z = inverse[0, 2]; diff --git a/KKdBaseLib/Mat4.cs b/KKdBaseLib/Mat4.cs index ab978fa..00a375e 100644 --- a/KKdBaseLib/Mat4.cs +++ b/KKdBaseLib/Mat4.cs @@ -181,7 +181,7 @@ namespace KKdBaseLib if (irow != icol) for (int k = 0; k < 4; k++) - (inverse[irow, k], inverse[icol, k]) = (inverse[icol, k], inverse[irow, k]); + { float t = inverse[irow, k]; inverse[irow, k] = inverse[icol, k]; inverse[icol, k] = t; } rowIdx[i] = irow; colIdx[i] = icol; @@ -209,11 +209,7 @@ namespace KKdBaseLib int ir = rowIdx[j]; int ic = colIdx[j]; for (int k = 0; k < 4; k++) - { - float f = inverse[k, ir]; - inverse[k, ir] = inverse[k, ic]; - inverse[k, ic] = f; - } + { float t = inverse[k, ic]; inverse[k, ic] = inverse[k, ir]; inverse[k, ir] = t; } } result.Row0.X = inverse[0, 0]; result.Row0.Y = inverse[0, 1]; diff --git a/KKdBaseLib/Properties/AssemblyInfo.cs b/KKdBaseLib/Properties/AssemblyInfo.cs index 13268a1..6417b7c 100644 --- a/KKdBaseLib/Properties/AssemblyInfo.cs +++ b/KKdBaseLib/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyTrademark("")] diff --git a/KKdBaseLib/Tables.cs b/KKdBaseLib/Tables.cs index 8068f89..71fe29e 100644 --- a/KKdBaseLib/Tables.cs +++ b/KKdBaseLib/Tables.cs @@ -1,4 +1,4 @@ -namespace KKdBaseLib +namespace KKdBaseLib.Tables { public struct ButtonSE { diff --git a/KKdMainLib/DataBank.cs b/KKdMainLib/DataBank.cs index 8875fbb..b3d4e17 100644 --- a/KKdMainLib/DataBank.cs +++ b/KKdMainLib/DataBank.cs @@ -177,7 +177,7 @@ namespace KKdMainLib .Add(p2.WriteMP("P2")).Add(p3.WriteMP("P3")); public override string ToString() => - UrlEncode($"{p1.ToString()},{p2.ToString()},{p3.ToString()},{PV_ID}"); + UrlEncode($"{p1},{p2},{p3},{PV_ID}"); } public struct Player diff --git a/KKdMainLib/FARC.cs b/KKdMainLib/FARC.cs index b0ae8fe..fff728f 100644 --- a/KKdMainLib/FARC.cs +++ b/KKdMainLib/FARC.cs @@ -57,9 +57,9 @@ namespace KKdMainLib reader.RI32(); int farcMode = reader.RI32E(true); - Format = (FARCType & Type.ECB) != 0 && (farcMode & (farcMode - 1)) != 0 ? Format.FT : Format.DT; + Format = (FARCType & Type.Enc) != 0 && (farcMode & (farcMode - 1)) != 0 ? Format.FT : Format.DT; - if (Format == Format.FT && (FARCType & Type.ECB) != 0) + if (Format == Format.FT && (FARCType & Type.Enc) != 0) { reader.Dispose(); byte[] header = new byte[headerLength - 0x08]; @@ -155,18 +155,17 @@ namespace KKdMainLib return file.Data; } - int FileSize = (FARCType & Type.ECB) != 0 || (file.Type & Type.ECB) != 0 ? - file.SizeComp.A(0x10) : ((FARCType & Type.GZip) != 0 || (file.Type & Type.GZip) != 0 ? file.SizeComp : file.SizeUnc); + int FileSize = ((FARCType | file.Type) & Type.Enc) != 0 ? file.SizeComp.A(0x10) + : (((FARCType | file.Type) & Type.GZip) != 0 ? file.SizeComp : file.SizeUnc); using (Stream stream = File.OpenReader(FilePath)) { stream.S(file.Offset, 0); file.Data = stream.RBy(FileSize); } - - if ((FARCType & Type.ECB) != 0) + if ((FARCType & Type.Enc) != 0) { - if (Format == Format.FT && (file.Type & Type.ECB) != 0) + if (Format == Format.FT && (file.Type & Type.Enc) != 0) { using (AesManaged aes = GetAes(true, null)) using (CryptoStream cryptoStream = new CryptoStream(new MSIO.MemoryStream(file.Data), @@ -181,8 +180,7 @@ namespace KKdMainLib cryptoStream.Read(file.Data, 0, FileSize); } - if (((Format == Format.FT && (file.Type & Type.GZip) != 0) || - (FARCType & Type.GZip) != 0) && file.SizeUnc > 0) + if (((file.Type | FARCType) & Type.GZip) != 0 && file.SizeUnc > 0) file.Data = file.Data.InflateGZip(file.SizeUnc); Files[i] = file; @@ -223,7 +221,7 @@ namespace KKdMainLib public void Save() { - if (!HasFiles) return; + if (!HasFiles || (Signature != Farc.FArc && Signature != Farc.FArC && Signature != Farc.FARC)) return; for (int i = 0; i < Files.Count; i++) { @@ -292,7 +290,7 @@ namespace KKdMainLib file.SizeComp = data.Length; } - if (Signature == Farc.FARC && (FARCType & Type.ECB) != 0) + if (Signature == Farc.FARC && (FARCType & Type.Enc) != 0) { int alignLength = data.Length.A(0x40); byte[] tempData = new byte[alignLength]; @@ -347,7 +345,7 @@ namespace KKdMainLib { None = 0b000, GZip = 0b010, - ECB = 0b100, + Enc = 0b100, } } } diff --git a/KKdMainLib/KKdMainLib.csproj b/KKdMainLib/KKdMainLib.csproj index f1f1e8b..1c38ef0 100644 --- a/KKdMainLib/KKdMainLib.csproj +++ b/KKdMainLib/KKdMainLib.csproj @@ -1,4 +1,4 @@ - + korenkonder @@ -9,7 +9,7 @@ 0.4.9.3 KKdMainLib KKdMainLib - netstandard2.0 + net461 KKdMainLib 0.4.9.3 @@ -42,4 +42,17 @@ + + + True + True + Resources.resx + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + diff --git a/KKdMainLib/MotHead.cs b/KKdMainLib/MotHead.cs index c38a484..bb0d92f 100644 --- a/KKdMainLib/MotHead.cs +++ b/KKdMainLib/MotHead.cs @@ -127,7 +127,7 @@ RETURN: Header. EndMotionID = Header.Data[i].MotionID; } - _IO = File.OpenWriter(file + ".bin"); + _IO = File.OpenWriter(file + ".bin", true); _IO.W(0x01); _IO.W(0x20); _IO.A(0x20, true); diff --git a/KKdMainLib/Properties/AssemblyInfo.cs b/KKdMainLib/Properties/AssemblyInfo.cs index c7f3c9a..c2eba1d 100644 --- a/KKdMainLib/Properties/AssemblyInfo.cs +++ b/KKdMainLib/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyTrademark("")] diff --git a/KKdMainLib/Properties/Resources.Designer.cs b/KKdMainLib/Properties/Resources.Designer.cs index b1c79bf..6edf8bc 100644 --- a/KKdMainLib/Properties/Resources.Designer.cs +++ b/KKdMainLib/Properties/Resources.Designer.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:4.0.30319.42000 @@ -10,8 +10,8 @@ namespace KKdMainLib.Properties { using System; - - + + /// /// A strongly-typed resource class, for looking up localized strings, etc. /// @@ -23,15 +23,15 @@ namespace KKdMainLib.Properties { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { - + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal Resources() { } - + /// /// Returns the cached ResourceManager instance used by this class. /// @@ -45,7 +45,7 @@ namespace KKdMainLib.Properties { return resourceMan; } } - + /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. @@ -59,7 +59,7 @@ namespace KKdMainLib.Properties { resourceCulture = value; } } - + /// /// Looks up a localized resource of type System.Byte[]. /// diff --git a/KKdMainLib/Tables.cs b/KKdMainLib/Tables.cs index a564cad..c15ebba 100644 --- a/KKdMainLib/Tables.cs +++ b/KKdMainLib/Tables.cs @@ -1,5 +1,6 @@ using KKdBaseLib; using KKdMainLib.IO; +using KKdBaseLib.Tables; using TableDict = System.Collections.Generic.Dictionary; namespace KKdMainLib @@ -256,18 +257,18 @@ namespace KKdMainLib static TableDate GetStartTableDate(TableDict dict, string name) { TableDate date = default; date.SDL(); int val; - if (dict.FV(out val, name + "st_day" )) date.Day = val; - if (dict.FV(out val, name + "st_month")) date.Month = val; if (dict.FV(out val, name + "st_year" )) date.Year = val; + if (dict.FV(out val, name + "st_month")) date.Month = val; + if (dict.FV(out val, name + "st_day" )) date.Day = val; return date; } static TableDate GetEndTableDate(TableDict dict, string name) { TableDate date = default; date.SDU(); int val; - if (dict.FV(out val, name + "ed_day" )) date.Day = val; - if (dict.FV(out val, name + "ed_month")) date.Month = val; if (dict.FV(out val, name + "ed_year" )) date.Year = val; + if (dict.FV(out val, name + "ed_month")) date.Month = val; + if (dict.FV(out val, name + "ed_day" )) date.Day = val; return date; } } @@ -458,14 +459,14 @@ namespace KKdMainLib W(name + "id" , pv.ID ); W(name + "ignore", pv.Ignore); W(name + "name" , pv.Name ); - WriteDifficulty(_IO, name + "extreme.", pv.Normal ); + WriteDifficulty(_IO, name + "normal.", pv.Normal ); } W("pv_list.data_list.length", length); _IO.D(); static void WriteDifficulty(Stream _IO, string name, PV.Difficulty[] arr) { - if (arr == null) { _IO.W($"{name}.length=0\n"); return; } + if (arr == null) { _IO.W($"{name}length=0\n"); return; } int length = arr.Length; int[] so = length.SW(); @@ -473,12 +474,12 @@ namespace KKdMainLib { ref PV.Difficulty diff = ref arr[so[i]]; - WriteStartTableDate(_IO, $"{name}{i}.", diff.Start); - _IO.W($"{name}{i}.edition" + $"={diff.Edition}\n"); WriteEndTableDate(_IO, $"{name}{i}.", diff.End ); + _IO.W($"{name}{i}.edition" + $"={diff.Edition}\n"); + WriteStartTableDate(_IO, $"{name}{i}.", diff.Start); _IO.W($"{name}{i}.ver" + $"={diff.Version}\n"); } - _IO.W($"{name}.length={length}\n"); + _IO.W($"{name}length={length}\n"); } } else if (SlideSETable != null) @@ -679,7 +680,7 @@ namespace KKdMainLib pltMP.R("ShadowColorR", out plt.ShadowColorR); } } - else if ((temp = msgPack["PV", true]).NotNull) + else if ((temp = msgPack["PVList", true]).NotNull) { PVList = new PV[temp.Array.Length]; for (i0 = 0; i0 < PVList.Length; i0++) diff --git a/KKdSoundLib/KKdSoundLib.csproj b/KKdSoundLib/KKdSoundLib.csproj index 8c67763..107e581 100644 --- a/KKdSoundLib/KKdSoundLib.csproj +++ b/KKdSoundLib/KKdSoundLib.csproj @@ -1,4 +1,4 @@ - + korenkonder @@ -9,7 +9,7 @@ 0.1.2.0 KKdSoundLib KKdSoundLib - netstandard2.0 + net461 KKdSoundLib 0.1.2.0 diff --git a/KKdSoundLib/Properties/AssemblyInfo.cs b/KKdSoundLib/Properties/AssemblyInfo.cs index 547dbdc..8d5862b 100644 --- a/KKdSoundLib/Properties/AssemblyInfo.cs +++ b/KKdSoundLib/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyTrademark("")] diff --git a/PD_Tool/PD_Tool.csproj b/PD_Tool/PD_Tool.csproj index 18cfcce..20c5170 100644 --- a/PD_Tool/PD_Tool.csproj +++ b/PD_Tool/PD_Tool.csproj @@ -1,184 +1,85 @@ - - - - - Debug - AnyCPU - {7B5D5A3A-A6F8-4813-C97D-ACFC98F7397E} - Exe - PD_Tool - PD_Tool - v4.6.1 - 512 - true - Always - - - AnyCPU - true - full - false - ..\build\ - DEBUG;TRACE - prompt - 4 - true - 8.0 - IDE0004, IDE0044, IDE0045, IDE0046, IDE0055, IDE0059, IDE0069, IDE1006 - - - AnyCPU - embedded - true - ..\build\ - TRACE - prompt - 4 - true - true - 8.0 - IDE0004, IDE0044, IDE0045, IDE0046, IDE0055, IDE0059, IDE0069, IDE1006 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {437f63f1-8c23-429e-ab14-38b85c9edb16} - KKdBaseLib - - - {2ba7efc6-91d1-8bbc-c487-06c7f36cc789} - KKdMainLib - - - {d8a3f2d7-10cc-5723-ec9a-45d3b9c2df77} - KKdSoundLib - - - - - del Microsoft.Win32.Primitives.dll -del netstandard.dll -del PD_Tool.exe.config -del System.AppContext.dll -del System.Collections.Concurrent.dll -del System.Collections.dll -del System.Collections.NonGeneric.dll -del System.Collections.Specialized.dll -del System.ComponentModel.dll -del System.ComponentModel.EventBasedAsync.dll -del System.ComponentModel.Primitives.dll -del System.ComponentModel.TypeConverter.dll -del System.Console.dll -del System.Data.Common.dll -del System.Diagnostics.Contracts.dll -del System.Diagnostics.Debug.dll -del System.Diagnostics.FileVersionInfo.dll -del System.Diagnostics.Process.dll -del System.Diagnostics.StackTrace.dll -del System.Diagnostics.TextWriterTraceListener.dll -del System.Diagnostics.Tools.dll -del System.Diagnostics.TraceSource.dll -del System.Diagnostics.Tracing.dll -del System.Drawing.Primitives.dll -del System.Dynamic.Runtime.dll -del System.Globalization.Calendars.dll -del System.Globalization.dll -del System.Globalization.Extensions.dll -del System.IO.Compression.dll -del System.IO.Compression.ZipFile.dll -del System.IO.dll -del System.IO.FileSystem.dll -del System.IO.FileSystem.DriveInfo.dll -del System.IO.FileSystem.Primitives.dll -del System.IO.FileSystem.Watcher.dll -del System.IO.IsolatedStorage.dll -del System.IO.MemoryMappedFiles.dll -del System.IO.Pipes.dll -del System.IO.UnmanagedMemoryStream.dll -del System.Linq.dll -del System.Linq.Expressions.dll -del System.Linq.Parallel.dll -del System.Linq.Queryable.dll -del System.Net.Http.dll -del System.Net.NameResolution.dll -del System.Net.NetworkInformation.dll -del System.Net.Ping.dll -del System.Net.Primitives.dll -del System.Net.Requests.dll -del System.Net.Security.dll -del System.Net.Sockets.dll -del System.Net.WebHeaderCollection.dll -del System.Net.WebSockets.Client.dll -del System.Net.WebSockets.dll -del System.ObjectModel.dll -del System.Reflection.dll -del System.Reflection.Extensions.dll -del System.Reflection.Primitives.dll -del System.Resources.Reader.dll -del System.Resources.ResourceManager.dll -del System.Resources.Writer.dll -del System.Runtime.CompilerServices.VisualC.dll -del System.Runtime.dll -del System.Runtime.Extensions.dll -del System.Runtime.Handles.dll -del System.Runtime.InteropServices.dll -del System.Runtime.InteropServices.RuntimeInformation.dll -del System.Runtime.Numerics.dll -del System.Runtime.Serialization.Formatters.dll -del System.Runtime.Serialization.Json.dll -del System.Runtime.Serialization.Primitives.dll -del System.Runtime.Serialization.Xml.dll -del System.Security.Claims.dll -del System.Security.Cryptography.Algorithms.dll -del System.Security.Cryptography.Csp.dll -del System.Security.Cryptography.Encoding.dll -del System.Security.Cryptography.Primitives.dll -del System.Security.Cryptography.X509Certificates.dll -del System.Security.Principal.dll -del System.Security.SecureString.dll -del System.Text.Encoding.dll -del System.Text.Encoding.Extensions.dll -del System.Text.RegularExpressions.dll -del System.Threading.dll -del System.Threading.Overlapped.dll -del System.Threading.Tasks.dll -del System.Threading.Tasks.Parallel.dll -del System.Threading.Thread.dll -del System.Threading.ThreadPool.dll -del System.Threading.Timer.dll -del System.ValueTuple.dll -del System.Xml.ReaderWriter.dll -del System.Xml.XDocument.dll -del System.Xml.XmlDocument.dll -del System.Xml.XmlSerializer.dll -del System.Xml.XPath.dll -del System.Xml.XPath.XDocument.dll - + + + + + Debug + AnyCPU + {7B5D5A3A-A6F8-4813-C97D-ACFC98F7397E} + Exe + PD_Tool + PD_Tool + v4.6.1 + 512 + true + Always + + + AnyCPU + true + full + false + ..\build\ + DEBUG;TRACE + prompt + 4 + true + 8.0 + IDE0004, IDE0044, IDE0045, IDE0046, IDE0055, IDE0059, IDE0069, IDE1006 + + + AnyCPU + embedded + true + ..\build\ + TRACE + prompt + 4 + true + true + 8.0 + IDE0004, IDE0044, IDE0045, IDE0046, IDE0055, IDE0059, IDE0069, IDE1006 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {437f63f1-8c23-429e-ab14-38b85c9edb16} + KKdBaseLib + + + {2ba7efc6-91d1-8bbc-c487-06c7f36cc789} + KKdMainLib + + + {d8a3f2d7-10cc-5723-ec9a-45d3b9c2df77} + KKdSoundLib + + + \ No newline at end of file diff --git a/PD_Tool/Program.cs b/PD_Tool/Program.cs index 8c72090..8ff8152 100644 --- a/PD_Tool/Program.cs +++ b/PD_Tool/Program.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Windows.Forms; using KKdMainLib; using KKdMainLib.IO; @@ -46,7 +46,7 @@ namespace PD_Tool private static void MainMenu() { - Console.Title = "PD_Tool v0.4.9.3"; + Console.Title = "PD_Tool v0.4.9.3.2"; Console.Clear(); ConsoleDesign(true); @@ -191,26 +191,31 @@ namespace PD_Tool } else if (choose[0] == '8') { - Console.Clear(); - Console.Title = "FT/M39 Converting Tools"; - ConsoleDesign(true); - ConsoleDesign(" Choose converter:"); - ConsoleDesign(false); - ConsoleDesign("1. A3DA" ); - ConsoleDesign("2. AddParam"); - ConsoleDesign("3. AET" ); - ConsoleDesign("4. DEX" ); - ConsoleDesign("5. DIVA" ); - ConsoleDesign("6. MotHead" ); - ConsoleDesign("7. MOT" ); - ConsoleDesign("8. Table" ); - ConsoleDesign("9. STR" ); - ConsoleDesign(false); - ConsoleDesign("R. Return to Main Menu"); - ConsoleDesign(false); - ConsoleDesign(true); - Console.WriteLine(); - string localChoose = Console.ReadLine().ToUpper(); + string localChoose = ""; + if (choose.Length == 1) + { + Console.Clear(); + Console.Title = "FT/M39 Converting Tools"; + ConsoleDesign(true); + ConsoleDesign(" Choose converter:"); + ConsoleDesign(false); + ConsoleDesign("1. A3DA" ); + ConsoleDesign("2. AddParam"); + ConsoleDesign("3. AET" ); + ConsoleDesign("4. DEX" ); + ConsoleDesign("5. DIVA" ); + ConsoleDesign("6. MotHead" ); + ConsoleDesign("7. MOT" ); + ConsoleDesign("8. Table" ); + ConsoleDesign("9. STR" ); + ConsoleDesign(false); + ConsoleDesign("R. Return to Main Menu"); + ConsoleDesign(false); + ConsoleDesign(true); + Console.WriteLine(); + localChoose = Console.ReadLine().ToUpper(); + } + else localChoose = choose[1].ToString(); if (localChoose == "1") A3D.Processor(json); else if (localChoose == "2") ADP.Processor(json); else if (localChoose == "3") AET.Processor(json); @@ -241,7 +246,7 @@ namespace PD_Tool } public static void Exit() => Environment.Exit(0); - + public static void ConsoleDesign(string text, params string[] args) { text = string.Format(text, args); @@ -312,7 +317,7 @@ namespace PD_Tool bin + GetArgs("FARC Archives", true, "farc") + json + mp; else if (filetype == "vag" ) Filter = GetArgs("VAG" , "vag", "wav") + GetArgs("VAG", true, "vag") + wav; - + using OpenFileDialog ofd = new OpenFileDialog { //InitialDirectory = Application.StartupPath, Filter = Filter, Multiselect = true, Title = "Choose file(s) to open:" }; if (ofd.ShowDialog() == DialogResult.OK) FileNames = ofd.FileNames; diff --git a/PD_Tool/Properties/AssemblyInfo.cs b/PD_Tool/Properties/AssemblyInfo.cs index 6949e36..1912310 100644 --- a/PD_Tool/Properties/AssemblyInfo.cs +++ b/PD_Tool/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.InteropServices; [assembly: AssemblyTitle("PD_Tool")] diff --git a/PD_Tool/classes/FARC.cs b/PD_Tool/classes/FARC.cs index f14c250..b614f52 100644 --- a/PD_Tool/classes/FARC.cs +++ b/PD_Tool/classes/FARC.cs @@ -64,7 +64,7 @@ namespace PD_Tool Console.WriteLine(); choose = Console.ReadLine().ToUpper(); if (choose == "2" || choose == "4") farc.FARCType |= KKdFARC.Type.GZip; - if (choose == "3" || choose == "4") farc.FARCType |= KKdFARC.Type.ECB ; + if (choose == "3" || choose == "4") farc.FARCType |= KKdFARC.Type.Enc ; } else if (choose == "R") return; else farc.Signature = KKdFARC.Farc.FArC;