Bounds class: added MaterialColorIndex and PolyFlags

This commit is contained in:
Carmine 2018-01-03 17:30:16 +01:00
parent 86b15ad5ae
commit 4e2b5b428c

View File

@ -117,11 +117,12 @@ namespace CodeWalker.GameFiles
public uint Unknown_3Ch { get; set; }
public SharpDX.Vector3 BoundingBoxCenter { get; set; }
public byte MaterialIndex { get; set; }
public byte ProceduralID { get; set; }
public byte RoomID_and_PedDensity { get; set; } //5bits for RoomID and then 3bits for PedDensity
public byte Unknown_4Fh { get; set; } //bit5 related to Unknown_5Ch, should be a flag called "Has PolyFlags"
public byte ProceduralId { get; set; }
public byte RoomId_and_PedDensity { get; set; } //5bits for RoomID and then 3bits for PedDensity
public byte Unknown_4Fh { get; set; } //flags? (bit5 related to Unknown_5Ch, should be a flag called "Has PolyFlags")<-- i don't remember why i wrote this lol
public SharpDX.Vector3 Center { get; set; }
public ushort Unknown_5Ch { get; set; } //PolyFlags?
public byte PolyFlags { get; set; }
public byte MaterialColorIndex { get; set; }
public ushort Unknown_5Eh { get; set; }
public float Unknown_60h { get; set; }
public float Unknown_64h { get; set; }
@ -164,11 +165,12 @@ namespace CodeWalker.GameFiles
this.Unknown_3Ch = reader.ReadUInt32();
this.BoundingBoxCenter = reader.ReadStruct<SharpDX.Vector3>();
this.MaterialIndex = reader.ReadByte();
this.ProceduralID = reader.ReadByte();
this.RoomID_and_PedDensity = reader.ReadByte();
this.ProceduralId = reader.ReadByte();
this.RoomId_and_PedDensity = reader.ReadByte();
this.Unknown_4Fh = reader.ReadByte();
this.Center = reader.ReadStruct<SharpDX.Vector3>();
this.Unknown_5Ch = reader.ReadUInt16();
this.PolyFlags = reader.ReadByte();
this.MaterialColorIndex = reader.ReadByte();
this.Unknown_5Eh = reader.ReadUInt16();
this.Unknown_60h = reader.ReadSingle();
this.Unknown_64h = reader.ReadSingle();
@ -196,11 +198,12 @@ namespace CodeWalker.GameFiles
writer.Write(this.Unknown_3Ch);
//writer.WriteBlock(this.BoundingBoxCenter);
writer.Write(this.MaterialIndex);
writer.Write(this.ProceduralID);
writer.Write(this.RoomID_and_PedDensity);
writer.Write(this.ProceduralId);
writer.Write(this.RoomId_and_PedDensity);
writer.Write(this.Unknown_4Fh);
//writer.WriteBlock(this.Center);
writer.Write(this.Unknown_5Ch);
writer.Write(this.PolyFlags);
writer.Write(this.MaterialColorIndex);
writer.Write(this.Unknown_5Eh);
writer.Write(this.Unknown_60h);
writer.Write(this.Unknown_64h);
@ -556,26 +559,27 @@ namespace CodeWalker.GameFiles
[TypeConverter(typeof(ExpandableObjectConverter))] public struct BoundMaterial_s
{
public BoundsMaterialType Type { get; set; }
public byte Unk0 { get; set; }
public byte Unk1 { get; set; }
public byte Unk2 { get; set; }
public uint Unk3 { get; set; }
public byte ProceduralId { get; set; }
public byte RoomId_and_PedDensity { get; set; }
public ushort PolyFlags { get; set; } //TOBEFIXED
public byte MaterialColorIndex { get; set; } //TOBEFIXED
public ushort Unk4 { get; set; }
public override string ToString()
{
return Type.ToString() + ", " + Unk0.ToString() + ", " + Unk1.ToString() + ", " + Unk2.ToString() + ", " + Unk3.ToString();
return Type.ToString() + ", " + ProceduralId.ToString() + ", " + RoomId_and_PedDensity.ToString() + ", " + MaterialColorIndex.ToString() + ", " + PolyFlags.ToString() + ", " + Unk4.ToString();
}
}
[TypeConverter(typeof(ExpandableObjectConverter))] public struct BoundMaterialColour
{
//public BoundsMaterialType Type { get; set; }
public byte Unk0 { get; set; }
public byte Unk1 { get; set; }
public byte Unk2 { get; set; }
public byte Unk3 { get; set; }
public byte R { get; set; }
public byte G { get; set; }
public byte B { get; set; }
public byte A { get; set; } //GIMS EVO saves this as "opacity" 0-100
public override string ToString()
{
//return Type.ToString() + ", " + Unk0.ToString() + ", " + Unk1.ToString() + ", " + Unk2.ToString();
return Unk0.ToString() + ", " + Unk1.ToString() + ", " + Unk2.ToString() + ", " + Unk3.ToString();
return R.ToString() + ", " + G.ToString() + ", " + B.ToString() + ", " + A.ToString();
}
}
[TypeConverter(typeof(ExpandableObjectConverter))] public struct BoundVertex_s