Release v0.4.9.9
A3DA, Bloom, Color Correction, DOF, Light, MotHead
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
||||
@@ -12,18 +12,19 @@ namespace KKdBaseLib.F2
|
||||
public uint Length => length(false);
|
||||
public uint LengthX => length( true);
|
||||
|
||||
public uint Depth => Header.Depth;
|
||||
|
||||
public bool HasPOF => POF .NotNull;
|
||||
public bool HasENRS => ENRS.NotNull;
|
||||
public bool HasSubStructs => SubStructs != null;
|
||||
|
||||
public long DataOffset;
|
||||
|
||||
public void Update(bool ShiftX = false)
|
||||
public void Update(bool shiftX = false)
|
||||
{
|
||||
if (Header.Signature == 0x4C435450 && SubStructs == null)
|
||||
SubStructs = new Struct[0];
|
||||
|
||||
Header.SectionSize = Data != null ? (uint)Data.Length : 0;
|
||||
Header.DataSize = length(ShiftX);
|
||||
Header.DataSize = length(shiftX);
|
||||
}
|
||||
|
||||
private uint length(bool shiftX = false)
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
<Configuration></Configuration>
|
||||
<Copyright>korenkonder (C) 2019-2020</Copyright>
|
||||
<Description>A base library</Description>
|
||||
<FileVersion>0.4.9.8</FileVersion>
|
||||
<FileVersion>0.4.9.9</FileVersion>
|
||||
<PackageId>KKdBaseLib</PackageId>
|
||||
<Product>KKdBaseLib</Product>
|
||||
<TargetFramework>net461</TargetFramework>
|
||||
<Title>KKdBaseLib</Title>
|
||||
<Version>0.4.9.8</Version>
|
||||
<Version>0.4.9.9</Version>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@@ -24,7 +24,7 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<NoWarn>IDE0004, IDE0032, IDE0044, IDE0045, IDE0046, IDE0055, IDE0059, IDE0066, IDE0069, IDE1006</NoWarn>
|
||||
<NoWarn>IDE0004, IDE0018, IDE0032, IDE0044, IDE0045, IDE0046, IDE0055, IDE0059, IDE0066, IDE0069, IDE1006</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@@ -37,7 +37,7 @@
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<NoWarn>IDE0004, IDE0032, IDE0044, IDE0045, IDE0046, IDE0055, IDE0059, IDE0066, IDE0069, IDE1006</NoWarn>
|
||||
<NoWarn>IDE0004, IDE0018, IDE0032, IDE0044, IDE0045, IDE0046, IDE0055, IDE0059, IDE0066, IDE0069, IDE1006</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
|
||||
@@ -26,8 +26,6 @@ namespace KKdBaseLib
|
||||
public MsgPack(string name, object @object)
|
||||
{ Name = name; Object = @object; }
|
||||
|
||||
public static MsgPack Null => new MsgPack();
|
||||
|
||||
public MsgPack this[ int index]
|
||||
{ get => Object is MsgPack[] Array ? Array[index] : default;
|
||||
set { if (Object is MsgPack[] Array) { Array[index] = value; Object = Array; } } }
|
||||
|
||||
+4
-2
@@ -732,8 +732,9 @@ namespace KKdMainLib
|
||||
|
||||
public MsgPack MsgPackWriter(ref Pointer<Scene> aetData)
|
||||
{
|
||||
if (aetData.O <= 0) return default;
|
||||
|
||||
int i, i0;
|
||||
if (aetData.O <= 0) return MsgPack.Null;
|
||||
ref Scene aet = ref aetData.V;
|
||||
|
||||
MsgPack msgPack = MsgPack.New.Add("Name", aet.Name.V).Add("StartFrame", aet.StartFrame)
|
||||
@@ -966,7 +967,8 @@ namespace KKdMainLib
|
||||
|
||||
private MsgPack WMP(ref CountPointer<KFT2> kfe, string name)
|
||||
{
|
||||
if (kfe.C < 1) return MsgPack.Null;
|
||||
if (kfe.C < 1) return default;
|
||||
|
||||
if (kfe.C == 1) return new MsgPack(name, kfe.E[0].V);
|
||||
MsgPack msg = new MsgPack(kfe.C, name);
|
||||
for (int i = 0; i < kfe.E.Length; i++)
|
||||
|
||||
@@ -147,24 +147,28 @@ namespace KKdMainLib
|
||||
{
|
||||
byte[] Data;
|
||||
using (Stream stream = File.OpenWriter())
|
||||
{ stream.W(@struct, shiftX, useDepth); stream.WEOFC(); Data = stream.ToArray(); }
|
||||
{ stream.W(@struct, 0, shiftX, useDepth); stream.WEOFC(); Data = stream.ToArray(); }
|
||||
return Data;
|
||||
}
|
||||
|
||||
public static void W(this Stream stream, Struct @struct, bool shiftX = false, bool useDepth = true)
|
||||
public static void W(this Stream stream, Struct @struct, uint depth = 0,
|
||||
bool shiftX = false, bool useDepth = true)
|
||||
{
|
||||
@struct.Update(shiftX);
|
||||
|
||||
if (@struct.Header.Signature == 0x54434645)
|
||||
{ }
|
||||
|
||||
@struct.Header.Depth = depth;
|
||||
stream.W(@struct.Header);
|
||||
if (@struct.Data != null) stream.W(@struct.Data);
|
||||
if (@struct.HasPOF ) stream.W(@struct.POF , shiftX, useDepth ? @struct.Depth + 1 : 0u);
|
||||
if (@struct.HasENRS) stream.W(@struct.ENRS, useDepth ? @struct.Depth + 1 : 0u);
|
||||
if (@struct.HasPOF ) stream.W(@struct.POF , shiftX, useDepth ? depth + 1 : 0u);
|
||||
if (@struct.HasENRS) stream.W(@struct.ENRS, useDepth ? depth + 1 : 0u);
|
||||
if (@struct.HasSubStructs)
|
||||
{
|
||||
for (int i = 0; i < @struct.SubStructs.Length; i++)
|
||||
stream.W(@struct.SubStructs[i], shiftX);
|
||||
stream.WEOFC(@struct.Depth + 1);
|
||||
}
|
||||
stream.W(@struct.SubStructs[i], depth + 1, shiftX, useDepth);
|
||||
if (@struct.HasPOF || @struct.HasENRS || @struct.HasSubStructs)
|
||||
stream.WEOFC(depth + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace KKdMainLib.F2
|
||||
header = s.ReadHeader();
|
||||
if (header.Signature != 0x544D4C42 || header.InnerSignature != 0x3) return;
|
||||
s.P -= 0x4;
|
||||
s.IsBE = header.UseBigEndian;
|
||||
|
||||
BLTs = s.RCPE<BLT>();
|
||||
if (BLTs.C < 1) { s.C(); BLTs.C = -1; return; }
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace KKdMainLib.F2
|
||||
header = s.ReadHeader();
|
||||
if (header.Signature != 0x54524343 || header.InnerSignature != 0x3) return;
|
||||
s.P -= 0x4;
|
||||
s.IsBE = header.UseBigEndian;
|
||||
|
||||
CCTs = s.RCPE<CCT>();
|
||||
if (CCTs.C < 1) { s.C(); CCTs.C = -1; return; }
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace KKdMainLib.F2
|
||||
header = s.ReadHeader();
|
||||
if (header.Signature != 0x54464F44 || header.InnerSignature != 0x3) return;
|
||||
s.P -= 0x4;
|
||||
s.IsBE = header.UseBigEndian;
|
||||
|
||||
DFTs = s.RCPE<DFT>();
|
||||
if (DFTs.C < 1) { s.C(); DFTs.C = -1; return; }
|
||||
|
||||
@@ -17,8 +17,8 @@ namespace KKdMainLib.F2
|
||||
LITs = default;
|
||||
s = File.OpenReader(file + ".lit", true);
|
||||
header = s.ReadHeader();
|
||||
if (header.Signature != 0x4354494C || header.InnerSignature != 0x2 ||
|
||||
header.SectionSignature != 0x2) return;
|
||||
if (header.Signature != 0x4354494C || header.InnerSignature != 0x2) return;
|
||||
s.IsBE = header.UseBigEndian;
|
||||
|
||||
LITs = s.RCPE<CountPointer<LIT>>();
|
||||
if (LITs.C < 1) { s.C(); LITs.C = -1; return; }
|
||||
|
||||
+7
-14
@@ -21,7 +21,7 @@ namespace KKdMainLib
|
||||
public Farc Signature = Farc.FArC;
|
||||
public Format Format = Format.DT;
|
||||
public string FilePath, DirectoryPath;
|
||||
public bool HasFiles => Files.IsNull ? false : Files.Count > 0;
|
||||
public bool HasFiles => !Files.IsNull || Files.Count > 0;
|
||||
public int CompressionLevel = 12;
|
||||
|
||||
private readonly byte[] key = "project_diva.bin".ToASCII();
|
||||
@@ -43,7 +43,7 @@ namespace KKdMainLib
|
||||
if (!File.Exists(FilePath)) return false;
|
||||
|
||||
Stream reader = File.OpenReader(FilePath);
|
||||
DirectoryPath = Path.GetFullPath(FilePath).Replace(Path.GetExtension(FilePath), "");
|
||||
DirectoryPath = Path.RemoveExtension(Path.GetFullPath(FilePath));
|
||||
Signature = (Farc)reader.RI32E(true);
|
||||
if (Signature != Farc.FArc && Signature != Farc.FArC && Signature != Farc.FARC)
|
||||
{ reader.Dispose(); return false; }
|
||||
@@ -140,15 +140,9 @@ namespace KKdMainLib
|
||||
FARCFile file = Files[i];
|
||||
if (Signature != Farc.FARC)
|
||||
{
|
||||
if (Signature == Farc.FArC)
|
||||
using (MSIO.MemoryStream memorystream = new MSIO.MemoryStream(
|
||||
File.ReadAllBytes(FilePath, file.SizeComp, file.Offset)))
|
||||
using (GZipStream gZipStream = new GZipStream(memorystream, CompressionMode.Decompress))
|
||||
{
|
||||
file.Data = new byte[file.SizeUnc];
|
||||
gZipStream.Read(file.Data, 0, file.SizeUnc);
|
||||
}
|
||||
else file.Data = File.ReadAllBytes(FilePath, file.SizeUnc, file.Offset);
|
||||
file.Data = Signature == Farc.FArC
|
||||
? File.ReadAllBytes(FilePath, file.SizeComp, file.Offset).InflateGZip(file.SizeUnc)
|
||||
: File.ReadAllBytes(FilePath, file.SizeUnc, file.Offset);
|
||||
Files[i] = file;
|
||||
return file.Data;
|
||||
}
|
||||
@@ -224,7 +218,7 @@ namespace KKdMainLib
|
||||
for (int i = 0; i < Files.Count; i++)
|
||||
{
|
||||
string ext = Path.GetExtension(Files[i].Name).ToLower();
|
||||
if (ext == ".a3da" || ext == ".diva" || ext == ".vag")
|
||||
if (ext == ".a3da" || ext == ".diva" || ext == ".drs" || ext == ".dve" || ext == ".vag")
|
||||
{ Signature = Farc.FArc; break; }
|
||||
}
|
||||
|
||||
@@ -285,8 +279,8 @@ namespace KKdMainLib
|
||||
{
|
||||
file.Type |= Type.GZip;
|
||||
data = file.Data.DeflateGZip(CompressionLevel);
|
||||
file.SizeComp = data.Length;
|
||||
}
|
||||
file.SizeComp = data.Length;
|
||||
|
||||
if (Signature == Farc.FARC && (FARCType & Type.Enc) != 0)
|
||||
{
|
||||
@@ -295,7 +289,6 @@ namespace KKdMainLib
|
||||
System.Array.Copy(data, tempData, data.Length);
|
||||
for (int i1 = file.Data.Length; i1 < alignLength; i1++) tempData[i1] = 0x78;
|
||||
data = Encrypt(tempData, false);
|
||||
file.SizeComp = data.Length;
|
||||
}
|
||||
writer.W(data);
|
||||
|
||||
|
||||
@@ -140,7 +140,9 @@ namespace KKdMainLib.IO
|
||||
if (c == '.') s += _IO.RCUTF8() + RD();
|
||||
else if (c != 'e' && c != 'E')
|
||||
{
|
||||
long val = long.Parse(s);
|
||||
long val;
|
||||
try { val = long.Parse(s); }
|
||||
catch { return ulong.Parse(s); }
|
||||
if (val >= 0x00000000 && val < 0x000000100) return ( byte)val;
|
||||
else if (val >= -0x00000080 && val < 0x000000080) return ( sbyte)val;
|
||||
else if (val >= -0x00008000 && val < 0x000008000) return ( short)val;
|
||||
|
||||
@@ -62,5 +62,11 @@ namespace KKdMainLib.IO
|
||||
|
||||
public static bool IsPathRooted(string path) =>
|
||||
MSIOP.IsPathRooted(path);
|
||||
|
||||
public static string RemoveExtension(string path) =>
|
||||
path.Substring(0, path.Length - GetExtension(path).Length);
|
||||
|
||||
public static string ReplaceExtension(string path, string ext) =>
|
||||
path.Substring(0, path.Length - GetExtension(path).Length) + ext;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
<Configuration></Configuration>
|
||||
<Copyright>korenkonder (C) 2018-2020</Copyright>
|
||||
<Description>A simple library for working with Project Diva AC/DT/F/AFT/F2/X/FT/M39 files</Description>
|
||||
<FileVersion>0.4.9.8</FileVersion>
|
||||
<FileVersion>0.4.9.9</FileVersion>
|
||||
<PackageId>KKdMainLib</PackageId>
|
||||
<Product>KKdMainLib</Product>
|
||||
<TargetFramework>net461</TargetFramework>
|
||||
<Title>KKdMainLib</Title>
|
||||
<Version>0.4.9.8</Version>
|
||||
<Version>0.4.9.9</Version>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@@ -24,7 +24,7 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<NoWarn>IDE0004, IDE0032, IDE0044, IDE0045, IDE0046, IDE0055, IDE0059, IDE0066, IDE0069, IDE1006</NoWarn>
|
||||
<NoWarn>IDE0004, IDE0018, IDE0032, IDE0044, IDE0045, IDE0046, IDE0055, IDE0059, IDE0066, IDE0069, IDE1006</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@@ -37,7 +37,7 @@
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<NoWarn>IDE0004, IDE0032, IDE0044, IDE0045, IDE0046, IDE0055, IDE0059, IDE0066, IDE0069, IDE1006</NoWarn>
|
||||
<NoWarn>IDE0004, IDE0018, IDE0032, IDE0044, IDE0045, IDE0046, IDE0055, IDE0059, IDE0066, IDE0069, IDE1006</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\KKdBaseLib\KKdBaseLib.csproj" />
|
||||
|
||||
+26
-12
@@ -97,7 +97,7 @@ namespace KKdMainLib
|
||||
|
||||
if (Data.Offset > 0)
|
||||
{
|
||||
s.P = Data.Offset;
|
||||
s.P = Data.Offset;
|
||||
if (i1 == 0x01) Data.Array = new int[] { s.RU8 () };
|
||||
else if (i1 == 0x02) Data.Array = new int[] { s.RU16() };
|
||||
else
|
||||
@@ -156,7 +156,7 @@ RETURN:
|
||||
int Size = GetSize(data.Type);
|
||||
if (data.Array == null || data.Array.Length < 1 || Size < 1) continue;
|
||||
|
||||
if (data.Type == 0x3E) s.A(0x20, true);
|
||||
if (data.Type == 0x3E || data.Type == 0x49) s.A(0x20, true);
|
||||
data.Offset = s.P;
|
||||
|
||||
if (Size == 0x01) s.W(( byte)data.Array[0]);
|
||||
@@ -194,7 +194,7 @@ RETURN:
|
||||
}
|
||||
break;
|
||||
}
|
||||
s.A(0x20, true);
|
||||
s.A(0x04, true);
|
||||
Header.SubHeaderOffset = s.P;
|
||||
i1 = Header.EndMotionID - Header.StartMotionID;
|
||||
|
||||
@@ -418,7 +418,15 @@ RETURN:
|
||||
data.Array = new int[] { temp.RI32("i0"),
|
||||
temp.RF32("f1").ToI32(),
|
||||
temp.RI32("i2"),
|
||||
temp.RF32("f3").ToI32() };
|
||||
temp.RF32("f3").ToI32(),
|
||||
temp.RI32("i4"),
|
||||
temp.RI32("i5"),
|
||||
temp.RI32("i6"),
|
||||
temp.RI32("i7"),
|
||||
temp.RI32("i8"),
|
||||
temp.RI32("i9"),
|
||||
temp.RI32("i10"),
|
||||
temp.RI32("i11") };
|
||||
}
|
||||
else if ((temp = array[i0]["Type74"]).NotNull)
|
||||
{
|
||||
@@ -448,8 +456,7 @@ RETURN:
|
||||
data.Type = 0x4C;
|
||||
data.Array = new int[] { temp.RI32("i0"),
|
||||
temp.RF32("f1").ToI32(),
|
||||
temp.RF32("f2").ToI32(),
|
||||
temp.RI32("i3") };
|
||||
temp.RF32("f2").ToI32() };
|
||||
}
|
||||
else if ((temp = array[i0]["Type77"]).NotNull)
|
||||
{
|
||||
@@ -601,8 +608,16 @@ RETURN:
|
||||
arrayEntry.Add(new MsgPack("Type73")
|
||||
.Add("i0", data.Array[0])
|
||||
.Add("f1", data.Array[1].ToF32())
|
||||
.Add("i2", (short)data.Array[2])
|
||||
.Add("f3", data.Array[3].ToF32()));
|
||||
.Add("i2", data.Array[2])
|
||||
.Add("f3", data.Array[3].ToF32())
|
||||
.Add("i4", data.Array[4])
|
||||
.Add("i5", data.Array[5])
|
||||
.Add("i6", data.Array[6])
|
||||
.Add("i7", data.Array[7])
|
||||
.Add("i8", data.Array[8])
|
||||
.Add("i9", data.Array[9])
|
||||
.Add("i10", data.Array[10])
|
||||
.Add("i11", data.Array[11]));
|
||||
else if (data.Type == 0x4A)
|
||||
arrayEntry.Add(new MsgPack("Type74")
|
||||
.Add("i0", data.Array[0]));
|
||||
@@ -626,8 +641,7 @@ RETURN:
|
||||
arrayEntry.Add(new MsgPack("Type76")
|
||||
.Add("i0", data.Array[0])
|
||||
.Add("f1", data.Array[1].ToF32())
|
||||
.Add("f2", data.Array[2].ToF32())
|
||||
.Add("i3", data.Array[3]));
|
||||
.Add("f2", data.Array[2].ToF32()));
|
||||
else if (data.Type == 0x4D)
|
||||
arrayEntry.Add(new MsgPack("Type77")
|
||||
.Add("i0", data.Array[0]));
|
||||
@@ -709,10 +723,10 @@ RETURN:
|
||||
0x46 => 0x04,
|
||||
0x47 => 0x08,
|
||||
0x48 => 0x08,
|
||||
0x49 => 0x10,
|
||||
0x49 => 0x30,
|
||||
0x4A => 0x02,
|
||||
0x4B => 0x34,
|
||||
0x4C => 0x10,
|
||||
0x4C => 0x0C,
|
||||
0x4D => 0x04,
|
||||
0x4E => 0x1C,
|
||||
0x4F => 0x01,
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<NoWarn>IDE0004, IDE0032, IDE0044, IDE0045, IDE0046, IDE0055, IDE0059, IDE0066, IDE0069, IDE1006</NoWarn>
|
||||
<NoWarn>IDE0004, IDE0018, IDE0032, IDE0044, IDE0045, IDE0046, IDE0055, IDE0059, IDE0066, IDE0069, IDE1006</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@@ -37,7 +37,7 @@
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<NoWarn>IDE0004, IDE0032, IDE0044, IDE0045, IDE0046, IDE0055, IDE0059, IDE0066, IDE0069, IDE1006</NoWarn>
|
||||
<NoWarn>IDE0004, IDE0018, IDE0032, IDE0044, IDE0045, IDE0046, IDE0055, IDE0059, IDE0066, IDE0069, IDE1006</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\KKdBaseLib\KKdBaseLib.csproj" />
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<NoWarn>IDE0004, IDE0032, IDE0044, IDE0045, IDE0046, IDE0055, IDE0059, IDE0066, IDE0069, IDE1006</NoWarn>
|
||||
<NoWarn>IDE0004, IDE0018, IDE0032, IDE0044, IDE0045, IDE0046, IDE0055, IDE0059, IDE0066, IDE0069, IDE1006</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
@@ -36,7 +36,7 @@
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<NoWarn>IDE0004, IDE0032, IDE0044, IDE0045, IDE0046, IDE0055, IDE0059, IDE0066, IDE0069, IDE1006</NoWarn>
|
||||
<NoWarn>IDE0004, IDE0018, IDE0032, IDE0044, IDE0045, IDE0046, IDE0055, IDE0059, IDE0066, IDE0069, IDE1006</NoWarn>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="classes\A3D.cs" />
|
||||
|
||||
+10
-9
@@ -47,7 +47,8 @@ namespace PD_Tool
|
||||
|
||||
private static void MainMenu()
|
||||
{
|
||||
Console.Title = "PD_Tool v0.4.9.8";
|
||||
Version ver = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
|
||||
Console.Title = $"PD_Tool v{ver}";
|
||||
Console.Clear();
|
||||
|
||||
ConsoleDesign(true);
|
||||
@@ -182,9 +183,9 @@ namespace PD_Tool
|
||||
ConsoleDesign(true);
|
||||
ConsoleDesign(" Choose converter:");
|
||||
ConsoleDesign(false);
|
||||
ConsoleDesign("1. A3DA" );
|
||||
ConsoleDesign("2. DEX" );
|
||||
ConsoleDesign("3. VAG" );
|
||||
ConsoleDesign("1. A3DA");
|
||||
ConsoleDesign("2. DEX" );
|
||||
ConsoleDesign("3. VAG" );
|
||||
ConsoleDesign(false);
|
||||
ConsoleDesign("R. Return to Main Menu");
|
||||
ConsoleDesign(false);
|
||||
@@ -244,12 +245,12 @@ namespace PD_Tool
|
||||
if (json)
|
||||
{
|
||||
Console.Title = "MsgPack to JSON: " + Path.GetFileNameWithoutExtension(file);
|
||||
file.Replace(Path.GetExtension(file), "").ToJSON ();
|
||||
Path.RemoveExtension(file).ToJSON ();
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.Title = "JSON to MsgPack: " + Path.GetFileNameWithoutExtension(file);
|
||||
file.Replace(Path.GetExtension(file), "").ToMsgPack();
|
||||
Path.RemoveExtension(file).ToMsgPack();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -259,15 +260,15 @@ namespace PD_Tool
|
||||
public static void ConsoleDesign(string text, params string[] args)
|
||||
{
|
||||
text = string.Format(text, args);
|
||||
string Text = "█ █";
|
||||
string Text = "X X";
|
||||
Text = Text.Remove(3) + text + Text.Remove(0, text.Length + 3);
|
||||
Console.WriteLine(Text);
|
||||
}
|
||||
|
||||
public static void ConsoleDesign(bool Fill)
|
||||
{
|
||||
if (Fill) Console.WriteLine("████████████████████████████████████████████████████");
|
||||
else Console.WriteLine("█ █");
|
||||
if (Fill) Console.WriteLine("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
|
||||
else Console.WriteLine("X X");
|
||||
}
|
||||
|
||||
private static string GetArgs(string name, bool And, params string[] ext)
|
||||
|
||||
@@ -11,5 +11,5 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
[assembly: Guid("7B5D5A3A-A6F8-4813-C97D-ACFC98F7397E")]
|
||||
[assembly: AssemblyVersion("0.4.9.8")]
|
||||
[assembly: AssemblyFileVersion("0.4.9.8")]
|
||||
[assembly: AssemblyVersion("0.4.9.9")]
|
||||
[assembly: AssemblyFileVersion("0.4.9.9")]
|
||||
|
||||
@@ -52,9 +52,8 @@ namespace PD_Tool
|
||||
KKdFARC farc;
|
||||
foreach (string file in fileNames)
|
||||
{
|
||||
ext = Path.GetExtension(file);
|
||||
filepath = file.Replace(ext, "");
|
||||
ext = ext.ToLower();
|
||||
filepath = Path.RemoveExtension(file);
|
||||
ext = Path.GetExtension(file).ToLower();
|
||||
|
||||
Console.Title = "A3DA Converter: " + Path.GetFileNameWithoutExtension(file);
|
||||
if (ext == ".farc")
|
||||
@@ -142,8 +141,8 @@ namespace PD_Tool
|
||||
{
|
||||
if (a3daArray[i].Data.PlayControl.Div == null) continue;
|
||||
int div = a3daArray[i].Data.PlayControl.Div.Value;
|
||||
string filename = Path.GetFileNameWithoutExtension(list[i]);
|
||||
string ext = Path.GetExtension(list[i]);
|
||||
string filename = Path.RemoveExtension(list[i]);
|
||||
string ext = Path.GetExtension(list[i]).ToLower();
|
||||
KKdA3DA a3da;
|
||||
for (int i1 = 1; i1 < div; i1++)
|
||||
using (a3da = new KKdA3DA(true))
|
||||
|
||||
@@ -17,9 +17,8 @@ namespace PD_Tool
|
||||
foreach (string file in fileNames)
|
||||
using (adp = new AddParam())
|
||||
{
|
||||
ext = Path.GetExtension(file);
|
||||
filepath = file.Replace(ext, "");
|
||||
ext = ext.ToLower();
|
||||
filepath = Path.RemoveExtension(file);
|
||||
ext = Path.GetExtension(file).ToLower();
|
||||
|
||||
Console.Title = "Add Param Converter: " + Path.GetFileNameWithoutExtension(file);
|
||||
if (ext == ".adp")
|
||||
|
||||
@@ -17,9 +17,8 @@ namespace PD_Tool
|
||||
foreach (string file in fileNames)
|
||||
using (aet = new Aet())
|
||||
{
|
||||
ext = Path.GetExtension(file);
|
||||
filepath = file.Replace(ext, "");
|
||||
ext = ext.ToLower();
|
||||
filepath = Path.RemoveExtension(file);
|
||||
ext = Path.GetExtension(file).ToLower();
|
||||
|
||||
Console.Title = "AET Converter: " + Path.GetFileNameWithoutExtension(file);
|
||||
if (ext == ".bin")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using KKdMainLib.IO;
|
||||
using KKdMainLib.F2;
|
||||
using KKdMainLib.IO;
|
||||
|
||||
namespace PD_Tool
|
||||
{
|
||||
@@ -17,9 +17,8 @@ namespace PD_Tool
|
||||
foreach (string file in fileNames)
|
||||
using (blt = new Bloom())
|
||||
{
|
||||
ext = Path.GetExtension(file);
|
||||
filepath = file.Replace(ext, "");
|
||||
ext = ext.ToLower();
|
||||
filepath = Path.RemoveExtension(file);
|
||||
ext = Path.GetExtension(file).ToLower();
|
||||
|
||||
Console.Title = "Bloom Converter: " + Path.GetFileNameWithoutExtension(file);
|
||||
if (ext == ".blt")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using KKdMainLib.IO;
|
||||
using KKdMainLib.F2;
|
||||
using KKdMainLib.IO;
|
||||
|
||||
namespace PD_Tool
|
||||
{
|
||||
@@ -17,9 +17,8 @@ namespace PD_Tool
|
||||
foreach (string file in fileNames)
|
||||
using (cct = new ColorCorrection())
|
||||
{
|
||||
ext = Path.GetExtension(file);
|
||||
filepath = file.Replace(ext, "");
|
||||
ext = ext.ToLower();
|
||||
filepath = Path.RemoveExtension(file);
|
||||
ext = Path.GetExtension(file).ToLower();
|
||||
|
||||
Console.Title = "Color Correction Converter: " + Path.GetFileNameWithoutExtension(file);
|
||||
if (ext == ".cct")
|
||||
|
||||
@@ -22,9 +22,8 @@ namespace PD_Tool
|
||||
KKdMainLib.DataBank db;
|
||||
foreach (string file in fileNames)
|
||||
{
|
||||
ext = Path.GetExtension(file);
|
||||
filepath = file.Replace(ext, "");
|
||||
ext = ext.ToLower();
|
||||
filepath = Path.RemoveExtension(file);
|
||||
ext = Path.GetExtension(file).ToLower();
|
||||
|
||||
string filename = Path.GetFileNameWithoutExtension(file);
|
||||
file_split = filename.Split('_');
|
||||
|
||||
@@ -46,9 +46,8 @@ namespace PD_Tool
|
||||
foreach (string file in fileNames)
|
||||
using (dex = new KKdDEX())
|
||||
{
|
||||
ext = Path.GetExtension(file);
|
||||
filepath = file.Replace(ext, "");
|
||||
ext = ext.ToLower();
|
||||
filepath = Path.RemoveExtension(file);
|
||||
ext = Path.GetExtension(file).ToLower();
|
||||
|
||||
Console.Title = "DEX Converter: " + Path.GetFileNameWithoutExtension(file);
|
||||
if (ext == ".bin" || ext == ".dex") dex. DEXReader(filepath, ext );
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
using KKdMainLib.IO;
|
||||
using KKdMainLib.F2;
|
||||
using KKdMainLib.IO;
|
||||
|
||||
namespace PD_Tool
|
||||
{
|
||||
@@ -17,9 +17,8 @@ namespace PD_Tool
|
||||
foreach (string file in fileNames)
|
||||
using (dft = new DOF())
|
||||
{
|
||||
ext = Path.GetExtension(file);
|
||||
filepath = file.Replace(ext, "");
|
||||
ext = ext.ToLower();
|
||||
filepath = Path.RemoveExtension(file);
|
||||
ext = Path.GetExtension(file).ToLower();
|
||||
|
||||
Console.Title = "DOF Converter: " + Path.GetFileNameWithoutExtension(file);
|
||||
if (ext == ".dft")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using KKdMainLib.IO;
|
||||
using KKdSoundLib;
|
||||
|
||||
namespace PD_Tool
|
||||
@@ -17,9 +17,8 @@ namespace PD_Tool
|
||||
foreach (string file in fileNames)
|
||||
{
|
||||
diva = new DIVA();
|
||||
ext = Path.GetExtension(file);
|
||||
filepath = file.Replace(ext, "");
|
||||
ext = ext.ToLower();
|
||||
filepath = Path.RemoveExtension(file);
|
||||
ext = Path.GetExtension(file).ToLower();
|
||||
|
||||
Console.Title = "DIVA Converter: " + Path.GetFileNameWithoutExtension(file);
|
||||
if (ext == ".diva") diva.DIVAReader(filepath);
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using Aet = KKdMainLib.DB.Aet;
|
||||
using Auth = KKdMainLib.DB.Auth;
|
||||
using Spr = KKdMainLib.DB.Spr;
|
||||
using KKdMainLib.DB;
|
||||
using KKdMainLib.IO;
|
||||
|
||||
namespace PD_Tool
|
||||
{
|
||||
@@ -45,8 +43,8 @@ namespace PD_Tool
|
||||
using (auth = new Auth())
|
||||
{
|
||||
Console.Title = "Auth DB Converter: " + Path.GetFileNameWithoutExtension(file);
|
||||
ext = Path.GetExtension(file).ToLower();
|
||||
filepath = file.Replace(Path.GetExtension(file), "");
|
||||
filepath = Path.RemoveExtension(file);
|
||||
ext = Path.GetExtension(file).ToLower();
|
||||
|
||||
if (ext == ".bin")
|
||||
{
|
||||
@@ -73,8 +71,8 @@ namespace PD_Tool
|
||||
using (aet = new Aet())
|
||||
{
|
||||
Console.Title = "AET DB Converter: " + Path.GetFileNameWithoutExtension(file);
|
||||
filepath = Path.RemoveExtension(file);
|
||||
ext = Path.GetExtension(file).ToLower();
|
||||
filepath = file.Replace(Path.GetExtension(file), "");
|
||||
|
||||
if (ext == ".bin")
|
||||
{
|
||||
@@ -101,8 +99,8 @@ namespace PD_Tool
|
||||
using (spr = new Spr())
|
||||
{
|
||||
Console.Title = "SPR DB Converter: " + Path.GetFileNameWithoutExtension(file);
|
||||
filepath = Path.RemoveExtension(file);
|
||||
ext = Path.GetExtension(file).ToLower();
|
||||
filepath = file.Replace(Path.GetExtension(file), "");
|
||||
|
||||
if (ext == ".bin")
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using KKdMainLib.IO;
|
||||
using KKdFARC = KKdMainLib.FARC;
|
||||
|
||||
namespace PD_Tool
|
||||
|
||||
@@ -17,9 +17,8 @@ namespace PD_Tool
|
||||
foreach (string file in fileNames)
|
||||
using (lit = new Light())
|
||||
{
|
||||
ext = Path.GetExtension(file);
|
||||
filepath = file.Replace(ext, "");
|
||||
ext = ext.ToLower();
|
||||
filepath = Path.RemoveExtension(file);
|
||||
ext = Path.GetExtension(file).ToLower();
|
||||
|
||||
Console.Title = "Light Converter: " + Path.GetFileNameWithoutExtension(file);
|
||||
if (ext == ".lit")
|
||||
|
||||
@@ -17,9 +17,8 @@ namespace PD_Tool
|
||||
foreach (string file in fileNames)
|
||||
using (mhd = new MotHead())
|
||||
{
|
||||
ext = Path.GetExtension(file);
|
||||
filepath = file.Replace(ext, "");
|
||||
ext = ext.ToLower();
|
||||
filepath = Path.RemoveExtension(file);
|
||||
ext = Path.GetExtension(file).ToLower();
|
||||
|
||||
Console.Title = "MotHead Converter: " + Path.GetFileNameWithoutExtension(file);
|
||||
if (ext == ".bin")
|
||||
|
||||
@@ -16,9 +16,8 @@ namespace PD_Tool
|
||||
foreach (string file in fileNames)
|
||||
using (str = new KKdSTR())
|
||||
{
|
||||
ext = Path.GetExtension(file);
|
||||
filepath = file.Replace(ext, "");
|
||||
ext = ext.ToLower();
|
||||
filepath = Path.RemoveExtension(file);
|
||||
ext = Path.GetExtension(file).ToLower();
|
||||
|
||||
Console.Title = "STR Converter: " + Path.GetFileNameWithoutExtension(file);
|
||||
if (ext == ".str" || ext == ".bin")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using KKdBaseLib;
|
||||
using KKdMainLib;
|
||||
using KKdMainLib.IO;
|
||||
using KKdFARC = KKdMainLib.FARC;
|
||||
|
||||
namespace PD_Tool
|
||||
@@ -19,9 +19,8 @@ namespace PD_Tool
|
||||
foreach (string file in fileNames)
|
||||
using (tbl = new Tables())
|
||||
{
|
||||
ext = Path.GetExtension(file);
|
||||
filepath = file.Replace(ext, "");
|
||||
ext = ext.ToLower();
|
||||
filepath = Path.RemoveExtension(file);
|
||||
ext = Path.GetExtension(file).ToLower();
|
||||
|
||||
Console.Title = "Table Converter: " + Path.GetFileNameWithoutExtension(file);
|
||||
if (ext == ".bin")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using KKdMainLib.IO;
|
||||
using KKdVAG = KKdSoundLib.VAG;
|
||||
|
||||
namespace PD_Tool
|
||||
@@ -42,9 +42,8 @@ namespace PD_Tool
|
||||
foreach (string file in fileNames)
|
||||
using (VAG = new KKdVAG())
|
||||
{
|
||||
ext = Path.GetExtension(file);
|
||||
filepath = file.Replace(ext, "");
|
||||
ext = ext.ToLower();
|
||||
filepath = Path.RemoveExtension(file);
|
||||
ext = Path.GetExtension(file).ToLower();
|
||||
|
||||
Console.Title = "VAG Converter: " + Path.GetFileNameWithoutExtension(file);
|
||||
if (ext == ".vag") { VAG.VAGReader(filepath); VAG.WAVWriter(filepath ); }
|
||||
|
||||
Reference in New Issue
Block a user