YED parsing progress

This commit is contained in:
dexy 2020-03-02 07:48:30 +11:00
parent 30982ef45d
commit ddfce89912
2 changed files with 634 additions and 87 deletions

View File

@ -186,6 +186,7 @@ namespace CodeWalker.GameFiles
//TestRbfs();
//TestCuts();
//TestYlds();
//TestYeds();
//TestYcds();
//TestYtds();
//TestYbns();
@ -3199,6 +3200,44 @@ namespace CodeWalker.GameFiles
if (exceptions.Count > 0)
{ }
}
public void TestYeds()
{
var exceptions = new List<Exception>();
foreach (RpfFile file in AllRpfs)
{
foreach (RpfEntry entry in file.AllEntries)
{
#if !DEBUG
try
#endif
{
var rfe = entry as RpfFileEntry;
if (rfe == null) continue;
if (rfe.NameLower.EndsWith(".yed"))
{
UpdateStatus(string.Format(entry.Path));
YedFile yed = new YedFile(rfe);
RpfMan.LoadFile(yed, rfe);
}
}
#if !DEBUG
catch (Exception ex)
{
UpdateStatus("Error! " + ex.ToString());
exceptions.Add(ex);
}
#endif
}
}
if (exceptions.Count > 0)
{ }
}
public void TestYcds()
{
bool savetest = false;

View File

@ -1,6 +1,8 @@
using System;
using SharpDX;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@ -42,12 +44,9 @@ namespace CodeWalker.GameFiles
public uint Unknown_14h { get; set; }
public uint Unknown_18h { get; set; }
public uint Unknown_1Ch { get; set; }
public ResourceSimpleList64_uint ExpressionNameHashes { get; set; }
public ResourceSimpleList64_s<MetaHash> ExpressionNameHashes { get; set; }
public ResourcePointerList64<Expression> Expressions { get; set; }
/// <summary>
/// Reads the data-block from a stream.
/// </summary>
public override void Read(ResourceDataReader reader, params object[] parameters)
{
base.Read(reader, parameters);
@ -57,13 +56,9 @@ namespace CodeWalker.GameFiles
this.Unknown_14h = reader.ReadUInt32();
this.Unknown_18h = reader.ReadUInt32();
this.Unknown_1Ch = reader.ReadUInt32();
this.ExpressionNameHashes = reader.ReadBlock<ResourceSimpleList64_uint>();
this.ExpressionNameHashes = reader.ReadBlock<ResourceSimpleList64_s<MetaHash>>();
this.Expressions = reader.ReadBlock<ResourcePointerList64<Expression>>();
}
/// <summary>
/// Writes the data-block to a stream.
/// </summary>
public override void Write(ResourceDataWriter writer, params object[] parameters)
{
base.Write(writer, parameters);
@ -77,15 +72,11 @@ namespace CodeWalker.GameFiles
writer.WriteBlock(this.Expressions);
}
/// <summary>
/// Returns a list of data blocks which are referenced by this block.
/// </summary>
public override IResourceBlock[] GetReferences()
{
var list = new List<IResourceBlock>(base.GetReferences());
return list.ToArray();
}
public override Tuple<long, IResourceBlock>[] GetParts()
{
return new Tuple<long, IResourceBlock>[] {
@ -105,36 +96,34 @@ namespace CodeWalker.GameFiles
// structure data
public uint VFT { get; set; }
public uint Unknown_4h { get; set; }
public uint Unknown_8h { get; set; }
public uint Unknown_Ch { get; set; }
public uint Unknown_10h { get; set; }
public uint Unknown_14h { get; set; }
public uint Unknown_18h { get; set; }
public uint Unknown_1Ch { get; set; }
public uint Unknown_4h { get; set; } = 1;
public uint Unknown_8h { get; set; } // 0x00000000
public uint Unknown_Ch { get; set; } // 0x00000000
public uint Unknown_10h { get; set; } // 0x00000000
public uint Unknown_14h { get; set; } // 0x00000000
public uint Unknown_18h { get; set; } // 0x00000000
public uint Unknown_1Ch { get; set; } // 0x00000000
public ResourcePointerList64<ExpressionUnk1> Unknown_20h { get; set; }
public ResourceSimpleList64_uint Unknown_30h { get; set; }
public ResourceSimpleList64_s<ExpressionUnk3> Unknown_30h { get; set; } // bone tags / animation tracks..??
public ResourceSimpleList64<ExpressionUnk2> Unknown_40h { get; set; }
public ResourceSimpleList64_uint Unknown_50h { get; set; }
public ResourceSimpleList64_s<MetaHash> Unknown_50h { get; set; } // only for: faceinit.expr, independent_mover.expr
public ulong NamePointer { get; set; }
public uint Unknown_68h { get; set; } // short, short, (name len, name len+1)
public uint Unknown_6Ch { get; set; }
public uint Unknown_70h { get; set; }
public uint Unknown_74h { get; set; }
public ushort len { get; set; }
public ushort Unknown_7Ah { get; set; }
public uint Unknown_7Ch { get; set; }
public uint Unknown_80h { get; set; }
public uint Unknown_84h { get; set; }
public uint Unknown_88h { get; set; }
public uint Unknown_8Ch { get; set; }
public ushort NameLength { get; set; } // name len
public ushort NameCapacity { get; set; } // name len+1
public uint Unknown_6Ch { get; set; } // 0x00000000
public uint Unknown_70h { get; set; } = 1;
public MetaHash Unknown_74h { get; set; } // seems to be a hash?
public ushort Unk1ItemLength { get; set; } // max length of any Unk1 item in Unknown_20h
public ushort Unknown_7Ah { get; set; } // 0x0000
public uint Unknown_7Ch { get; set; } // 3 or 2
public uint Unknown_80h { get; set; } // 0x00000000
public uint Unknown_84h { get; set; } // 0x00000000
public uint Unknown_88h { get; set; } // 0x00000000
public uint Unknown_8Ch { get; set; } // 0x00000000
// reference data
public string_r Name;
/// <summary>
/// Reads the data-block from a stream.
/// </summary>
public override void Read(ResourceDataReader reader, params object[] parameters)
{
// read structure data
@ -147,15 +136,16 @@ namespace CodeWalker.GameFiles
this.Unknown_18h = reader.ReadUInt32();
this.Unknown_1Ch = reader.ReadUInt32();
this.Unknown_20h = reader.ReadBlock<ResourcePointerList64<ExpressionUnk1>>();
this.Unknown_30h = reader.ReadBlock<ResourceSimpleList64_uint>();
this.Unknown_30h = reader.ReadBlock<ResourceSimpleList64_s<ExpressionUnk3>>();
this.Unknown_40h = reader.ReadBlock<ResourceSimpleList64<ExpressionUnk2>>();
this.Unknown_50h = reader.ReadBlock<ResourceSimpleList64_uint>();
this.Unknown_50h = reader.ReadBlock<ResourceSimpleList64_s<MetaHash>>();
this.NamePointer = reader.ReadUInt64();
this.Unknown_68h = reader.ReadUInt32();
this.NameLength = reader.ReadUInt16();
this.NameCapacity = reader.ReadUInt16();
this.Unknown_6Ch = reader.ReadUInt32();
this.Unknown_70h = reader.ReadUInt32();
this.Unknown_74h = reader.ReadUInt32();
this.len = reader.ReadUInt16();
this.Unk1ItemLength = reader.ReadUInt16();
this.Unknown_7Ah = reader.ReadUInt16();
this.Unknown_7Ch = reader.ReadUInt32();
this.Unknown_80h = reader.ReadUInt32();
@ -167,11 +157,63 @@ namespace CodeWalker.GameFiles
this.Name = reader.ReadBlockAt<string_r>(
this.NamePointer // offset
);
}
/// <summary>
/// Writes the data-block to a stream.
/// </summary>
//if (Unknown_50h?.data_items?.Length > 0)
//{ } // faceinit.expr, independent_mover.expr
#region testing
//long tlen = 0;
//if (Unknown_20h?.data_items != null) foreach (var item in Unknown_20h.data_items) tlen = Math.Max(tlen, item.BlockLength);
//if (Unk1ItemLength != tlen)
//{ }//no hit
//if (Unknown_4h != 1)
//{ }//no hit
//if (Unknown_8h != 0)
//{ }//no hit
//if (Unknown_Ch != 0)
//{ }//no hit
//if (Unknown_10h != 0)
//{ }//no hit
//if (Unknown_14h != 0)
//{ }//no hit
//if (Unknown_18h != 0)
//{ }//no hit
//if (Unknown_1Ch != 0)
//{ }//no hit
//if (NameLength != (Name?.Value?.Length ?? 0))
//{ }//no hit
//if (NameCapacity != (NameLength + 1))
//{ }//no hit
//if (Unknown_6Ch != 0)
//{ }//no hit
//if (Unknown_70h != 1)
//{ }//no hit
//switch (Unknown_74h)
//{
// default:
// break;
//}
//if (Unknown_7Ah != 0)
//{ }//no hit
//switch (Unknown_7Ch)
//{
// case 3:
// case 2:
// break;
// default:
// break;//no hit
//}
//if (Unknown_80h != 0)
//{ }//no hit
//if (Unknown_84h != 0)
//{ }//no hit
//if (Unknown_88h != 0)
//{ }//no hit
//if (Unknown_8Ch != 0)
//{ }//no hit
#endregion
}
public override void Write(ResourceDataWriter writer, params object[] parameters)
{
// update structure data
@ -191,11 +233,12 @@ namespace CodeWalker.GameFiles
writer.WriteBlock(this.Unknown_40h);
writer.WriteBlock(this.Unknown_50h);
writer.Write(this.NamePointer);
writer.Write(this.Unknown_68h);
writer.Write(this.NameLength);
writer.Write(this.NameCapacity);
writer.Write(this.Unknown_6Ch);
writer.Write(this.Unknown_70h);
writer.Write(this.Unknown_74h);
writer.Write(this.len);
writer.Write(this.Unk1ItemLength);
writer.Write(this.Unknown_7Ah);
writer.Write(this.Unknown_7Ch);
writer.Write(this.Unknown_80h);
@ -204,16 +247,12 @@ namespace CodeWalker.GameFiles
writer.Write(this.Unknown_8Ch);
}
/// <summary>
/// Returns a list of data blocks which are referenced by this block.
/// </summary>
public override IResourceBlock[] GetReferences()
{
var list = new List<IResourceBlock>();
if (Name != null) list.Add(Name);
return list.ToArray();
}
public override Tuple<long, IResourceBlock>[] GetParts()
{
return new Tuple<long, IResourceBlock>[] {
@ -223,6 +262,12 @@ namespace CodeWalker.GameFiles
new Tuple<long, IResourceBlock>(0x50, Unknown_50h)
};
}
public override string ToString()
{
return (Name?.ToString() ?? base.ToString()) + " " + Unknown_74h.ToString();
}
}
@ -235,7 +280,7 @@ namespace CodeWalker.GameFiles
}
// structure data
public uint Unknown_0h { get; set; }
public MetaHash Unknown_0h { get; set; }
public uint len1 { get; set; }
public uint len2 { get; set; }
public ushort len3 { get; set; }
@ -244,9 +289,11 @@ namespace CodeWalker.GameFiles
public byte[] Data2 { get; set; }
public byte[] Data3 { get; set; }
/// <summary>
/// Reads the data-block from a stream.
/// </summary>
public ExpressionUnk1_Base[] Items { get; set; }
public override void Read(ResourceDataReader reader, params object[] parameters)
{
// read structure data
@ -258,11 +305,59 @@ namespace CodeWalker.GameFiles
this.Data1 = reader.ReadBytes((int)len1);
this.Data2 = reader.ReadBytes((int)len2);
this.Data3 = reader.ReadBytes((int)len3);
}
/// <summary>
/// Writes the data-block to a stream.
/// </summary>
#if DEBUG
ParseDatas();
#endif
//switch (Unknown_Eh)
//{
// case 2:
// case 8:
// case 4:
// case 6:
// case 59:
// case 5:
// case 12:
// case 58:
// case 20:
// case 10:
// case 9:
// case 1:
// case 50:
// case 14:
// case 19:
// case 7:
// case 25:
// case 15:
// case 13:
// case 28:
// case 17:
// case 22:
// case 26:
// case 18:
// case 21:
// case 23:
// case 11:
// case 24:
// case 27:
// case 30:
// case 16:
// case 377:
// case 31:
// case 125:
// case 32:
// case 34:
// case 52:
// case 51:
// case 345:
// case 399:
// break;
// default:
// break;//no hit
//}
}
public override void Write(ResourceDataWriter writer, params object[] parameters)
{
// write structure data
@ -275,8 +370,414 @@ namespace CodeWalker.GameFiles
writer.Write(this.Data2);
writer.Write(this.Data3);
}
public void ParseDatas()
{
var ms1 = new MemoryStream(Data1);
var ms2 = new MemoryStream(Data2);
var ms3 = new MemoryStream(Data3);
var dr1 = new DataReader(ms1);
var dr2 = new DataReader(ms2);
var dr3 = new DataReader(ms3);
var items = new List<ExpressionUnk1_Base>();
while (ms3.Position < ms3.Length)
{
var type = dr3.ReadByte();
if (type == 0)
{
if (ms3.Position != ms3.Length)
{ }
break;
}
var item = CreateItem(type);
item.Type = type;
item.Read(dr1, dr2, dr3);
items.Add(item);
}
Items = items.ToArray();
if (dr1.Position != dr1.Length)
{ }
if (dr2.Position != dr2.Length)
{ }
if (dr3.Position != dr3.Length)
{ }
}
public static ExpressionUnk1_Base CreateItem(byte type)
{
switch (type)
{
case 0x45: return new ExpressionUnk1_45();
case 0x44: return new ExpressionUnk1_44();
case 0x0B: return new ExpressionUnk1_0B();
case 0x07: return new ExpressionUnk1_07();
case 0x09: return new ExpressionUnk1_09();
case 0x05: return new ExpressionUnk1_05();
case 0x28: return new ExpressionUnk1_28();
case 0x26: return new ExpressionUnk1_26();
case 0x2B: return new ExpressionUnk1_2B();
case 0x2C: return new ExpressionUnk1_2C();
case 0x21: return new ExpressionUnk1_Empty(); //case 0x21: return new ExpressionUnk1_21();
case 0x3D: return new ExpressionUnk1_Empty();
case 0x03: return new ExpressionUnk1_Empty();
case 0x37: return new ExpressionUnk1_Empty();
case 0x01: return new ExpressionUnk1_Empty();
case 0x30: return new ExpressionUnk1_Empty();
case 0x2E: return new ExpressionUnk1_Empty();
case 0x33: return new ExpressionUnk1_Empty();
case 0x31: return new ExpressionUnk1_Empty();
case 0x32: return new ExpressionUnk1_Empty();
case 0x2F: return new ExpressionUnk1_Empty();
case 0x04: return new ExpressionUnk1_Empty();
case 0x10: return new ExpressionUnk1_Empty();
case 0x3B: return new ExpressionUnk1_Empty();
}
return new ExpressionUnk1_Empty();
}
public override string ToString()
{
return Unknown_0h.ToString();
}
}
[TypeConverter(typeof(ExpandableObjectConverter))] public class ExpressionUnk1_Base
{
public byte Type { get; set; }
public byte Type2 { get; set; }
public UnkStruct1 Struct1 { get; set; }
public UnkStruct2 Struct2 { get; set; }
public class UnkStruct1
{
public uint Length { get; set; }
public uint ItemCount { get; set; }
public uint ItemType { get; set; }
public uint Unk1 { get; set; }
public byte[] Data { get; set; }
//public Matrix[] Matrices { get; set; }
public void Read(DataReader r)
{
Length = r.ReadUInt32();
ItemCount = r.ReadUInt32();
ItemType = r.ReadUInt32();
Unk1 = r.ReadUInt32();
var len = Length;
//if (len == 0) len = 272;
var dlen = (int)len - 16;
if (dlen > 0)
{
Data = r.ReadBytes(dlen);
}
//if (ItemType > 1)
//{
// if (((ItemCount * ItemType * 32) + 16) != Length)
// { }
//}
//else
//{
// if (((ItemCount * ItemType * 32)) != Length)
// { }
//}
switch (ItemCount)
{
case 0:
case 4:
case 8:
case 12:
break;
default:
break;
}
switch (ItemType)
{
case 0:
case 1:
case 2:
break;
default:
break;
}
}
public void Write(DataWriter w)
{
}
public override string ToString()
{
return Length.ToString() + ", " + ItemCount.ToString() + ", " + ItemType.ToString();
}
}
public class UnkStruct2
{
public ushort Unk00 { get; set; }
public ushort Unk02 { get; set; }
public byte Unk04 { get; set; }
public byte Unk05 { get; set; }
public byte Unk06 { get; set; }
public byte Unk07 { get; set; }
public void Read(DataReader r)
{
Unk00 = r.ReadUInt16();
Unk02 = r.ReadUInt16();
Unk04 = r.ReadByte();
Unk05 = r.ReadByte();
Unk06 = r.ReadByte();
Unk07 = r.ReadByte();
}
public void Write(DataWriter w)
{
}
public override string ToString()
{
var str = Unk00.ToString() + ", " + Unk02.ToString() + ", " + Unk04.ToString() + ", " + Unk05.ToString() + ", " + Unk06.ToString() + ", " + Unk07.ToString();
return str;
}
}
public string TypeStr { get => Type.ToString("X").PadLeft(2, '0'); }
public string Type2Str { get => Type2.ToString("X").PadLeft(2, '0'); }
public virtual void Read(DataReader r1, DataReader r2, DataReader r3)
{ }
public UnkStruct1 ReadStruct1(DataReader r1)
{
Struct1 = new UnkStruct1();
Struct1.Read(r1);
return Struct1;
}
public UnkStruct2 ReadStruct2(DataReader r2)
{
Struct2 = new UnkStruct2();
Struct2.Read(r2);
return Struct2;
}
public override string ToString()
{
var str = TypeStr + ", " + Type2Str;
if (Struct2 != null)
{
str += " - " + Struct2.ToString();
}
if (Struct1 != null)
{
str += " - " + Struct1.ToString();
}
return str;
}
}
[TypeConverter(typeof(ExpandableObjectConverter))] public class ExpressionUnk1_Empty : ExpressionUnk1_Base
{
public override string ToString()
{
return TypeStr;
}
}
[TypeConverter(typeof(ExpandableObjectConverter))] public class ExpressionUnk1_45 : ExpressionUnk1_Base
{
public override void Read(DataReader r1, DataReader r2, DataReader r3)
{
ReadStruct1(r1);
ReadStruct2(r2);
Type2 = r3.ReadByte();
}
}
[TypeConverter(typeof(ExpandableObjectConverter))] public class ExpressionUnk1_44 : ExpressionUnk1_Base
{
public override void Read(DataReader r1, DataReader r2, DataReader r3)
{
ReadStruct1(r1);
ReadStruct2(r2);
Type2 = r3.ReadByte();
}
}
[TypeConverter(typeof(ExpandableObjectConverter))] public class ExpressionUnk1_21 : ExpressionUnk1_Base
{
public override void Read(DataReader r1, DataReader r2, DataReader r3)
{
ReadStruct2(r2);
Type2 = r3.ReadByte();
}
}
[TypeConverter(typeof(ExpandableObjectConverter))] public class ExpressionUnk1_0B : ExpressionUnk1_Base
{
public ExpressionUnk1_Base[] Children { get; set; }
public Vector4 UnkVec1 { get; set; }
public override void Read(DataReader r1, DataReader r2, DataReader r3)
{
var children = new List<ExpressionUnk1_Base>();
while (r3.Position < r3.Length)
{
var type = r3.ReadByte();
if ((type == 0x28) || (type == 0x26)) // 40, 38
{
Type2 = type;
break;
}
var child = ExpressionUnk1.CreateItem(type);
child.Type = type;
child.Read(r1, r2, r3);
children.Add(child);
}
if (children.Count > 0)
{
Children = children.ToArray();
}
ReadStruct2(r2);
UnkVec1 = r1.ReadVector4();
}
public override string ToString()
{
return base.ToString() + " - " + UnkVec1.ToString();// + " - " + (Items?.Length ?? 0).ToString() + " items";
}
}
[TypeConverter(typeof(ExpandableObjectConverter))] public class ExpressionUnk1_07 : ExpressionUnk1_Base
{
public override void Read(DataReader r1, DataReader r2, DataReader r3)
{
ReadStruct2(r2);
}
public override string ToString()
{
var str = TypeStr;
if (Struct2 != null)
{
str += " - " + Struct2.ToString();
}
return str;
}
}
[TypeConverter(typeof(ExpandableObjectConverter))] public class ExpressionUnk1_09 : ExpressionUnk1_Base
{
public override void Read(DataReader r1, DataReader r2, DataReader r3)
{
ReadStruct2(r2);
}
public override string ToString()
{
var str = TypeStr;
if (Struct2 != null)
{
str += " - " + Struct2.ToString();
}
return str;
}
}
[TypeConverter(typeof(ExpandableObjectConverter))] public class ExpressionUnk1_05 : ExpressionUnk1_Base
{
public float UnkFloat2 { get; set; }
public override void Read(DataReader r1, DataReader r2, DataReader r3)
{
UnkFloat2 = r2.ReadSingle();
}
public override string ToString()
{
return TypeStr + " - " + UnkFloat2.ToString();
}
}
[TypeConverter(typeof(ExpandableObjectConverter))] public class ExpressionUnk1_28 : ExpressionUnk1_Base
{
public override void Read(DataReader r1, DataReader r2, DataReader r3)
{
ReadStruct2(r2);
}
public override string ToString()
{
var str = TypeStr;
if (Struct2 != null)
{
str += " - " + Struct2.ToString();
}
return str;
}
}
[TypeConverter(typeof(ExpandableObjectConverter))] public class ExpressionUnk1_26 : ExpressionUnk1_Base
{
public override void Read(DataReader r1, DataReader r2, DataReader r3)
{
ReadStruct2(r2);
}
public override string ToString()
{
var str = TypeStr;
if (Struct2 != null)
{
str += " - " + Struct2.ToString();
}
return str;
}
}
[TypeConverter(typeof(ExpandableObjectConverter))] public class ExpressionUnk1_2B : ExpressionUnk1_Base
{
public float UnkFloat1 { get; set; }
public uint UnkUint1 { get; set; }
public uint UnkUint2 { get; set; }
public override void Read(DataReader r1, DataReader r2, DataReader r3)
{
UnkFloat1 = r2.ReadSingle();
UnkUint1 = r2.ReadUInt32();
UnkUint2 = r2.ReadUInt32();
}
public override string ToString()
{
return TypeStr + " - " + UnkFloat1.ToString() + ", " + UnkUint1.ToString() + ", " + UnkUint2.ToString();
}
}
[TypeConverter(typeof(ExpandableObjectConverter))] public class ExpressionUnk1_2C : ExpressionUnk1_Base
{
public float UnkFloat1 { get; set; }
public uint UnkUint1 { get; set; }
public uint UnkUint2 { get; set; }
public override void Read(DataReader r1, DataReader r2, DataReader r3)
{
UnkFloat1 = r2.ReadSingle();
UnkUint1 = r2.ReadUInt32();
UnkUint2 = r2.ReadUInt32();
}
public override string ToString()
{
return TypeStr + " - " + UnkFloat1.ToString() + ", " + UnkUint1.ToString() + ", " + UnkUint2.ToString();
}
}
[TypeConverter(typeof(ExpandableObjectConverter))] public class ExpressionUnk2 : ResourceSystemBlock
@ -284,57 +785,54 @@ namespace CodeWalker.GameFiles
public override long BlockLength => 0xA0;
// structure data
public float Unknown_0h { get; set; }
public float Unknown_4h { get; set; }
public float Unknown_8h { get; set; }
public uint Unknown_Ch { get; set; }
public float Unknown_00h { get; set; }
public float Unknown_04h { get; set; }
public float Unknown_08h { get; set; }
public MetaHash Unknown_0Ch { get; set; }
public float Unknown_10h { get; set; }
public float Unknown_14h { get; set; }
public float Unknown_18h { get; set; }
public uint Unknown_1Ch { get; set; }
public MetaHash Unknown_1Ch { get; set; }
public float Unknown_20h { get; set; }
public float Unknown_24h { get; set; }
public float Unknown_28h { get; set; }
public uint Unknown_2Ch { get; set; }
public MetaHash Unknown_2Ch { get; set; }
public float Unknown_30h { get; set; }
public float Unknown_34h { get; set; }
public float Unknown_38h { get; set; }
public uint Unknown_3Ch { get; set; }
public MetaHash Unknown_3Ch { get; set; }
public float Unknown_40h { get; set; }
public float Unknown_44h { get; set; }
public float Unknown_48h { get; set; }
public uint Unknown_4Ch { get; set; }
public MetaHash Unknown_4Ch { get; set; }
public float Unknown_50h { get; set; }
public float Unknown_54h { get; set; }
public float Unknown_58h { get; set; }
public uint Unknown_5Ch { get; set; }
public MetaHash Unknown_5Ch { get; set; }
public float Unknown_60h { get; set; }
public float Unknown_64h { get; set; }
public float Unknown_68h { get; set; }
public uint Unknown_6Ch { get; set; }
public MetaHash Unknown_6Ch { get; set; }
public float Unknown_70h { get; set; }
public float Unknown_74h { get; set; }
public float Unknown_78h { get; set; }
public uint Unknown_7Ch { get; set; }
public MetaHash Unknown_7Ch { get; set; }
public float Unknown_80h { get; set; }
public float Unknown_84h { get; set; }
public float Unknown_88h { get; set; }
public uint Unknown_8Ch { get; set; }
public MetaHash Unknown_8Ch { get; set; }
public float Unknown_90h { get; set; }
public float Unknown_94h { get; set; }
public float Unknown_98h { get; set; }
public uint Unknown_9Ch { get; set; }
public MetaHash Unknown_9Ch { get; set; }
/// <summary>
/// Reads the data-block from a stream.
/// </summary>
public override void Read(ResourceDataReader reader, params object[] parameters)
{
// read structure data
this.Unknown_0h = reader.ReadSingle();
this.Unknown_4h = reader.ReadSingle();
this.Unknown_8h = reader.ReadSingle();
this.Unknown_Ch = reader.ReadUInt32();
this.Unknown_00h = reader.ReadSingle();
this.Unknown_04h = reader.ReadSingle();
this.Unknown_08h = reader.ReadSingle();
this.Unknown_0Ch = reader.ReadUInt32();
this.Unknown_10h = reader.ReadSingle();
this.Unknown_14h = reader.ReadSingle();
this.Unknown_18h = reader.ReadSingle();
@ -372,17 +870,13 @@ namespace CodeWalker.GameFiles
this.Unknown_98h = reader.ReadSingle();
this.Unknown_9Ch = reader.ReadUInt32();
}
/// <summary>
/// Writes the data-block to a stream.
/// </summary>
public override void Write(ResourceDataWriter writer, params object[] parameters)
{
// write structure data
writer.Write(this.Unknown_0h);
writer.Write(this.Unknown_4h);
writer.Write(this.Unknown_8h);
writer.Write(this.Unknown_Ch);
writer.Write(this.Unknown_00h);
writer.Write(this.Unknown_04h);
writer.Write(this.Unknown_08h);
writer.Write(this.Unknown_0Ch);
writer.Write(this.Unknown_10h);
writer.Write(this.Unknown_14h);
writer.Write(this.Unknown_18h);
@ -424,4 +918,18 @@ namespace CodeWalker.GameFiles
[TypeConverter(typeof(ExpandableObjectConverter))] public struct ExpressionUnk3
{
public ushort Unk0 { get; set; } // bone tag? need to check
public byte Unk2 { get; set; } // animation track?
public byte Unk3 { get; set; } // ..flags?
public override string ToString()
{
return Unk0.ToString() + ", " + Unk2.ToString() + ", " + Unk3.ToString();
}
}
}