XML/YFT/YDR/YBN conversion VFT values added

This commit is contained in:
dexy 2020-03-10 08:34:17 +11:00
parent 408bcaf837
commit e608912977
4 changed files with 56 additions and 18 deletions

View File

@ -543,6 +543,11 @@ namespace CodeWalker.GameFiles
} }
[TC(typeof(EXP))] public class BoundSphere : Bounds [TC(typeof(EXP))] public class BoundSphere : Bounds
{ {
public override void ReadXml(XmlNode node)
{
base.ReadXml(node);
FileVFT = 1080221960;
}
public override SpaceSphereIntersectResult SphereIntersect(ref BoundingSphere sph) public override SpaceSphereIntersectResult SphereIntersect(ref BoundingSphere sph)
{ {
var res = new SpaceSphereIntersectResult(); var res = new SpaceSphereIntersectResult();
@ -608,6 +613,11 @@ namespace CodeWalker.GameFiles
writer.Write(this.Unknown_78h); writer.Write(this.Unknown_78h);
writer.Write(this.Unknown_7Ch); writer.Write(this.Unknown_7Ch);
} }
public override void ReadXml(XmlNode node)
{
base.ReadXml(node);
FileVFT = 1080213112;
}
public override SpaceSphereIntersectResult SphereIntersect(ref BoundingSphere sph) public override SpaceSphereIntersectResult SphereIntersect(ref BoundingSphere sph)
{ {
@ -646,6 +656,11 @@ namespace CodeWalker.GameFiles
} }
[TC(typeof(EXP))] public class BoundBox : Bounds [TC(typeof(EXP))] public class BoundBox : Bounds
{ {
public override void ReadXml(XmlNode node)
{
base.ReadXml(node);
FileVFT = 1080221016;
}
public override SpaceSphereIntersectResult SphereIntersect(ref BoundingSphere sph) public override SpaceSphereIntersectResult SphereIntersect(ref BoundingSphere sph)
{ {
var res = new SpaceSphereIntersectResult(); var res = new SpaceSphereIntersectResult();
@ -730,6 +745,11 @@ namespace CodeWalker.GameFiles
writer.Write(this.Unknown_78h); writer.Write(this.Unknown_78h);
writer.Write(this.Unknown_7Ch); writer.Write(this.Unknown_7Ch);
} }
public override void ReadXml(XmlNode node)
{
base.ReadXml(node);
FileVFT = 1080229960;
}
public override SpaceSphereIntersectResult SphereIntersect(ref BoundingSphere sph) public override SpaceSphereIntersectResult SphereIntersect(ref BoundingSphere sph)
{ {
@ -800,6 +820,11 @@ namespace CodeWalker.GameFiles
writer.Write(this.Unknown_78h); writer.Write(this.Unknown_78h);
writer.Write(this.Unknown_7Ch); writer.Write(this.Unknown_7Ch);
} }
public override void ReadXml(XmlNode node)
{
base.ReadXml(node);
FileVFT = 1080202872;
}
public override SpaceSphereIntersectResult SphereIntersect(ref BoundingSphere sph) public override SpaceSphereIntersectResult SphereIntersect(ref BoundingSphere sph)
{ {
@ -1220,6 +1245,8 @@ namespace CodeWalker.GameFiles
UpdateEdgeIndices(); UpdateEdgeIndices();
UpdateTriangleAreas(); UpdateTriangleAreas();
UpdateUnknown1Counts(); UpdateUnknown1Counts();
FileVFT = 1080226408;
} }
public override IResourceBlock[] GetReferences() public override IResourceBlock[] GetReferences()
@ -2155,6 +2182,11 @@ namespace CodeWalker.GameFiles
writer.Write(this.Unknown_148h); writer.Write(this.Unknown_148h);
writer.Write(this.Unknown_14Ch); writer.Write(this.Unknown_14Ch);
} }
public override void ReadXml(XmlNode node)
{
base.ReadXml(node);
FileVFT = 1080228536;
}
public override IResourceBlock[] GetReferences() public override IResourceBlock[] GetReferences()
{ {
@ -2649,7 +2681,7 @@ namespace CodeWalker.GameFiles
} }
} }
FileVFT = 1080212136;
} }
public override IResourceBlock[] GetReferences() public override IResourceBlock[] GetReferences()

View File

@ -1426,7 +1426,7 @@ namespace CodeWalker.GameFiles
public override long BlockLength => 0x80; public override long BlockLength => 0x80;
// structure data // structure data
public uint VFT { get; set; } public uint VFT { get; set; } = 1080059352;
public uint Unknown_4h = 1; // 0x00000001 public uint Unknown_4h = 1; // 0x00000001
public ulong Unknown_8h; // 0x0000000000000000 public ulong Unknown_8h; // 0x0000000000000000
public ulong InstanceTuningPointer { get; set; } public ulong InstanceTuningPointer { get; set; }

View File

