Release v0.4.10.6

A3DA
This commit is contained in:
korenkonder
2021-09-26 19:16:56 +03:00
parent a7e14e22ad
commit 803f64e333
7 changed files with 545 additions and 488 deletions
+49 -47
View File
@@ -9,9 +9,11 @@ namespace KKdBaseLib.Auth3D
public _ _;
public DOF? DOF;
public Fog[] Fog;
public Chara[] Chara;
public Curve[] Curve;
public Event[] Event;
public Light[] Light;
public Point[] Point;
public Object[] Object;
public Ambient[] Ambient;
public ObjectHRC[] ObjectHRC;
@@ -20,8 +22,6 @@ namespace KKdBaseLib.Auth3D
public PlayControl PlayControl;
public PostProcess? PostProcess;
public MaterialList[] MaterialList;
public ModelTransform[] Chara;
public ModelTransform[] Point;
public CameraAuxiliary? CameraAuxiliary;
}
@@ -58,10 +58,10 @@ namespace KKdBaseLib.Auth3D
public struct ViewPoint
{
public bool FOVHorizontal;
public float? Aspect;
public float? CameraApertureH;
public float? CameraApertureW;
public bool FOVIsHorizontal;
public float Aspect;
public float CameraApertureH;
public float CameraApertureW;
public Key FOV;
public Key Roll;
public Key FocalLength;
@@ -69,6 +69,12 @@ namespace KKdBaseLib.Auth3D
}
}
public struct Chara
{
public ModelTransform MT;
public string Name;
}
public struct Curve
{
public string Name;
@@ -83,12 +89,12 @@ namespace KKdBaseLib.Auth3D
public struct Event
{
public int? Type;
public float? End;
public float? Begin;
public float? ClipEnd;
public float? ClipBegin;
public float? TimeRefScale;
public int Type;
public float End;
public float Begin;
public float ClipEnd;
public float ClipBegin;
public float TimeRefScale;
public string Name;
public string Param1;
public string Ref;
@@ -96,11 +102,11 @@ namespace KKdBaseLib.Auth3D
public struct Fog
{
public int? Id;
public int Id;
public Key? End;
public Key? Start;
public Key? Density;
public Vec4<Key?>? Diffuse;
public Vec4<Key?>? Color;
}
public enum CompressF16 : int
@@ -135,7 +141,7 @@ namespace KKdBaseLib.Auth3D
public EPType EPTypePost;
public float? Max;
public float Value;
public RawD RawData;
public bool RawData;
public KFT3[] Keys;
public Key(A3DAKey k)
@@ -160,19 +166,11 @@ namespace KKdBaseLib.Auth3D
Value = k.Keys[0].V;
}
}
public struct RawD
{
public int KeyType;
public int ValueListSize;
public string ValueType;
public string[] ValueList;
}
}
public struct Light
{
public int? Id;
public int Id;
public string Name;
public string Type;
public Key? ConeAngle;
@@ -185,7 +183,7 @@ namespace KKdBaseLib.Auth3D
public Vec4<Key?>? Ambient;
public Vec4<Key?>? Diffuse;
public Vec4<Key?>? Specular;
public Vec4<Key?>? Incandescence;
public Vec4<Key?>? ToneCurve;
public ModelTransform Position;
public ModelTransform SpotDirection;
}
@@ -193,22 +191,21 @@ namespace KKdBaseLib.Auth3D
public struct MaterialList
{
public string Name;
public Key GlowIntensity;
public Vec4<Key?> BlendColor;
public Vec4<Key?> Incandescence;
public Key? GlowIntensity;
public Vec4<Key?>? BlendColor;
public Vec4<Key?>? Incandescence;
}
public struct MObjectHRC
{
public string Name;
public Node[] Node;
public Vec3? JointOrient;
public ObjectNode[] Node;
public Instance[] Instances;
public ModelTransform MT;
public struct Instance
{
public bool? Shadow;
public bool Shadow;
public string Name;
public string UIDName;
public ModelTransform MT;
@@ -217,7 +214,6 @@ namespace KKdBaseLib.Auth3D
public struct ModelTransform
{
public bool Writed;
public int? BinOffset;
public Key Visibility;
public Vec3<Key> Rot;
@@ -225,17 +221,10 @@ namespace KKdBaseLib.Auth3D
public Vec3<Key> Trans;
}
public struct Node
{
public int? Parent;
public string Name;
public ModelTransform MT;
}
public struct Object
{
public float? PatOffset;
public float? MorphOffset;
public float PatOffset;
public float MorphOffset;
public string Name;
public string Pat;
public string Morph;
@@ -247,7 +236,7 @@ namespace KKdBaseLib.Auth3D
public struct TexturePattern
{
public int? PatOffset;
public float PatOffset;
public string Pat;
public string Name;
}
@@ -270,11 +259,18 @@ namespace KKdBaseLib.Auth3D
public struct ObjectHRC
{
public bool? Shadow;
public bool Shadow;
public string Name;
public string UIDName;
public Node[] Node;
public ObjectNode[] Node;
}
public struct ObjectNode
{
public Vec3? JointOrient;
public int Parent;
public string Name;
public ModelTransform MT;
}
public struct PlayControl
@@ -286,13 +282,19 @@ namespace KKdBaseLib.Auth3D
public int Size;
}
public struct Point
{
public ModelTransform MT;
public string Name;
}
public struct PostProcess
{
public Key? LensFlare;
public Key? LensGhost;
public Key? LensShaft;
public Vec4<Key?>? Ambient;
public Vec4<Key?>? Diffuse;
public Vec4<Key?>? Specular;
public Vec4<Key?>? Intensity;
public Vec4<Key?>? Radius;
public Vec4<Key?>? SceneFade;
}
}
+2 -2
View File
@@ -6,12 +6,12 @@
<Configuration></Configuration>
<Copyright>korenkonder (C) 2019-2021</Copyright>
<Description>A base library</Description>
<FileVersion>0.4.10.5</FileVersion>
<FileVersion>0.4.10.6</FileVersion>
<PackageId>KKdBaseLib</PackageId>
<Product>KKdBaseLib</Product>
<TargetFramework>net461</TargetFramework>
<Title>KKdBaseLib</Title>
<Version>0.4.10.5</Version>
<Version>0.4.10.6</Version>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
+466 -398
View File
File diff suppressed because it is too large Load Diff
+3 -3
View File
@@ -5,13 +5,13 @@
<Company></Company>
<Configuration></Configuration>
<Copyright>korenkonder (C) 2018-2021</Copyright>
<Description>A simple library for working with Project Diva AC/DT/F/AFT/F2/X/FT/M39 files</Description>
<FileVersion>0.4.10.5</FileVersion>
<Description>A simple library for working with Project Diva AC/DT/F/AFT/F2/X/XHD/FT/VRFL/M39 files</Description>
<FileVersion>0.4.10.6</FileVersion>
<PackageId>KKdMainLib</PackageId>
<Product>KKdMainLib</Product>
<TargetFramework>net461</TargetFramework>
<Title>KKdMainLib</Title>
<Version>0.4.10.5</Version>
<Version>0.4.10.6</Version>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
+2 -2
View File
@@ -61,7 +61,7 @@ namespace PD_Tool
ConsoleDesign("5. DB_Tools");
ConsoleDesign("6. AC/DT/F/AFT Converting Tools");
ConsoleDesign("7. F/F2/FT Converting Tools");
ConsoleDesign("8. X/XHD Converting Tools");
ConsoleDesign("8. X/XHD/VRFL Converting Tools");
ConsoleDesign("9. FT/M39 Converting Tools");
ConsoleDesign(json ? "A. MsgPack to JSON" : "A. JSON to MsgPack");
ConsoleDesign(false);
@@ -179,7 +179,7 @@ namespace PD_Tool
if (choose.Length == 1)
{
Console.Clear();
Console.Title = "X/XHD Converting Tools";
Console.Title = "X/XHD/VRFL Converting Tools";
ConsoleDesign(true);
ConsoleDesign(" Choose converter:");
ConsoleDesign(false);
+3 -3
View File
@@ -2,7 +2,7 @@ using System.Reflection;
using System.Runtime.InteropServices;
[assembly: AssemblyTitle("PD_Tool")]
[assembly: AssemblyDescription("A simple tool for working with Project Diva AC/DT/F/AFT/F2/X/FT/M39 files")]
[assembly: AssemblyDescription("A simple tool for working with Project Diva AC/DT/F/AFT/F2/X/XHD/FT/VRFL/M39 files")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("PD_Tool")]
@@ -11,5 +11,5 @@ using System.Runtime.InteropServices;
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: Guid("7B5D5A3A-A6F8-4813-C97D-ACFC98F7397E")]
[assembly: AssemblyVersion("0.4.10.5")]
[assembly: AssemblyFileVersion("0.4.10.5")]
[assembly: AssemblyVersion("0.4.10.6")]
[assembly: AssemblyFileVersion("0.4.10.6")]
+20 -33
View File
@@ -18,7 +18,6 @@ namespace PD_Tool
foreach (string file in fileNames)
if (file.EndsWith(".mp") || file.EndsWith(".json") || file.EndsWith(".farc")) { mp = true; break; }
bool a3dcOpt = false;
Format format = Format.NULL;
string choose = "";
Console.Clear();
@@ -30,38 +29,26 @@ namespace PD_Tool
Program.ConsoleDesign(false);
Program.ConsoleDesign("1. A3DA [DT/AC/F]");
Program.ConsoleDesign("2. A3DC [DT/AC/F]");
Program.ConsoleDesign("3. A3DC [DT/AC/F] (A3DC Opt)");
Program.ConsoleDesign("4. A3DA [AFT/FT/M39]");
Program.ConsoleDesign("5. A3DC [AFT/FT/M39]");
Program.ConsoleDesign("6. A3DC [AFT/FT/M39] (A3DC Opt)");
Program.ConsoleDesign("7. A3DC [F2]");
Program.ConsoleDesign("8. A3DC [F2] (A3DC Opt)");
Program.ConsoleDesign("9. A3DC [MGF]");
Program.ConsoleDesign("A. A3DC [MGF] (A3DC Opt)");
Program.ConsoleDesign("B. A3DC [X]");
Program.ConsoleDesign("C. A3DC [X] (A3DC Opt)");
Program.ConsoleDesign("D. A3DC [XHD]");
Program.ConsoleDesign("E. A3DC [XHD] (A3DC Opt)");
if (!mp) Program.ConsoleDesign($"F. {(json ? "JSON" : "MsgPack")}");
Program.ConsoleDesign("3. A3DA [AFT/FT/M39]");
Program.ConsoleDesign("4. A3DC [AFT/FT/M39]");
Program.ConsoleDesign("5. A3DC [F2]");
Program.ConsoleDesign("6. A3DC [MGF]");
Program.ConsoleDesign("7. A3DC [X]");
Program.ConsoleDesign("8. A3DC [XHD/VRFL]");
if (!mp) Program.ConsoleDesign($"9. {(json ? "JSON" : "MsgPack")}");
Program.ConsoleDesign(false);
Program.ConsoleDesign(true);
Console.WriteLine();
choose = Console.ReadLine().ToUpper();
if (choose == "1") format = Format.DT ;
else if (choose == "2") format = Format.F ;
else if (choose == "3") { format = Format.F ; a3dcOpt = true; }
else if (choose == "3") format = Format.AFT;
else if (choose == "4") format = Format.AFT;
else if (choose == "5") format = Format.AFT;
else if (choose == "6") { format = Format.AFT; a3dcOpt = true; }
else if (choose == "7") format = Format.F2 ;
else if (choose == "8") { format = Format.F2 ; a3dcOpt = true; }
else if (choose == "9") format = Format.MGF;
else if (choose == "A") { format = Format.MGF; a3dcOpt = true; }
else if (choose == "B") format = Format.X ;
else if (choose == "C") { format = Format.X ; a3dcOpt = true; }
else if (choose == "D") format = Format.XHD;
else if (choose == "E") { format = Format.XHD; a3dcOpt = true; }
else if (choose == "F") format = Format.NULL;
else if (choose == "5") format = Format.F2 ;
else if (choose == "6") format = Format.MGF;
else if (choose == "7") format = Format.X ;
else if (choose == "8") format = Format.XHD;
else if (choose == "9") format = Format.NULL;
else return;
int state;
@@ -76,9 +63,9 @@ namespace PD_Tool
Console.Title = "A3DA Converter: " + Path.GetFileNameWithoutExtension(file);
if (ext == ".farc")
using (farc = new KKdFARC(file))
FARCProcessor(farc, choose, format, a3dcOpt);
FARCProcessor(farc, choose, format);
else if (ext == ".a3da")
using (a3da = new KKdA3DA(a3dcOpt))
using (a3da = new KKdA3DA())
{
state = a3da.A3DAReader(filepath);
if (state == 1)
@@ -91,7 +78,7 @@ namespace PD_Tool
}
}
else if (ext == ".mp" || ext == ".json")
using (a3da = new KKdA3DA(a3dcOpt))
using (a3da = new KKdA3DA())
{
a3da.MsgPackReader(filepath, ext == ".json");
a3da.Head.Format = format;
@@ -102,7 +89,7 @@ namespace PD_Tool
}
}
private static void FARCProcessor(KKdFARC farc, string choose, Format format, bool a3dcOpt)
private static void FARCProcessor(KKdFARC farc, string choose, Format format)
{
if (!farc.HeaderReader() || !farc.HasFiles) return;
@@ -123,7 +110,7 @@ namespace PD_Tool
{
KKdA3DA a3da;
for (int i = 0; i < A3DAlist.Count; i++)
using (a3da = new KKdA3DA(a3dcOpt))
using (a3da = new KKdA3DA())
{
data = farc.FileReader(A3DAlist[i]);
int state = a3da.A3DAReader(data);
@@ -146,7 +133,7 @@ namespace PD_Tool
for (int i = 0; i < list.Count; i++)
{
KKdA3DA a3da;
using (a3da = new KKdA3DA(a3dcOpt))
using (a3da = new KKdA3DA())
{
data = farc.FileReader(list[i]);
int state = a3da.A3DAReader(data);
@@ -164,7 +151,7 @@ namespace PD_Tool
string ext = Path.GetExtension(list[i]).ToLower();
KKdA3DA a3da;
for (int i1 = 1; i1 < div; i1++)
using (a3da = new KKdA3DA(a3dcOpt))
using (a3da = new KKdA3DA())
{
string file = filename + "_div_" + i1 + ext;
data = farc.FileReader(file);