Merge pull request #3 from neos7/master

Edited fields names in Bounds class (BoundingBoxVolume and others)
This commit is contained in:
dexyfex 2018-01-04 04:33:13 +11:00 committed by GitHub
commit 5ca6749d15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -112,17 +112,22 @@ namespace CodeWalker.GameFiles
public uint Unknown_18h { get; set; }
public uint Unknown_1Ch { get; set; }
public SharpDX.Vector3 BoundingBoxMax { get; set; }
public float Unknown_2Ch { get; set; }
public float Margin { get; set; }
public SharpDX.Vector3 BoundingBoxMin { get; set; }
public uint Unknown_3Ch { get; set; }
public SharpDX.Vector3 BoundingBoxCenter { get; set; }
public uint Unknown_4Ch { 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; } //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 uint Unknown_5Ch { get; set; }
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; }
public float Unknown_68h { get; set; }
public uint Unknown_6Ch { get; set; }
public float BoundingBoxVolume { get; set; }
public Bounds Parent { get; set; }
@ -155,17 +160,22 @@ namespace CodeWalker.GameFiles
this.Unknown_18h = reader.ReadUInt32();
this.Unknown_1Ch = reader.ReadUInt32();
this.BoundingBoxMax = reader.ReadStruct<SharpDX.Vector3>();
this.Unknown_2Ch = reader.ReadSingle();
this.Margin = reader.ReadSingle();
this.BoundingBoxMin = reader.ReadStruct<SharpDX.Vector3>();
this.Unknown_3Ch = reader.ReadUInt32();
this.BoundingBoxCenter = reader.ReadStruct<SharpDX.Vector3>();
this.Unknown_4Ch = reader.ReadUInt32();
this.MaterialIndex = 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.ReadUInt32();
this.PolyFlags = reader.ReadByte();
this.MaterialColorIndex = reader.ReadByte();
this.Unknown_5Eh = reader.ReadUInt16();
this.Unknown_60h = reader.ReadSingle();
this.Unknown_64h = reader.ReadSingle();
this.Unknown_68h = reader.ReadSingle();
this.Unknown_6Ch = reader.ReadUInt32();
this.BoundingBoxVolume = reader.ReadSingle();
}
/// <summary>
@ -183,17 +193,22 @@ namespace CodeWalker.GameFiles
writer.Write(this.Unknown_18h);
writer.Write(this.Unknown_1Ch);
//writer.WriteBlock(this.BoundingBoxMax); //TODO: FIX!!
writer.Write(this.Unknown_2Ch);
writer.Write(this.Margin);
//writer.WriteBlock(this.BoundingBoxMin);
writer.Write(this.Unknown_3Ch);
//writer.WriteBlock(this.BoundingBoxCenter);
writer.Write(this.Unknown_4Ch);
writer.Write(this.MaterialIndex);
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);
writer.Write(this.Unknown_68h);
writer.Write(this.Unknown_6Ch);
writer.Write(this.BoundingBoxVolume);
}
public IResourceSystemBlock GetType(ResourceDataReader reader, params object[] parameters)
@ -544,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