@ -18,7 +18,7 @@ namespace CodeWalker.GameFiles
} }
// structure data // structure data
public uint VFT { get; set; } public uint VFT { get; set; } = 1080113136;
public uint Unknown_4h = 1; // 0x00000001 public uint Unknown_4h = 1; // 0x00000001
public ulong TextureDictionaryPointer { get; set; } public ulong TextureDictionaryPointer { get; set; }
public ulong ShadersPointer { get; set; } public ulong ShadersPointer { get; set; }
@ -860,7 +860,7 @@ namespace CodeWalker.GameFiles
} }
// structure data // structure data
public uint VFT { get; set; } public uint VFT { get; set; } = 1080114336;
public uint Unknown_4h { get; set; } = 1; // 0x00000001 public uint Unknown_4h { get; set; } = 1; // 0x00000001
public ulong Unknown_8h; // 0x0000000000000000 public ulong Unknown_8h; // 0x0000000000000000
public ulong BoneTagsPointer { get; set; } public ulong BoneTagsPointer { get; set; }
@ -1754,7 +1754,7 @@ namespace CodeWalker.GameFiles
} }
// structure data // structure data
public uint VFT { get; set; } public uint VFT { get; set; } = 1080130656;
public uint Unknown_4h = 1; // 0x00000001 public uint Unknown_4h = 1; // 0x00000001
public ulong Unknown_8h; // 0x0000000000000000 public ulong Unknown_8h; // 0x0000000000000000
public ulong RotationLimitsPointer { get; set; } public ulong RotationLimitsPointer { get; set; }
@ -2028,7 +2028,7 @@ namespace CodeWalker.GameFiles
} }
// structure data // structure data
public uint VFT { get; set; } public uint VFT { get; set; } = 1080101528;
public uint Unknown_4h = 1; // 0x00000001 public uint Unknown_4h = 1; // 0x00000001
public ulong GeometriesPointer { get; set; } public ulong GeometriesPointer { get; set; }
public ushort GeometriesCount1 { get; set; } public ushort GeometriesCount1 { get; set; }
@ -2295,7 +2295,7 @@ namespace CodeWalker.GameFiles
} }
// structure data // structure data
public uint VFT { get; set; } public uint VFT { get; set; } = 1080133528;
public uint Unknown_4h = 1; // 0x00000001 public uint Unknown_4h = 1; // 0x00000001
public ulong Unknown_8h; // 0x0000000000000000 public ulong Unknown_8h; // 0x0000000000000000
public ulong Unknown_10h; // 0x0000000000000000 public ulong Unknown_10h; // 0x0000000000000000
@ -2578,7 +2578,7 @@ namespace CodeWalker.GameFiles
} }
// structure data // structure data
public uint VFT { get; set; } public uint VFT { get; set; } = 1080153080;
public uint Unknown_4h = 1; // 0x00000001 public uint Unknown_4h = 1; // 0x00000001
public ushort VertexStride { get; set; } public ushort VertexStride { get; set; }
public ushort Flags { get; set; } //only 0 or 1024 public ushort Flags { get; set; } //only 0 or 1024
@ -3457,7 +3457,7 @@ namespace CodeWalker.GameFiles
} }
// structure data // structure data
public uint VFT { get; set; } public uint VFT { get; set; } = 1080152408;
public uint Unknown_4h = 1; // 0x00000001 public uint Unknown_4h = 1; // 0x00000001
public uint IndicesCount { get; set; } public uint IndicesCount { get; set; }
public uint Unknown_Ch; // 0x00000000 public uint Unknown_Ch; // 0x00000000
@ -4255,7 +4255,7 @@ namespace CodeWalker.GameFiles
BuildAllModels(); BuildAllModels();
BuildVertexDecls(); BuildVertexDecls();
FileUnknown = 1; FileVFT = 1079456120;
} }
public override IResourceBlock[] GetReferences() public override IResourceBlock[] GetReferences()

View File

