mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-11-29 10:22:53 +08:00
Dat151 progress
This commit is contained in:
parent
9a13bc9aa3
commit
21c9eda43c
@ -603,8 +603,10 @@ namespace CodeWalker.GameFiles
|
|||||||
case Dat151RelType.Helicopter: return new Dat151Helicopter(d, br);
|
case Dat151RelType.Helicopter: return new Dat151Helicopter(d, br);
|
||||||
case Dat151RelType.VehicleTrailer: return new Dat151VehicleTrailer(d, br);
|
case Dat151RelType.VehicleTrailer: return new Dat151VehicleTrailer(d, br);
|
||||||
|
|
||||||
|
case Dat151RelType.Train: return new Dat151Train(d, br);
|
||||||
|
case Dat151RelType.AnimalParams: return new Dat151AnimalParams(d, br);
|
||||||
//case Dat151RelType.SpeechParams: return new Dat151SpeechParams(d, br);
|
//case Dat151RelType.SpeechParams: return new Dat151SpeechParams(d, br);
|
||||||
//case Dat151RelType.AnimalParams: return new Dat151AnimalParams(d, br);
|
|
||||||
//case Dat151RelType.Unk9: return new Dat151Unk9(d, br);
|
//case Dat151RelType.Unk9: return new Dat151Unk9(d, br);
|
||||||
//case Dat151RelType.Unk11: return new Dat151Unk11(d, br);
|
//case Dat151RelType.Unk11: return new Dat151Unk11(d, br);
|
||||||
//case Dat151RelType.Unk12: return new Dat151Unk12(d, br);
|
//case Dat151RelType.Unk12: return new Dat151Unk12(d, br);
|
||||||
@ -626,7 +628,6 @@ namespace CodeWalker.GameFiles
|
|||||||
//case Dat151RelType.Unk45: return new Dat151Unk45(d, br);
|
//case Dat151RelType.Unk45: return new Dat151Unk45(d, br);
|
||||||
//case Dat151RelType.Unk48: return new Dat151Unk48(d, br);
|
//case Dat151RelType.Unk48: return new Dat151Unk48(d, br);
|
||||||
//case Dat151RelType.Unk51: return new Dat151Unk51(d, br);
|
//case Dat151RelType.Unk51: return new Dat151Unk51(d, br);
|
||||||
//case Dat151RelType.Unk53: return new Dat151Unk53(d, br);
|
|
||||||
//case Dat151RelType.Unk54: return new Dat151Unk54(d, br);
|
//case Dat151RelType.Unk54: return new Dat151Unk54(d, br);
|
||||||
//case Dat151RelType.Unk59: return new Dat151Unk59(d, br);
|
//case Dat151RelType.Unk59: return new Dat151Unk59(d, br);
|
||||||
//case Dat151RelType.Unk69: return new Dat151Unk69(d, br);
|
//case Dat151RelType.Unk69: return new Dat151Unk69(d, br);
|
||||||
@ -773,8 +774,10 @@ namespace CodeWalker.GameFiles
|
|||||||
case Dat151RelType.Helicopter: return new Dat151Helicopter(this);
|
case Dat151RelType.Helicopter: return new Dat151Helicopter(this);
|
||||||
case Dat151RelType.VehicleTrailer: return new Dat151VehicleTrailer(this);
|
case Dat151RelType.VehicleTrailer: return new Dat151VehicleTrailer(this);
|
||||||
|
|
||||||
|
case Dat151RelType.Train: return new Dat151Train(this);
|
||||||
|
case Dat151RelType.AnimalParams: return new Dat151AnimalParams(this);
|
||||||
//case Dat151RelType.SpeechParams: return new Dat151SpeechParams(this);
|
//case Dat151RelType.SpeechParams: return new Dat151SpeechParams(this);
|
||||||
//case Dat151RelType.AnimalParams: return new Dat151AnimalParams(this);
|
|
||||||
//case Dat151RelType.Unk9: return new Dat151Unk9(this);
|
//case Dat151RelType.Unk9: return new Dat151Unk9(this);
|
||||||
//case Dat151RelType.Unk11: return new Dat151Unk11(this);
|
//case Dat151RelType.Unk11: return new Dat151Unk11(this);
|
||||||
//case Dat151RelType.Unk12: return new Dat151Unk12(this);
|
//case Dat151RelType.Unk12: return new Dat151Unk12(this);
|
||||||
@ -796,7 +799,6 @@ namespace CodeWalker.GameFiles
|
|||||||
//case Dat151RelType.Unk45: return new Dat151Unk45(this);
|
//case Dat151RelType.Unk45: return new Dat151Unk45(this);
|
||||||
//case Dat151RelType.Unk48: return new Dat151Unk48(this);
|
//case Dat151RelType.Unk48: return new Dat151Unk48(this);
|
||||||
//case Dat151RelType.Unk51: return new Dat151Unk51(this);
|
//case Dat151RelType.Unk51: return new Dat151Unk51(this);
|
||||||
//case Dat151RelType.Unk53: return new Dat151Unk53(this);
|
|
||||||
//case Dat151RelType.Unk54: return new Dat151Unk54(this);
|
//case Dat151RelType.Unk54: return new Dat151Unk54(this);
|
||||||
//case Dat151RelType.Unk59: return new Dat151Unk59(this);
|
//case Dat151RelType.Unk59: return new Dat151Unk59(this);
|
||||||
//case Dat151RelType.Unk69: return new Dat151Unk69(this);
|
//case Dat151RelType.Unk69: return new Dat151Unk69(this);
|
||||||
@ -5174,7 +5176,7 @@ namespace CodeWalker.GameFiles
|
|||||||
Prop = 7,//prop? eg. fan, radar
|
Prop = 7,//prop? eg. fan, radar
|
||||||
Helicopter = 8,
|
Helicopter = 8,
|
||||||
Unk9 = 9,
|
Unk9 = 9,
|
||||||
Unk11 = 11,
|
Unk11 = 11, //contains reference to Unk12
|
||||||
Unk12 = 12,
|
Unk12 = 12,
|
||||||
Unk13 = 13,
|
Unk13 = 13,
|
||||||
SpeechParams = 14,
|
SpeechParams = 14,
|
||||||
@ -5200,7 +5202,7 @@ namespace CodeWalker.GameFiles
|
|||||||
AmbientEmitter = 38,
|
AmbientEmitter = 38,
|
||||||
AmbientZoneList = 39,
|
AmbientZoneList = 39,
|
||||||
Unk40 = 40,
|
Unk40 = 40,
|
||||||
Unk41 = 41,
|
Unk41 = 41, //ambience_bank_map_autogenerated
|
||||||
Unk42 = 42,
|
Unk42 = 42,
|
||||||
Interior = 44,
|
Interior = 44,
|
||||||
Unk45 = 45,
|
Unk45 = 45,
|
||||||
@ -5235,7 +5237,7 @@ namespace CodeWalker.GameFiles
|
|||||||
Unk77 = 77,
|
Unk77 = 77,
|
||||||
Unk78 = 78,
|
Unk78 = 78,
|
||||||
Unk79 = 79,
|
Unk79 = 79,
|
||||||
Unk80 = 80,
|
Unk80 = 80, //vehicle record audio? (YVR)
|
||||||
Unk81 = 81,
|
Unk81 = 81,
|
||||||
Unk82 = 82,
|
Unk82 = 82,
|
||||||
Unk83 = 83, //something to do with animals
|
Unk83 = 83, //something to do with animals
|
||||||
@ -5259,7 +5261,7 @@ namespace CodeWalker.GameFiles
|
|||||||
FadeInRadioAction = 103,
|
FadeInRadioAction = 103,
|
||||||
ForceRadioTrackAction = 104,
|
ForceRadioTrackAction = 104,
|
||||||
Unk105 = 105,
|
Unk105 = 105,
|
||||||
Unk106 = 106,
|
Unk106 = 106, //scenario type, eg world_human_musician
|
||||||
Unk107 = 107,
|
Unk107 = 107,
|
||||||
Unk108 = 108,
|
Unk108 = 108,
|
||||||
Unk109 = 109,
|
Unk109 = 109,
|
||||||
@ -14572,6 +14574,445 @@ namespace CodeWalker.GameFiles
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TC(typeof(EXP))] public class Dat151Train : Dat151RelData
|
||||||
|
{
|
||||||
|
public MetaHash Unk00 { get; set; }
|
||||||
|
public MetaHash Unk01 { get; set; }//0
|
||||||
|
public MetaHash Unk02 { get; set; }
|
||||||
|
public MetaHash Unk03 { get; set; }
|
||||||
|
public MetaHash Unk04 { get; set; }
|
||||||
|
public MetaHash Unk05 { get; set; }
|
||||||
|
public MetaHash Unk06 { get; set; }
|
||||||
|
public MetaHash Unk07 { get; set; }
|
||||||
|
public MetaHash Unk08 { get; set; }
|
||||||
|
public MetaHash Unk09 { get; set; }
|
||||||
|
public MetaHash Unk10 { get; set; }
|
||||||
|
public MetaHash Unk11 { get; set; }//shorts? 4272750130 -462,-340
|
||||||
|
public MetaHash Unk12 { get; set; }
|
||||||
|
public MetaHash Unk13 { get; set; }
|
||||||
|
public MetaHash Unk14 { get; set; }
|
||||||
|
public MetaHash Unk15 { get; set; }
|
||||||
|
public MetaHash Unk16 { get; set; }
|
||||||
|
public MetaHash Unk17 { get; set; }
|
||||||
|
public MetaHash Unk18 { get; set; }
|
||||||
|
public MetaHash Unk19 { get; set; }
|
||||||
|
public MetaHash Unk20 { get; set; }//f? 3123948585 -0.0006853962
|
||||||
|
public MetaHash Unk21 { get; set; }
|
||||||
|
public MetaHash Unk22 { get; set; }
|
||||||
|
public MetaHash Unk23 { get; set; }
|
||||||
|
public MetaHash Unk24 { get; set; }
|
||||||
|
public MetaHash Unk25 { get; set; }//f? 1034145554 0.0799848
|
||||||
|
public MetaHash Unk26 { get; set; }
|
||||||
|
public MetaHash Unk27 { get; set; }//f? 1180265007 13914.5459
|
||||||
|
public MetaHash Unk28 { get; set; }
|
||||||
|
public MetaHash Unk29 { get; set; }
|
||||||
|
public MetaHash Unk30 { get; set; }
|
||||||
|
public MetaHash Unk31 { get; set; }
|
||||||
|
public MetaHash Unk32 { get; set; }
|
||||||
|
public MetaHash Unk33 { get; set; }
|
||||||
|
public MetaHash Unk34 { get; set; }
|
||||||
|
public MetaHash Unk35 { get; set; }
|
||||||
|
public MetaHash Unk36 { get; set; }
|
||||||
|
public MetaHash Unk37 { get; set; }//f? 1122753141 117.926674
|
||||||
|
|
||||||
|
|
||||||
|
public Dat151Train(RelFile rel) : base(rel)
|
||||||
|
{
|
||||||
|
Type = Dat151RelType.Train;
|
||||||
|
TypeID = (byte)Type;
|
||||||
|
}
|
||||||
|
public Dat151Train(RelData d, BinaryReader br) : base(d, br)
|
||||||
|
{
|
||||||
|
Unk00 = br.ReadUInt32();
|
||||||
|
Unk01 = br.ReadUInt32();
|
||||||
|
Unk02 = br.ReadUInt32();
|
||||||
|
Unk03 = br.ReadUInt32();
|
||||||
|
Unk04 = br.ReadUInt32();
|
||||||
|
Unk05 = br.ReadUInt32();
|
||||||
|
Unk06 = br.ReadUInt32();
|
||||||
|
Unk07 = br.ReadUInt32();
|
||||||
|
Unk08 = br.ReadUInt32();
|
||||||
|
Unk09 = br.ReadUInt32();
|
||||||
|
Unk10 = br.ReadUInt32();
|
||||||
|
Unk11 = br.ReadUInt32();
|
||||||
|
Unk12 = br.ReadUInt32();
|
||||||
|
Unk13 = br.ReadUInt32();
|
||||||
|
Unk14 = br.ReadUInt32();
|
||||||
|
Unk15 = br.ReadUInt32();
|
||||||
|
Unk16 = br.ReadUInt32();
|
||||||
|
Unk17 = br.ReadUInt32();
|
||||||
|
Unk18 = br.ReadUInt32();
|
||||||
|
Unk19 = br.ReadUInt32();
|
||||||
|
Unk20 = br.ReadUInt32();
|
||||||
|
Unk21 = br.ReadUInt32();
|
||||||
|
Unk22 = br.ReadUInt32();
|
||||||
|
Unk23 = br.ReadUInt32();
|
||||||
|
Unk24 = br.ReadUInt32();
|
||||||
|
Unk25 = br.ReadUInt32();
|
||||||
|
Unk26 = br.ReadUInt32();
|
||||||
|
Unk27 = br.ReadUInt32();
|
||||||
|
Unk28 = br.ReadUInt32();
|
||||||
|
Unk29 = br.ReadUInt32();
|
||||||
|
Unk30 = br.ReadUInt32();
|
||||||
|
Unk31 = br.ReadUInt32();
|
||||||
|
Unk32 = br.ReadUInt32();
|
||||||
|
Unk33 = br.ReadUInt32();
|
||||||
|
Unk34 = br.ReadUInt32();
|
||||||
|
Unk35 = br.ReadUInt32();
|
||||||
|
Unk36 = br.ReadUInt32();
|
||||||
|
Unk37 = br.ReadUInt32();
|
||||||
|
|
||||||
|
if (Unk01 != 0)
|
||||||
|
{ }
|
||||||
|
if (Unk11 != 4272750130)
|
||||||
|
{ }
|
||||||
|
if (Unk20 != 3123948585)
|
||||||
|
{ }
|
||||||
|
if (Unk25 != 1034145554)
|
||||||
|
{ }
|
||||||
|
if (Unk27 != 1180265007)
|
||||||
|
{ }
|
||||||
|
if (Unk37 != 1122753141)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
|
||||||
|
var bytesleft = br.BaseStream.Length - br.BaseStream.Position;
|
||||||
|
if (bytesleft != 0)
|
||||||
|
{ }
|
||||||
|
}
|
||||||
|
public override void Write(BinaryWriter bw)
|
||||||
|
{
|
||||||
|
WriteTypeAndOffset(bw);
|
||||||
|
|
||||||
|
bw.Write(Unk00);
|
||||||
|
bw.Write(Unk01);
|
||||||
|
bw.Write(Unk02);
|
||||||
|
bw.Write(Unk03);
|
||||||
|
bw.Write(Unk04);
|
||||||
|
bw.Write(Unk05);
|
||||||
|
bw.Write(Unk06);
|
||||||
|
bw.Write(Unk07);
|
||||||
|
bw.Write(Unk08);
|
||||||
|
bw.Write(Unk09);
|
||||||
|
bw.Write(Unk10);
|
||||||
|
bw.Write(Unk11);
|
||||||
|
bw.Write(Unk12);
|
||||||
|
bw.Write(Unk13);
|
||||||
|
bw.Write(Unk14);
|
||||||
|
bw.Write(Unk15);
|
||||||
|
bw.Write(Unk16);
|
||||||
|
bw.Write(Unk17);
|
||||||
|
bw.Write(Unk18);
|
||||||
|
bw.Write(Unk19);
|
||||||
|
bw.Write(Unk20);
|
||||||
|
bw.Write(Unk21);
|
||||||
|
bw.Write(Unk22);
|
||||||
|
bw.Write(Unk23);
|
||||||
|
bw.Write(Unk24);
|
||||||
|
bw.Write(Unk25);
|
||||||
|
bw.Write(Unk26);
|
||||||
|
bw.Write(Unk27);
|
||||||
|
bw.Write(Unk28);
|
||||||
|
bw.Write(Unk29);
|
||||||
|
bw.Write(Unk30);
|
||||||
|
bw.Write(Unk31);
|
||||||
|
bw.Write(Unk32);
|
||||||
|
bw.Write(Unk33);
|
||||||
|
bw.Write(Unk34);
|
||||||
|
bw.Write(Unk35);
|
||||||
|
bw.Write(Unk36);
|
||||||
|
bw.Write(Unk37);
|
||||||
|
}
|
||||||
|
public override void WriteXml(StringBuilder sb, int indent)
|
||||||
|
{
|
||||||
|
RelXml.StringTag(sb, indent, "Unk00", RelXml.HashString(Unk00));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk01", RelXml.HashString(Unk01));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk02", RelXml.HashString(Unk02));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk03", RelXml.HashString(Unk03));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk04", RelXml.HashString(Unk04));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk05", RelXml.HashString(Unk05));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk06", RelXml.HashString(Unk06));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk07", RelXml.HashString(Unk07));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk08", RelXml.HashString(Unk08));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk09", RelXml.HashString(Unk09));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk10", RelXml.HashString(Unk10));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk11", RelXml.HashString(Unk11));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk12", RelXml.HashString(Unk12));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk13", RelXml.HashString(Unk13));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk14", RelXml.HashString(Unk14));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk15", RelXml.HashString(Unk15));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk16", RelXml.HashString(Unk16));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk17", RelXml.HashString(Unk17));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk18", RelXml.HashString(Unk18));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk19", RelXml.HashString(Unk19));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk20", RelXml.HashString(Unk20));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk21", RelXml.HashString(Unk21));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk22", RelXml.HashString(Unk22));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk23", RelXml.HashString(Unk23));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk24", RelXml.HashString(Unk24));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk25", RelXml.HashString(Unk25));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk26", RelXml.HashString(Unk26));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk27", RelXml.HashString(Unk27));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk28", RelXml.HashString(Unk28));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk29", RelXml.HashString(Unk29));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk30", RelXml.HashString(Unk30));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk31", RelXml.HashString(Unk31));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk32", RelXml.HashString(Unk32));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk33", RelXml.HashString(Unk33));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk34", RelXml.HashString(Unk34));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk35", RelXml.HashString(Unk35));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk36", RelXml.HashString(Unk36));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk37", RelXml.HashString(Unk37));
|
||||||
|
}
|
||||||
|
public override void ReadXml(XmlNode node)
|
||||||
|
{
|
||||||
|
Unk00 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk00"));
|
||||||
|
Unk01 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk01"));
|
||||||
|
Unk02 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk02"));
|
||||||
|
Unk03 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk03"));
|
||||||
|
Unk04 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk04"));
|
||||||
|
Unk05 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk05"));
|
||||||
|
Unk06 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk06"));
|
||||||
|
Unk07 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk07"));
|
||||||
|
Unk08 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk08"));
|
||||||
|
Unk09 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk09"));
|
||||||
|
Unk10 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk10"));
|
||||||
|
Unk11 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk11"));
|
||||||
|
Unk12 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk12"));
|
||||||
|
Unk13 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk13"));
|
||||||
|
Unk14 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk14"));
|
||||||
|
Unk15 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk15"));
|
||||||
|
Unk16 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk16"));
|
||||||
|
Unk17 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk17"));
|
||||||
|
Unk18 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk18"));
|
||||||
|
Unk19 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk19"));
|
||||||
|
Unk20 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk20"));
|
||||||
|
Unk21 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk21"));
|
||||||
|
Unk22 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk22"));
|
||||||
|
Unk23 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk23"));
|
||||||
|
Unk24 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk24"));
|
||||||
|
Unk25 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk25"));
|
||||||
|
Unk26 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk26"));
|
||||||
|
Unk27 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk27"));
|
||||||
|
Unk28 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk28"));
|
||||||
|
Unk29 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk29"));
|
||||||
|
Unk30 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk30"));
|
||||||
|
Unk31 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk31"));
|
||||||
|
Unk32 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk32"));
|
||||||
|
Unk33 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk33"));
|
||||||
|
Unk34 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk34"));
|
||||||
|
Unk35 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk35"));
|
||||||
|
Unk36 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk36"));
|
||||||
|
Unk37 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk37"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[TC(typeof(EXP))] public class Dat151AnimalParamsItem
|
||||||
|
{
|
||||||
|
public string Name { get; set; }
|
||||||
|
public float Unk1 { get; set; }
|
||||||
|
public float Unk2 { get; set; }
|
||||||
|
public int Unk3 { get; set; }
|
||||||
|
public float Unk4 { get; set; }
|
||||||
|
public int Unk5 { get; set; }
|
||||||
|
public int Unk6 { get; set; }
|
||||||
|
public float Unk7 { get; set; }
|
||||||
|
public byte Unk8 { get; set; }
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return Name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Dat151AnimalParamsItem()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
public Dat151AnimalParamsItem(BinaryReader br)
|
||||||
|
{
|
||||||
|
var data = br.ReadBytes(32);
|
||||||
|
Name = Encoding.ASCII.GetString(data).Replace("\0", "");
|
||||||
|
Unk1 = br.ReadSingle();
|
||||||
|
Unk2 = br.ReadSingle();
|
||||||
|
Unk3 = br.ReadInt32();
|
||||||
|
Unk4 = br.ReadSingle();
|
||||||
|
Unk5 = br.ReadInt32();
|
||||||
|
Unk6 = br.ReadInt32();
|
||||||
|
Unk7 = br.ReadSingle();
|
||||||
|
Unk8 = br.ReadByte();
|
||||||
|
}
|
||||||
|
public void Write(BinaryWriter bw)
|
||||||
|
{
|
||||||
|
var data = new byte[32];
|
||||||
|
int len = Math.Min(Name?.Length ?? 0, 32);
|
||||||
|
if (len > 0)
|
||||||
|
{
|
||||||
|
Encoding.ASCII.GetBytes(Name, 0, len, data, 0);
|
||||||
|
}
|
||||||
|
bw.Write(data);
|
||||||
|
bw.Write(Unk1);
|
||||||
|
bw.Write(Unk2);
|
||||||
|
bw.Write(Unk3);
|
||||||
|
bw.Write(Unk4);
|
||||||
|
bw.Write(Unk5);
|
||||||
|
bw.Write(Unk6);
|
||||||
|
bw.Write(Unk7);
|
||||||
|
bw.Write(Unk8);
|
||||||
|
}
|
||||||
|
public void WriteXml(StringBuilder sb, int indent)
|
||||||
|
{
|
||||||
|
RelXml.StringTag(sb, indent, "Name", Name);
|
||||||
|
RelXml.ValueTag(sb, indent, "Unk1", FloatUtil.ToString(Unk1));
|
||||||
|
RelXml.ValueTag(sb, indent, "Unk2", FloatUtil.ToString(Unk2));
|
||||||
|
RelXml.ValueTag(sb, indent, "Unk3", Unk3.ToString());
|
||||||
|
RelXml.ValueTag(sb, indent, "Unk4", FloatUtil.ToString(Unk4));
|
||||||
|
RelXml.ValueTag(sb, indent, "Unk5", Unk5.ToString());
|
||||||
|
RelXml.ValueTag(sb, indent, "Unk6", Unk6.ToString());
|
||||||
|
RelXml.ValueTag(sb, indent, "Unk7", FloatUtil.ToString(Unk7));
|
||||||
|
RelXml.ValueTag(sb, indent, "Unk8", Unk8.ToString());
|
||||||
|
}
|
||||||
|
public void ReadXml(XmlNode node)
|
||||||
|
{
|
||||||
|
Name = Xml.GetChildInnerText(node, "Name");
|
||||||
|
Unk1 = Xml.GetChildFloatAttribute(node, "Unk1", "value");
|
||||||
|
Unk2 = Xml.GetChildFloatAttribute(node, "Unk2", "value");
|
||||||
|
Unk3 = Xml.GetChildIntAttribute(node, "Unk3", "value");
|
||||||
|
Unk4 = Xml.GetChildFloatAttribute(node, "Unk4", "value");
|
||||||
|
Unk5 = Xml.GetChildIntAttribute(node, "Unk5", "value");
|
||||||
|
Unk6 = Xml.GetChildIntAttribute(node, "Unk6", "value");
|
||||||
|
Unk7 = Xml.GetChildFloatAttribute(node, "Unk7", "value");
|
||||||
|
Unk8 = (byte)Xml.GetChildUIntAttribute(node, "Unk8", "value");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[TC(typeof(EXP))] public class Dat151AnimalParams : Dat151RelData
|
||||||
|
{
|
||||||
|
public int Unk01 { get; set; }
|
||||||
|
public float Unk02 { get; set; }
|
||||||
|
public float Unk03 { get; set; }
|
||||||
|
public int Unk04 { get; set; }
|
||||||
|
public byte Unk05 { get; set; }
|
||||||
|
public MetaHash Unk06 { get; set; }
|
||||||
|
public MetaHash Unk07 { get; set; }
|
||||||
|
public MetaHash Unk08 { get; set; }
|
||||||
|
public float Unk09 { get; set; }
|
||||||
|
public MetaHash Unk10 { get; set; }
|
||||||
|
public byte ItemCount { get; set; }
|
||||||
|
public Dat151AnimalParamsItem[] Items { get; set; }
|
||||||
|
|
||||||
|
public Dat151AnimalParams(RelFile rel) : base(rel)
|
||||||
|
{
|
||||||
|
Type = Dat151RelType.AnimalParams;
|
||||||
|
TypeID = (byte)Type;
|
||||||
|
}
|
||||||
|
public Dat151AnimalParams(RelData d, BinaryReader br) : base(d, br)
|
||||||
|
{
|
||||||
|
|
||||||
|
Unk01 = br.ReadInt32();
|
||||||
|
Unk02 = br.ReadSingle();
|
||||||
|
Unk03 = br.ReadSingle();
|
||||||
|
Unk04 = br.ReadInt32();
|
||||||
|
Unk05 = br.ReadByte();
|
||||||
|
Unk06 = br.ReadUInt32();
|
||||||
|
Unk07 = br.ReadUInt32();
|
||||||
|
Unk08 = br.ReadUInt32();
|
||||||
|
Unk09 = br.ReadSingle();
|
||||||
|
Unk10 = br.ReadUInt32();
|
||||||
|
ItemCount = br.ReadByte();
|
||||||
|
|
||||||
|
var items = new Dat151AnimalParamsItem[ItemCount];
|
||||||
|
for (int i = 0; i < ItemCount; i++)
|
||||||
|
{
|
||||||
|
items[i] = new Dat151AnimalParamsItem(br);
|
||||||
|
}
|
||||||
|
Items = items;
|
||||||
|
|
||||||
|
var bytesleft = br.BaseStream.Length - br.BaseStream.Position;
|
||||||
|
if (bytesleft != 0)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
}
|
||||||
|
public override void Write(BinaryWriter bw)
|
||||||
|
{
|
||||||
|
WriteTypeAndOffset(bw);
|
||||||
|
|
||||||
|
bw.Write(Unk01);
|
||||||
|
bw.Write(Unk02);
|
||||||
|
bw.Write(Unk03);
|
||||||
|
bw.Write(Unk04);
|
||||||
|
bw.Write(Unk05);
|
||||||
|
bw.Write(Unk06);
|
||||||
|
bw.Write(Unk07);
|
||||||
|
bw.Write(Unk08);
|
||||||
|
bw.Write(Unk09);
|
||||||
|
bw.Write(Unk10);
|
||||||
|
bw.Write(ItemCount);
|
||||||
|
for (int i = 0; i < ItemCount; i++)
|
||||||
|
{
|
||||||
|
Items[i].Write(bw);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
public override void WriteXml(StringBuilder sb, int indent)
|
||||||
|
{
|
||||||
|
RelXml.ValueTag(sb, indent, "Unk01", Unk01.ToString());
|
||||||
|
RelXml.ValueTag(sb, indent, "Unk02", FloatUtil.ToString(Unk02));
|
||||||
|
RelXml.ValueTag(sb, indent, "Unk03", FloatUtil.ToString(Unk03));
|
||||||
|
RelXml.ValueTag(sb, indent, "Unk04", Unk04.ToString());
|
||||||
|
RelXml.ValueTag(sb, indent, "Unk05", Unk05.ToString());
|
||||||
|
RelXml.StringTag(sb, indent, "Unk06", RelXml.HashString(Unk06));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk07", RelXml.HashString(Unk07));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk08", RelXml.HashString(Unk08));
|
||||||
|
RelXml.ValueTag(sb, indent, "Unk09", FloatUtil.ToString(Unk09));
|
||||||
|
RelXml.StringTag(sb, indent, "Unk10", RelXml.HashString(Unk10));
|
||||||
|
|
||||||
|
if (ItemCount > 0)
|
||||||
|
{
|
||||||
|
RelXml.OpenTag(sb, indent, "Items");
|
||||||
|
var cind = indent + 1;
|
||||||
|
var cind2 = indent + 2;
|
||||||
|
for (int i = 0; i < ItemCount; i++)
|
||||||
|
{
|
||||||
|
RelXml.OpenTag(sb, cind, "Item");
|
||||||
|
Items[i].WriteXml(sb, cind2);
|
||||||
|
RelXml.CloseTag(sb, cind, "Item");
|
||||||
|
}
|
||||||
|
RelXml.CloseTag(sb, indent, "Items");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RelXml.SelfClosingTag(sb, indent, "Items");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public override void ReadXml(XmlNode node)
|
||||||
|
{
|
||||||
|
Unk01 = Xml.GetChildIntAttribute(node, "Unk01", "value");
|
||||||
|
Unk02 = Xml.GetChildFloatAttribute(node, "Unk02", "value");
|
||||||
|
Unk03 = Xml.GetChildFloatAttribute(node, "Unk03", "value");
|
||||||
|
Unk04 = Xml.GetChildIntAttribute(node, "Unk04", "value");
|
||||||
|
Unk05 = (byte)Xml.GetChildUIntAttribute(node, "Unk05", "value");
|
||||||
|
Unk06 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk06"));
|
||||||
|
Unk07 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk07"));
|
||||||
|
Unk08 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk08"));
|
||||||
|
Unk09 = Xml.GetChildFloatAttribute(node, "Unk09", "value");
|
||||||
|
Unk10 = XmlRel.GetHash(Xml.GetChildInnerText(node, "Unk10"));
|
||||||
|
|
||||||
|
var vnode2 = node.SelectSingleNode("Items");
|
||||||
|
if (vnode2 != null)
|
||||||
|
{
|
||||||
|
var inodes = vnode2.SelectNodes("Item");
|
||||||
|
if (inodes?.Count > 0)
|
||||||
|
{
|
||||||
|
var vlist = new List<Dat151AnimalParamsItem>();
|
||||||
|
foreach (XmlNode inode in inodes)
|
||||||
|
{
|
||||||
|
var v = new Dat151AnimalParamsItem();
|
||||||
|
v.ReadXml(inode);
|
||||||
|
vlist.Add(v);
|
||||||
|
}
|
||||||
|
ItemCount = (byte)vlist.Count;
|
||||||
|
Items = vlist.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -14581,6 +15022,36 @@ namespace CodeWalker.GameFiles
|
|||||||
|
|
||||||
|
|
||||||
//TODO classes
|
//TODO classes
|
||||||
|
|
||||||
|
[TC(typeof(EXP))] public class Dat151SpeechParams : Dat151RelData
|
||||||
|
{
|
||||||
|
public Dat151SpeechParams(RelFile rel) : base(rel)
|
||||||
|
{
|
||||||
|
Type = Dat151RelType.SpeechParams;
|
||||||
|
TypeID = (byte)Type;
|
||||||
|
}
|
||||||
|
public Dat151SpeechParams(RelData d, BinaryReader br) : base(d, br)
|
||||||
|
{
|
||||||
|
var bytesleft = br.BaseStream.Length - br.BaseStream.Position;
|
||||||
|
if (bytesleft != 0)
|
||||||
|
{ }
|
||||||
|
}
|
||||||
|
public override void Write(BinaryWriter bw)
|
||||||
|
{
|
||||||
|
//WriteTypeAndOffset(bw);
|
||||||
|
base.Write(bw);
|
||||||
|
}
|
||||||
|
public override void WriteXml(StringBuilder sb, int indent)
|
||||||
|
{
|
||||||
|
base.WriteXml(sb, indent);
|
||||||
|
}
|
||||||
|
public override void ReadXml(XmlNode node)
|
||||||
|
{
|
||||||
|
base.ReadXml(node);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
[TC(typeof(EXP))] public class Dat151Unk9 : Dat151RelData
|
[TC(typeof(EXP))] public class Dat151Unk9 : Dat151RelData
|
||||||
{
|
{
|
||||||
public Dat151Unk9(RelFile rel) : base(rel)
|
public Dat151Unk9(RelFile rel) : base(rel)
|
||||||
@ -14665,27 +15136,6 @@ namespace CodeWalker.GameFiles
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[TC(typeof(EXP))] public class Dat151SpeechParams : Dat151RelData
|
|
||||||
{
|
|
||||||
public Dat151SpeechParams(RelFile rel) : base(rel)
|
|
||||||
{
|
|
||||||
Type = Dat151RelType.SpeechParams;
|
|
||||||
TypeID = (byte)Type;
|
|
||||||
}
|
|
||||||
public Dat151SpeechParams(RelData d, BinaryReader br) : base(d, br)
|
|
||||||
{
|
|
||||||
var bytesleft = br.BaseStream.Length - br.BaseStream.Position;
|
|
||||||
if (bytesleft != 0)
|
|
||||||
{ }
|
|
||||||
}
|
|
||||||
public override void Write(BinaryWriter bw)
|
|
||||||
{
|
|
||||||
WriteTypeAndOffset(bw);
|
|
||||||
}
|
|
||||||
public override void WriteXml(StringBuilder sb, int indent)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
[TC(typeof(EXP))] public class Dat151Unk15 : Dat151RelData
|
[TC(typeof(EXP))] public class Dat151Unk15 : Dat151RelData
|
||||||
{
|
{
|
||||||
public Dat151Unk15(RelFile rel) : base(rel)
|
public Dat151Unk15(RelFile rel) : base(rel)
|
||||||
@ -15043,27 +15493,6 @@ namespace CodeWalker.GameFiles
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[TC(typeof(EXP))] public class Dat151Train : Dat151RelData
|
|
||||||
{
|
|
||||||
public Dat151Train(RelFile rel) : base(rel)
|
|
||||||
{
|
|
||||||
Type = Dat151RelType.Train;
|
|
||||||
TypeID = (byte)Type;
|
|
||||||
}
|
|
||||||
public Dat151Train(RelData d, BinaryReader br) : base(d, br)
|
|
||||||
{
|
|
||||||
var bytesleft = br.BaseStream.Length - br.BaseStream.Position;
|
|
||||||
if (bytesleft != 0)
|
|
||||||
{ }
|
|
||||||
}
|
|
||||||
public override void Write(BinaryWriter bw)
|
|
||||||
{
|
|
||||||
WriteTypeAndOffset(bw);
|
|
||||||
}
|
|
||||||
public override void WriteXml(StringBuilder sb, int indent)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
[TC(typeof(EXP))] public class Dat151Unk54 : Dat151RelData
|
[TC(typeof(EXP))] public class Dat151Unk54 : Dat151RelData
|
||||||
{
|
{
|
||||||
public Dat151Unk54(RelFile rel) : base(rel)
|
public Dat151Unk54(RelFile rel) : base(rel)
|
||||||
@ -15190,27 +15619,6 @@ namespace CodeWalker.GameFiles
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[TC(typeof(EXP))] public class Dat151AnimalParams : Dat151RelData
|
|
||||||
{
|
|
||||||
public Dat151AnimalParams(RelFile rel) : base(rel)
|
|
||||||
{
|
|
||||||
Type = Dat151RelType.AnimalParams;
|
|
||||||
TypeID = (byte)Type;
|
|
||||||
}
|
|
||||||
public Dat151AnimalParams(RelData d, BinaryReader br) : base(d, br)
|
|
||||||
{
|
|
||||||
var bytesleft = br.BaseStream.Length - br.BaseStream.Position;
|
|
||||||
if (bytesleft != 0)
|
|
||||||
{ }
|
|
||||||
}
|
|
||||||
public override void Write(BinaryWriter bw)
|
|
||||||
{
|
|
||||||
WriteTypeAndOffset(bw);
|
|
||||||
}
|
|
||||||
public override void WriteXml(StringBuilder sb, int indent)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
[TC(typeof(EXP))] public class Dat151Unk74 : Dat151RelData
|
[TC(typeof(EXP))] public class Dat151Unk74 : Dat151RelData
|
||||||
{
|
{
|
||||||
public Dat151Unk74(RelFile rel) : base(rel)
|
public Dat151Unk74(RelFile rel) : base(rel)
|
||||||
@ -15295,7 +15703,7 @@ namespace CodeWalker.GameFiles
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[TC(typeof(EXP))] public class Dat151Unk80 : Dat151RelData
|
[TC(typeof(EXP))] public class Dat151Unk80 : Dat151RelData //vehicle record audio? (YVR)
|
||||||
{
|
{
|
||||||
public Dat151Unk80(RelFile rel) : base(rel)
|
public Dat151Unk80(RelFile rel) : base(rel)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user