@ -538,7 +538,7 @@ namespace CodeWalker.GameFiles
AssignChildrenSkeletonsAndBounds(); AssignChildrenSkeletonsAndBounds();
AssignChildrenShaders(); AssignChildrenShaders();
FileUnknown = 1; FileVFT = 1079456040;
} }
public static void WriteXmlNode(FragType f, StringBuilder sb, int indent, string ddsfolder, string name = "Fragment") public static void WriteXmlNode(FragType f, StringBuilder sb, int indent, string ddsfolder, string name = "Fragment")
{ {
@ -927,6 +927,8 @@ namespace CodeWalker.GameFiles
{ {
Bound = Bounds.ReadXmlNode(bnode, this); Bound = Bounds.ReadXmlNode(bnode, this);
} }
FileVFT = 1080060872;
} }
public static void WriteXmlNode(FragDrawable d, StringBuilder sb, int indent, string ddsfolder, string name = "FragDrawable") public static void WriteXmlNode(FragDrawable d, StringBuilder sb, int indent, string ddsfolder, string name = "FragDrawable")
{ {
@ -2008,7 +2010,7 @@ namespace CodeWalker.GameFiles
} }
// structure data // structure data
public uint VFT { get; set; } public uint VFT { get; set; } = 1080055472;
public uint Unknown_04h = 1; // 0x00000001 public uint Unknown_04h = 1; // 0x00000001
public ulong Unknown_08h; // 0x0000000000000000 public ulong Unknown_08h; // 0x0000000000000000
public ulong PhysicsLOD1Pointer { get; set; } public ulong PhysicsLOD1Pointer { get; set; }
@ -2121,7 +2123,7 @@ namespace CodeWalker.GameFiles
} }
// structure data // structure data
public uint VFT { get; set; } public uint VFT { get; set; } = 1080055512;
public uint Unknown_04h = 1; // 0x00000001 public uint Unknown_04h = 1; // 0x00000001
public ulong Unknown_08h; // 0x0000000000000000 public ulong Unknown_08h; // 0x0000000000000000
public uint Unknown_10h; // 0x00000000 public uint Unknown_10h; // 0x00000000
@ -2722,7 +2724,7 @@ namespace CodeWalker.GameFiles
} }
// structure data // structure data
public uint VFT { get; set; } public uint VFT { get; set; } = 1080211704;
public uint Unknown_04h = 1; // 0x00000001 public uint Unknown_04h = 1; // 0x00000001
public ulong Unknown_08h; // 0x0000000000000000 public ulong Unknown_08h; // 0x0000000000000000
public uint[] ItemIndices { get; set; } // array of 22 uints public uint[] ItemIndices { get; set; } // array of 22 uints
@ -3071,6 +3073,8 @@ namespace CodeWalker.GameFiles
Unknown_80h = Xml.GetChildVector4Attributes(node, "Unknown80"); Unknown_80h = Xml.GetChildVector4Attributes(node, "Unknown80");
Unknown_90h = Xml.GetChildVector4Attributes(node, "Unknown90"); Unknown_90h = Xml.GetChildVector4Attributes(node, "Unknown90");
Unknown_A0h = Xml.GetChildVector4Attributes(node, "UnknownA0"); Unknown_A0h = Xml.GetChildVector4Attributes(node, "UnknownA0");
VFT = 1080212656;
} }
} }
[TypeConverter(typeof(ExpandableObjectConverter))] public class FragPhysJoint3DofType : FragPhysJointType [TypeConverter(typeof(ExpandableObjectConverter))] public class FragPhysJoint3DofType : FragPhysJointType
@ -3194,6 +3198,8 @@ namespace CodeWalker.GameFiles
//Unknown_C0h = Xml.GetChildVector4Attributes(node, "UnknownC0"); //Unknown_C0h = Xml.GetChildVector4Attributes(node, "UnknownC0");
//Unknown_D0h = Xml.GetChildVector4Attributes(node, "UnknownD0"); //Unknown_D0h = Xml.GetChildVector4Attributes(node, "UnknownD0");
//Unknown_E0h = Xml.GetChildVector4Attributes(node, "UnknownE0"); //Unknown_E0h = Xml.GetChildVector4Attributes(node, "UnknownE0");
VFT = 1080212544;
} }
} }
@ -3205,7 +3211,7 @@ namespace CodeWalker.GameFiles
} }
// structure data // structure data
public uint VFT { get; set; } public uint VFT { get; set; } = 1080043536;
public uint Unknown_04h = 1; // 0x00000001 public uint Unknown_04h = 1; // 0x00000001
public ulong Unknown_08h; // 0x0000000000000000 public ulong Unknown_08h; // 0x0000000000000000
public uint MatricesCount { get; set; } public uint MatricesCount { get; set; }
@ -3280,7 +3286,7 @@ namespace CodeWalker.GameFiles
} }
// structure data // structure data
public uint VFT { get; set; } public uint VFT { get; set; } = 1080215944;
public uint Unknown_04h = 1; // 0x00000001 public uint Unknown_04h = 1; // 0x00000001
public ulong Unknown_08h; // 0x0000000000000000 public ulong Unknown_08h; // 0x0000000000000000
public ulong Unknown_10h = 2; // 0x0000000000000002 public ulong Unknown_10h = 2; // 0x0000000000000002
@ -3553,7 +3559,7 @@ namespace CodeWalker.GameFiles
} }
// structure data // structure data
public uint VFT { get; set; } public uint VFT { get; set; } = 1080061712;
public uint Unknown_04h = 1; // 0x00000001 public uint Unknown_04h = 1; // 0x00000001
public float Mass1 { get; set; } public float Mass1 { get; set; }
public float Mass2 { get; set; } public float Mass2 { get; set; }
@ -3840,7 +3846,7 @@ namespace CodeWalker.GameFiles
} }
// structure data // structure data
public uint VFT { get; set; } public uint VFT { get; set; } = 1080060072;
public uint Unknown_04h = 1; // 0x00000001 public uint Unknown_04h = 1; // 0x00000001
public ulong Unknown_08h; // 0x0000000000000000 public ulong Unknown_08h; // 0x0000000000000000
public ulong Unknown_10h; // 0x0000000000000000 public ulong Unknown_10h; // 0x0000000000000000