From 4e64c324cfb911e2f590c999b72b04748840ba08 Mon Sep 17 00:00:00 2001 From: dexy Date: Thu, 21 Nov 2019 21:29:55 +1100 Subject: [PATCH] Updated MetaNames --- .../GameFiles/MetaTypes/MetaNames.cs | 74 ++++++++ .../GameFiles/MetaTypes/MetaTypes.cs | 108 ++++++------ .../GameFiles/MetaTypes/PsoTypes.cs | 20 +-- Peds/PedsForm.cs | 6 +- Vehicles/VehicleForm.Designer.cs | 160 +++++++++--------- 5 files changed, 222 insertions(+), 146 deletions(-) diff --git a/CodeWalker.Core/GameFiles/MetaTypes/MetaNames.cs b/CodeWalker.Core/GameFiles/MetaTypes/MetaNames.cs index 29847d4..6e7f870 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/MetaNames.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/MetaNames.cs @@ -3557,6 +3557,15 @@ namespace CodeWalker.GameFiles aComponentData3 = 3796409423, aDrawblData3 = 1756136273, bHasTexVariations = 1235281004, + availComp = 2996560424, + CPVDrawblData = 1535046754, + CPVComponentData = 3538495220, + CPVTextureData = 1036962405, + propTexId = 672172037, + propDrawableId = 2095974912, + compDrawableId = 173599222, + propAnchorId = 3598106198, + compTexId = 2991454271, //occlusion ymt's from Siprus DestRoomIdx = 1028873946, @@ -3621,6 +3630,71 @@ namespace CodeWalker.GameFiles v_recycle_stair2 = 3998905162, v_recycle_window = 2808950336, + //more ped.ymt's hashes from Siprus + shoe_dress_shoes = 3199946566, + shoe_golf_shoes = 2839919184, + shoe_heavy_boots = 1032158653, + shoe_scuba_flippers = 378813016, + shoe_flip_flops = 2060154316, + shoe_cowboy_boots = 2839908380, + shoe_normal_heels = 3937154717, + shoe_rubber = 3737214528, + shoe_trainers = 3325651536, + shoe_heels = 2000019839, + shoe_barefoot = 1461428428, + shoe_high_heels = 3928708288, + shoe_rubber_boots = 3194973734, + cloth_backpack = 1069599825, + cloth_ballistic = 4078855526, + cloth_cop_belt = 4133108633, + cloth_gas_mask = 4065623745, + cloth_heavy_bag = 4153104635, + cloth_lower_ballistic_armour = 4106198121, + cloth_lower_bare = 1628659471, + cloth_lower_cop = 1540859016, + cloth_lower_cotton = 1141160746, + cloth_lower_extreme = 4088613522, + cloth_lower_fireman = 1406591853, + cloth_lower_leather = 3327176319, + cloth_lower_pants_denim = 4176749571, + cloth_lower_pants_leather = 529572143, + cloth_lower_pants_suit = 3685853881, + cloth_lower_pants_tight = 879250969, + cloth_lower_shorts = 3301429444, + cloth_lower_skirt_long = 421389060, + cloth_lower_skirt_short = 710005800, + cloth_lower_swat = 291450192, + cloth_lower_waterproof = 1695056885, + cloth_rappel_parachute = 3513212182, + cloth_scuba = 861851786, + cloth_tool_belt = 2531067209, + cloth_upper_alien = 2291900169, + cloth_upper_ballistic_armour = 145524546, + cloth_upper_bare = 1870774092, + cloth_upper_bikini_top = 3629254153, + cloth_upper_coat_scientist = 1946563223, + cloth_upper_cop = 2483445690, + cloth_upper_cop_vest = 1515519271, + cloth_upper_cotton = 830866350, + cloth_upper_fireman = 669860574, + cloth_upper_jacket_cotton = 4008082313, + cloth_upper_jacket_leather = 1106508751, + cloth_upper_jacket_puffy = 2884411436, + cloth_upper_jacket_suit = 979848852, + cloth_upper_leather = 401172640, + cloth_upper_shirt_cotton_heavy = 3934084272, + cloth_upper_shirt_cotton_lite = 176526946, + cloth_upper_shirt_leather = 67091042, + cloth_upper_shirt_tee = 1237088534, + cloth_upper_spacesuit = 1018641360, + cloth_upper_swat = 2783390651, + cloth_upper_sweater = 3189514483, + cloth_upper_waterproof = 3748562816, + upper_cotton = 3438959116, + + + + diff --git a/CodeWalker.Core/GameFiles/MetaTypes/MetaTypes.cs b/CodeWalker.Core/GameFiles/MetaTypes/MetaTypes.cs index d22a66a..bef21c1 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/MetaTypes.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/MetaTypes.cs @@ -1022,8 +1022,8 @@ namespace CodeWalker.GameFiles new MetaStructureEntryInfo_s((MetaName)911147899, 2, MetaStructureEntryDataType.Boolean, 0, 0, 0), new MetaStructureEntryInfo_s((MetaName)315291935, 3, MetaStructureEntryDataType.Boolean, 0, 0, 0), new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)2996560424, 4, MetaStructureEntryDataType.ArrayOfBytes, 0, 4, (MetaName)MetaTypeName.PsoPOINTER), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, (MetaName)3538495220), + new MetaStructureEntryInfo_s(MetaName.availComp, 4, MetaStructureEntryDataType.ArrayOfBytes, 0, 4, (MetaName)MetaTypeName.PsoPOINTER), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CPVComponentData), new MetaStructureEntryInfo_s(MetaName.aComponentData3, 16, MetaStructureEntryDataType.Array, 0, 6, 0), new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CPedSelectionSet), new MetaStructureEntryInfo_s(MetaName.aSelectionSets, 32, MetaStructureEntryDataType.Array, 0, 8, 0), @@ -1032,26 +1032,26 @@ namespace CodeWalker.GameFiles new MetaStructureEntryInfo_s(MetaName.propInfo, 64, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CPedPropInfo), new MetaStructureEntryInfo_s(MetaName.dlcName, 104, MetaStructureEntryDataType.Hash, 0, 0, 0) ); - case (MetaName)3538495220: - return new MetaStructureInfo((MetaName)3538495220, 2024084511, 768, 24, + case MetaName.CPVComponentData: + return new MetaStructureInfo(MetaName.CPVComponentData, 2024084511, 768, 24, new MetaStructureEntryInfo_s(MetaName.numAvailTex, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, (MetaName)1535046754), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CPVDrawblData), new MetaStructureEntryInfo_s(MetaName.aDrawblData3, 8, MetaStructureEntryDataType.Array, 0, 1, 0) ); case (MetaName)2236980467: return new MetaStructureInfo((MetaName)2236980467, 508935687, 0, 24, new MetaStructureEntryInfo_s(MetaName.ownsCloth, 0, MetaStructureEntryDataType.Boolean, 0, 0, 0) ); - case (MetaName)1535046754: - return new MetaStructureInfo((MetaName)1535046754, 124073662, 768, 48, + case MetaName.CPVDrawblData: + return new MetaStructureInfo(MetaName.CPVDrawblData, 124073662, 768, 48, new MetaStructureEntryInfo_s(MetaName.propMask, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), new MetaStructureEntryInfo_s(MetaName.numAlternatives, 1, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, (MetaName)1036962405), + new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.Structure, 0, 0, MetaName.CPVTextureData), new MetaStructureEntryInfo_s(MetaName.aTexData, 8, MetaStructureEntryDataType.Array, 0, 2, 0), new MetaStructureEntryInfo_s(MetaName.clothData, 24, MetaStructureEntryDataType.Structure, 0, 0, (MetaName)2236980467) ); - case (MetaName)1036962405: - return new MetaStructureInfo((MetaName)1036962405, 4272717794, 0, 3, + case MetaName.CPVTextureData: + return new MetaStructureInfo(MetaName.CPVTextureData, 4272717794, 0, 3, new MetaStructureEntryInfo_s(MetaName.texId, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), new MetaStructureEntryInfo_s(MetaName.distribution, 1, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0) ); @@ -1102,15 +1102,15 @@ namespace CodeWalker.GameFiles return new MetaStructureInfo(MetaName.CPedSelectionSet, 3120284999, 512, 48, new MetaStructureEntryInfo_s(MetaName.name, 0, MetaStructureEntryDataType.Hash, 0, 0, 0), new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)173599222, 4, MetaStructureEntryDataType.ArrayOfBytes, 0, 1, (MetaName)MetaTypeName.PsoPOINTER), + new MetaStructureEntryInfo_s(MetaName.compDrawableId, 4, MetaStructureEntryDataType.ArrayOfBytes, 0, 1, (MetaName)MetaTypeName.PsoPOINTER), new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)2991454271, 16, MetaStructureEntryDataType.ArrayOfBytes, 0, 3, (MetaName)MetaTypeName.PsoPOINTER), + new MetaStructureEntryInfo_s(MetaName.compTexId, 16, MetaStructureEntryDataType.ArrayOfBytes, 0, 3, (MetaName)MetaTypeName.PsoPOINTER), new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)3598106198, 28, MetaStructureEntryDataType.ArrayOfBytes, 0, 5, (MetaName)6), + new MetaStructureEntryInfo_s(MetaName.propAnchorId, 28, MetaStructureEntryDataType.ArrayOfBytes, 0, 5, (MetaName)6), new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)2095974912, 34, MetaStructureEntryDataType.ArrayOfBytes, 0, 7, (MetaName)6), + new MetaStructureEntryInfo_s(MetaName.propDrawableId, 34, MetaStructureEntryDataType.ArrayOfBytes, 0, 7, (MetaName)6), new MetaStructureEntryInfo_s((MetaName)MetaTypeName.ARRAYINFO, 0, MetaStructureEntryDataType.UnsignedByte, 0, 0, 0), - new MetaStructureEntryInfo_s((MetaName)672172037, 40, MetaStructureEntryDataType.ArrayOfBytes, 0, 9, (MetaName)6) + new MetaStructureEntryInfo_s(MetaName.propTexId, 40, MetaStructureEntryDataType.ArrayOfBytes, 0, 9, (MetaName)6) ); case MetaName.CExtensionDefDoor: return new MetaStructureInfo(MetaName.CExtensionDefDoor, 2671601385, 1024, 48, @@ -5996,8 +5996,8 @@ namespace CodeWalker.GameFiles public byte bHasDrawblVariations { get; set; } //1 1: Boolean: 0: bHasDrawblVariations public byte Unk_911147899 { get; set; } //2 2: Boolean: 0: 911147899 public byte Unk_315291935 { get; set; } //3 3: Boolean: 0: 315291935 - public ArrayOfBytes12 Unk_2996560424 { get; set; } //4 4: ArrayOfBytes: 12: 2996560424 - public Array_Structure aComponentData3 { get; set; } //16 16: Array: 0: aComponentData3 {0: Structure: 3538495220: 256} + public ArrayOfBytes12 availComp { get; set; } //4 4: ArrayOfBytes: 12: availComp + public Array_Structure aComponentData3 { get; set; } //16 16: Array: 0: aComponentData3 {0: Structure: CPVComponentData: 256} public Array_Structure aSelectionSets { get; set; } //32 32: Array: 0: aSelectionSets {0: Structure: CPedSelectionSet: 256} public Array_Structure compInfos { get; set; } //48 48: Array: 0: compInfos {0: Structure: CComponentInfo: 256} public CPedPropInfo propInfo { get; set; } //64 64: Structure: CPedPropInfo: propInfo @@ -6019,7 +6019,7 @@ namespace CodeWalker.GameFiles public CPedVariationInfo Data { get { return _Data; } } public byte[] ComponentIndices { get; set; } - public MUnk_3538495220[] ComponentData3 { get; set; } + public MCPVComponentData[] ComponentData3 { get; set; } public MCPedSelectionSet[] SelectionSets { get; set; } public MCComponentInfo[] CompInfos { get; set; } public MCPedPropInfo PropInfo { get; set; } @@ -6037,16 +6037,16 @@ namespace CodeWalker.GameFiles _Data = data; - ComponentIndices = data.Unk_2996560424.GetArray(); + ComponentIndices = data.availComp.GetArray(); - var aComponentData3 = MetaTypes.ConvertDataArray(meta, (MetaName)3538495220, _Data.aComponentData3); + var aComponentData3 = MetaTypes.ConvertDataArray(meta, MetaName.CPVComponentData, _Data.aComponentData3); if (aComponentData3 != null) { - ComponentData3 = new MUnk_3538495220[aComponentData3.Length]; + ComponentData3 = new MCPVComponentData[aComponentData3.Length]; for (int i = 0; i < aComponentData3.Length; i++) { - ComponentData3[i] = new MUnk_3538495220(meta, aComponentData3[i], this); + ComponentData3[i] = new MCPVComponentData(meta, aComponentData3[i], this); } } @@ -6108,7 +6108,7 @@ namespace CodeWalker.GameFiles } - public MUnk_3538495220 GetComponentData(int componentType) + public MCPVComponentData GetComponentData(int componentType) { if ((componentType < 0) || (componentType > 11)) return null; if (ComponentIndices == null) return null; @@ -6119,24 +6119,24 @@ namespace CodeWalker.GameFiles } - [TC(typeof(EXP))] public struct Unk_3538495220 //24 bytes, Key:2024084511 //COMPONENT PEDS component variations item + [TC(typeof(EXP))] public struct CPVComponentData //24 bytes, Key:2024084511 //COMPONENT PEDS component variations item { public byte numAvailTex { get; set; } //0 0: UnsignedByte: 0: numAvailTex public byte Unused0 { get; set; }//1 public ushort Unused1 { get; set; }//2 public uint Unused2 { get; set; }//4 - public Array_Structure aDrawblData3 { get; set; } //8 8: Array: 0: aDrawblData3 {0: Structure: 1535046754: 256} + public Array_Structure aDrawblData3 { get; set; } //8 8: Array: 0: aDrawblData3 {0: Structure: CPVDrawblData: 256} } - [TC(typeof(EXP))] public class MUnk_3538495220 : MetaWrapper + [TC(typeof(EXP))] public class MCPVComponentData : MetaWrapper { public MCPedVariationInfo Owner { get; set; } - public Unk_3538495220 _Data; - public Unk_3538495220 Data { get { return _Data; } } + public CPVComponentData _Data; + public CPVComponentData Data { get { return _Data; } } public byte numAvailTex { get { return _Data.numAvailTex; } set { _Data.numAvailTex = value; } } - public MUnk_1535046754[] DrawblData3 { get; set; } + public MCPVDrawblData[] DrawblData3 { get; set; } public int ComponentType { get; set; } = 0; public static string[] ComponentTypeNames { get; } = @@ -6156,8 +6156,8 @@ namespace CodeWalker.GameFiles }; - public MUnk_3538495220() { } - public MUnk_3538495220(Meta meta, Unk_3538495220 data, MCPedVariationInfo owner) + public MCPVComponentData() { } + public MCPVComponentData(Meta meta, CPVComponentData data, MCPedVariationInfo owner) { _Data = data; Owner = owner; @@ -6167,13 +6167,13 @@ namespace CodeWalker.GameFiles private void Init(Meta meta) { - var aDrawblData3 = MetaTypes.ConvertDataArray(meta, (MetaName)1535046754, _Data.aDrawblData3); + var aDrawblData3 = MetaTypes.ConvertDataArray(meta, MetaName.CPVDrawblData, _Data.aDrawblData3); if (aDrawblData3 != null) { - DrawblData3 = new MUnk_1535046754[aDrawblData3.Length]; + DrawblData3 = new MCPVDrawblData[aDrawblData3.Length]; for (int i = 0; i < aDrawblData3.Length; i++) { - DrawblData3[i] = new MUnk_1535046754(meta, aDrawblData3[i], this, i); + DrawblData3[i] = new MCPVDrawblData(meta, aDrawblData3[i], this, i); } } } @@ -6181,7 +6181,7 @@ namespace CodeWalker.GameFiles public override void Load(Meta meta, MetaPOINTER ptr) { - _Data = MetaTypes.GetData(meta, ptr); + _Data = MetaTypes.GetData(meta, ptr); Init(meta); } @@ -6197,23 +6197,23 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public struct Unk_1535046754 //48 bytes, Key:124073662 //COMPONENT PEDS drawable info + [TC(typeof(EXP))] public struct CPVDrawblData //48 bytes, Key:124073662 //COMPONENT PEDS drawable info { public byte propMask { get; set; } //0 0: UnsignedByte: 0: propMask public byte numAlternatives { get; set; } //1 1: UnsignedByte: 0: 2806194106 public ushort Unused0 { get; set; }//2 public uint Unused1 { get; set; }//4 - public Array_Structure aTexData { get; set; } //8 8: Array: 0: aTexData {0: Structure: 1036962405: 256} + public Array_Structure aTexData { get; set; } //8 8: Array: 0: aTexData {0: Structure: CPVTextureData: 256} public Unk_2236980467 clothData { get; set; } //24 24: Structure: 2236980467: clothData } - [TC(typeof(EXP))] public class MUnk_1535046754 : MetaWrapper + [TC(typeof(EXP))] public class MCPVDrawblData : MetaWrapper { - public MUnk_3538495220 Owner { get; set; } + public MCPVComponentData Owner { get; set; } - public Unk_1535046754 _Data; - public Unk_1535046754 Data { get { return _Data; } } + public CPVDrawblData _Data; + public CPVDrawblData Data { get { return _Data; } } - public Unk_1036962405[] TexData { get; set; } + public CPVTextureData[] TexData { get; set; } public int ComponentType { get; set; } = 0; public int DrawableIndex { get; set; } = 0; @@ -6224,7 +6224,7 @@ namespace CodeWalker.GameFiles public string GetDrawableName(int altnum = 0) { - string r = (ComponentType < 12) ? MUnk_3538495220.ComponentTypeNames[ComponentType] : "error"; + string r = (ComponentType < 12) ? MCPVComponentData.ComponentTypeNames[ComponentType] : "error"; r += "_"; r += DrawableIndex.ToString("000"); r += "_"; @@ -6251,7 +6251,7 @@ namespace CodeWalker.GameFiles } public string GetTexturePrefix() { - string r = (ComponentType < 12) ? MUnk_3538495220.ComponentTypeNames[ComponentType] : "error"; + string r = (ComponentType < 12) ? MCPVComponentData.ComponentTypeNames[ComponentType] : "error"; r += "_diff_"; //are there variations of this? r += DrawableIndex.ToString("000"); r += "_"; @@ -6300,14 +6300,14 @@ namespace CodeWalker.GameFiles } - public MUnk_1535046754() { } - public MUnk_1535046754(Meta meta, Unk_1535046754 data, MUnk_3538495220 owner, int index) + public MCPVDrawblData() { } + public MCPVDrawblData(Meta meta, CPVDrawblData data, MCPVComponentData owner, int index) { _Data = data; Owner = owner; DrawableIndex = index; - TexData = MetaTypes.ConvertDataArray(meta, (MetaName)1036962405, _Data.aTexData); + TexData = MetaTypes.ConvertDataArray(meta, MetaName.CPVTextureData, _Data.aTexData); } @@ -6327,7 +6327,7 @@ namespace CodeWalker.GameFiles } } - [TC(typeof(EXP))] public struct Unk_1036962405 //3 bytes, Key:4272717794 //COMPONENT PEDS (cloth?) aTexData + [TC(typeof(EXP))] public struct CPVTextureData //3 bytes, Key:4272717794 //COMPONENT PEDS (cloth?) aTexData { public byte texId { get; set; } //0 0: UnsignedByte: 0: texId public byte distribution { get; set; } //1 1: UnsignedByte: 0: distribution//914976023 @@ -6349,11 +6349,11 @@ namespace CodeWalker.GameFiles [TC(typeof(EXP))] public struct CPedSelectionSet //48 bytes, Key:3120284999 //COMPONENT PEDS { public MetaHash name { get; set; } //0 0: Hash: 0: name - public ArrayOfBytes12 Unk_173599222 { get; set; } //4 4: ArrayOfBytes: 12: 173599222 - public ArrayOfBytes12 Unk_2991454271 { get; set; } //16 16: ArrayOfBytes: 12: 2991454271 - public ArrayOfBytes6 Unk_3598106198 { get; set; } //28 28: ArrayOfBytes: 6: 3598106198 - public ArrayOfBytes6 Unk_2095974912 { get; set; } //34 34: ArrayOfBytes: 6: 2095974912 - public ArrayOfBytes6 Unk_672172037 { get; set; } //40 40: ArrayOfBytes: 6: 672172037 + public ArrayOfBytes12 compDrawableId { get; set; } //4 4: ArrayOfBytes: 12: compDrawableId + public ArrayOfBytes12 compTexId { get; set; } //16 16: ArrayOfBytes: 12: compTexId + public ArrayOfBytes6 propAnchorId { get; set; } //28 28: ArrayOfBytes: 6: propAnchorId + public ArrayOfBytes6 propDrawableId { get; set; } //34 34: ArrayOfBytes: 6: propDrawableId + public ArrayOfBytes6 propTexId { get; set; } //40 40: ArrayOfBytes: 6: propTexId public ushort Unused0 { get; set; }//46 } [TC(typeof(EXP))] public class MCPedSelectionSet : MetaWrapper @@ -6431,7 +6431,7 @@ namespace CodeWalker.GameFiles public override string ToString() { - return (ComponentType < 12) ? MUnk_3538495220.ComponentTypeNames[ComponentType] + "_" + ComponentIndex.ToString("000") : base.ToString(); + return (ComponentType < 12) ? MCPVComponentData.ComponentTypeNames[ComponentType] + "_" + ComponentIndex.ToString("000") : base.ToString(); } } diff --git a/CodeWalker.Core/GameFiles/MetaTypes/PsoTypes.cs b/CodeWalker.Core/GameFiles/MetaTypes/PsoTypes.cs index 156daa7..42249bb 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/PsoTypes.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/PsoTypes.cs @@ -13217,8 +13217,8 @@ namespace CodeWalker.GameFiles new PsoStructureEntryInfo((MetaName)911147899, PsoDataType.Bool, 2, 0, 0), new PsoStructureEntryInfo((MetaName)315291935, PsoDataType.Bool, 3, 0, 0), new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.UByte, 0, 0, 0), - new PsoStructureEntryInfo((MetaName)2996560424, PsoDataType.Array, 4, 4, (MetaName)786436), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)3538495220), + new PsoStructureEntryInfo(MetaName.availComp, PsoDataType.Array, 4, 4, (MetaName)786436), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPVComponentData), new PsoStructureEntryInfo(MetaName.aComponentData3, PsoDataType.Array, 16, 0, (MetaName)6), new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPedSelectionSet), new PsoStructureEntryInfo(MetaName.aSelectionSets, PsoDataType.Array, 32, 0, (MetaName)8), @@ -13235,17 +13235,17 @@ namespace CodeWalker.GameFiles new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CAnchorProps), new PsoStructureEntryInfo(MetaName.aAnchors, PsoDataType.Array, 24, 0, (MetaName)3) ); - case (MetaName)3538495220: - return new PsoStructureInfo((MetaName)3538495220, 0, 0, 24, + case MetaName.CPVComponentData: + return new PsoStructureInfo(MetaName.CPVComponentData, 0, 0, 24, new PsoStructureEntryInfo(MetaName.numAvailTex, PsoDataType.UByte, 0, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1535046754), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPVDrawblData), new PsoStructureEntryInfo(MetaName.aDrawblData3, PsoDataType.Array, 8, 0, (MetaName)1) ); - case (MetaName)1535046754: - return new PsoStructureInfo((MetaName)1535046754, 0, 0, 48, + case MetaName.CPVDrawblData: + return new PsoStructureInfo(MetaName.CPVDrawblData, 0, 0, 48, new PsoStructureEntryInfo(MetaName.propMask, PsoDataType.UByte, 0, 0, 0), new PsoStructureEntryInfo(MetaName.numAlternatives, PsoDataType.UByte, 1, 0, 0), - new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, (MetaName)1036962405), + new PsoStructureEntryInfo((MetaName)MetaTypeName.ARRAYINFO, PsoDataType.Structure, 0, 0, MetaName.CPVTextureData), new PsoStructureEntryInfo(MetaName.aTexData, PsoDataType.Array, 8, 0, (MetaName)2), new PsoStructureEntryInfo(MetaName.clothData, PsoDataType.Structure, 24, 0, (MetaName)2236980467) ); @@ -13253,8 +13253,8 @@ namespace CodeWalker.GameFiles return new PsoStructureInfo((MetaName)2236980467, 0, 0, 24, new PsoStructureEntryInfo(MetaName.ownsCloth, PsoDataType.Bool, 0, 0, 0) ); - case (MetaName)1036962405: - return new PsoStructureInfo((MetaName)1036962405, 0, 0, 3, + case MetaName.CPVTextureData: + return new PsoStructureInfo(MetaName.CPVTextureData, 0, 0, 3, new PsoStructureEntryInfo(MetaName.texId, PsoDataType.UByte, 0, 0, 0), new PsoStructureEntryInfo(MetaName.distribution, PsoDataType.UByte, 1, 0, 0) ); diff --git a/Peds/PedsForm.cs b/Peds/PedsForm.cs index ae1759b..929a311 100644 --- a/Peds/PedsForm.cs +++ b/Peds/PedsForm.cs @@ -102,10 +102,10 @@ namespace CodeWalker.Peds ComboBox[] ComponentComboBoxes = null; public class ComponentComboItem { - public MUnk_1535046754 DrawableData { get; set; } + public MCPVDrawblData DrawableData { get; set; } public int AlternativeIndex { get; set; } public int TextureIndex { get; set; } - public ComponentComboItem(MUnk_1535046754 drawableData, int altIndex = 0, int textureIndex = -1) + public ComponentComboItem(MCPVDrawblData drawableData, int altIndex = 0, int textureIndex = -1) { DrawableData = drawableData; AlternativeIndex = altIndex; @@ -861,7 +861,7 @@ namespace CodeWalker.Peds c.Items.Add(""); c.Text = string.Empty; } - private void PopulateCompCombo(ComboBox c, MUnk_3538495220 compData) + private void PopulateCompCombo(ComboBox c, MCPVComponentData compData) { if (compData?.DrawblData3 == null) return; foreach (var item in compData.DrawblData3) diff --git a/Vehicles/VehicleForm.Designer.cs b/Vehicles/VehicleForm.Designer.cs index 6a5273a..43a42e0 100644 --- a/Vehicles/VehicleForm.Designer.cs +++ b/Vehicles/VehicleForm.Designer.cs @@ -38,6 +38,13 @@ this.ToolsPanel = new System.Windows.Forms.Panel(); this.ToolsTabControl = new System.Windows.Forms.TabControl(); this.ToolsVehicleTabPage = new System.Windows.Forms.TabPage(); + this.ConvRoofPanel = new System.Windows.Forms.Panel(); + this.ConvRoofNameLabel = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.ConvRoofDictNameLabel = new System.Windows.Forms.Label(); + this.label7 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.ConvRoofButton = new System.Windows.Forms.Button(); this.VehicleHighDetailCheckBox = new System.Windows.Forms.CheckBox(); this.VehicleNameLabel = new System.Windows.Forms.Label(); this.VehicleMakeLabel = new System.Windows.Forms.Label(); @@ -83,24 +90,17 @@ this.ToolsPanelShowButton = new System.Windows.Forms.Button(); this.ConsolePanel = new System.Windows.Forms.Panel(); this.ConsoleTextBox = new CodeWalker.WinForms.TextBoxFix(); - this.ConvRoofPanel = new System.Windows.Forms.Panel(); - this.ConvRoofButton = new System.Windows.Forms.Button(); - this.label6 = new System.Windows.Forms.Label(); - this.label7 = new System.Windows.Forms.Label(); - this.ConvRoofDictNameLabel = new System.Windows.Forms.Label(); - this.label8 = new System.Windows.Forms.Label(); - this.ConvRoofNameLabel = new System.Windows.Forms.Label(); this.StatusStrip.SuspendLayout(); this.ToolsPanel.SuspendLayout(); this.ToolsTabControl.SuspendLayout(); this.ToolsVehicleTabPage.SuspendLayout(); + this.ConvRoofPanel.SuspendLayout(); this.ToolsModelsTabPage.SuspendLayout(); this.ToolsTexturesTabPage.SuspendLayout(); this.ToolsDetailsTabPage.SuspendLayout(); this.ToolsOptionsTabPage.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.TimeOfDayTrackBar)).BeginInit(); this.ConsolePanel.SuspendLayout(); - this.ConvRoofPanel.SuspendLayout(); this.SuspendLayout(); // // StatusStrip @@ -192,6 +192,77 @@ this.ToolsVehicleTabPage.Text = "Vehicle"; this.ToolsVehicleTabPage.UseVisualStyleBackColor = true; // + // ConvRoofPanel + // + this.ConvRoofPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.ConvRoofPanel.Controls.Add(this.ConvRoofNameLabel); + this.ConvRoofPanel.Controls.Add(this.label8); + this.ConvRoofPanel.Controls.Add(this.ConvRoofDictNameLabel); + this.ConvRoofPanel.Controls.Add(this.label7); + this.ConvRoofPanel.Controls.Add(this.label6); + this.ConvRoofPanel.Controls.Add(this.ConvRoofButton); + this.ConvRoofPanel.Location = new System.Drawing.Point(3, 164); + this.ConvRoofPanel.Name = "ConvRoofPanel"; + this.ConvRoofPanel.Size = new System.Drawing.Size(233, 89); + this.ConvRoofPanel.TabIndex = 7; + this.ConvRoofPanel.Visible = false; + // + // ConvRoofNameLabel + // + this.ConvRoofNameLabel.AutoSize = true; + this.ConvRoofNameLabel.Location = new System.Drawing.Point(40, 41); + this.ConvRoofNameLabel.Name = "ConvRoofNameLabel"; + this.ConvRoofNameLabel.Size = new System.Drawing.Size(105, 13); + this.ConvRoofNameLabel.TabIndex = 5; + this.ConvRoofNameLabel.Text = "animConvRoofName"; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(10, 41); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(27, 13); + this.label8.TabIndex = 4; + this.label8.Text = "Clip:"; + // + // ConvRoofDictNameLabel + // + this.ConvRoofDictNameLabel.AutoSize = true; + this.ConvRoofDictNameLabel.Location = new System.Drawing.Point(60, 21); + this.ConvRoofDictNameLabel.Name = "ConvRoofDictNameLabel"; + this.ConvRoofDictNameLabel.Size = new System.Drawing.Size(124, 13); + this.ConvRoofDictNameLabel.TabIndex = 3; + this.ConvRoofDictNameLabel.Text = "animConvRoofDictName"; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(10, 21); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(47, 13); + this.label7.TabIndex = 2; + this.label7.Text = "Clip dict:"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(4, 4); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(86, 13); + this.label6.TabIndex = 1; + this.label6.Text = "Convertible Roof"; + // + // ConvRoofButton + // + this.ConvRoofButton.Location = new System.Drawing.Point(13, 63); + this.ConvRoofButton.Name = "ConvRoofButton"; + this.ConvRoofButton.Size = new System.Drawing.Size(75, 23); + this.ConvRoofButton.TabIndex = 0; + this.ConvRoofButton.Text = "Play"; + this.ConvRoofButton.UseVisualStyleBackColor = true; + this.ConvRoofButton.Click += new System.EventHandler(this.ConvRoofButton_Click); + // // VehicleHighDetailCheckBox // this.VehicleHighDetailCheckBox.AutoSize = true; @@ -733,75 +804,6 @@ this.ConsoleTextBox.Size = new System.Drawing.Size(695, 95); this.ConsoleTextBox.TabIndex = 0; // - // ConvRoofPanel - // - this.ConvRoofPanel.Controls.Add(this.ConvRoofNameLabel); - this.ConvRoofPanel.Controls.Add(this.label8); - this.ConvRoofPanel.Controls.Add(this.ConvRoofDictNameLabel); - this.ConvRoofPanel.Controls.Add(this.label7); - this.ConvRoofPanel.Controls.Add(this.label6); - this.ConvRoofPanel.Controls.Add(this.ConvRoofButton); - this.ConvRoofPanel.Location = new System.Drawing.Point(3, 164); - this.ConvRoofPanel.Name = "ConvRoofPanel"; - this.ConvRoofPanel.Size = new System.Drawing.Size(233, 89); - this.ConvRoofPanel.TabIndex = 7; - this.ConvRoofPanel.Visible = false; - // - // ConvRoofButton - // - this.ConvRoofButton.Location = new System.Drawing.Point(13, 63); - this.ConvRoofButton.Name = "ConvRoofButton"; - this.ConvRoofButton.Size = new System.Drawing.Size(75, 23); - this.ConvRoofButton.TabIndex = 0; - this.ConvRoofButton.Text = "Play"; - this.ConvRoofButton.UseVisualStyleBackColor = true; - this.ConvRoofButton.Click += new System.EventHandler(this.ConvRoofButton_Click); - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(4, 4); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(86, 13); - this.label6.TabIndex = 1; - this.label6.Text = "Convertible Roof"; - // - // label7 - // - this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(10, 21); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(47, 13); - this.label7.TabIndex = 2; - this.label7.Text = "Clip dict:"; - // - // ConvRoofDictNameLabel - // - this.ConvRoofDictNameLabel.AutoSize = true; - this.ConvRoofDictNameLabel.Location = new System.Drawing.Point(60, 21); - this.ConvRoofDictNameLabel.Name = "ConvRoofDictNameLabel"; - this.ConvRoofDictNameLabel.Size = new System.Drawing.Size(124, 13); - this.ConvRoofDictNameLabel.TabIndex = 3; - this.ConvRoofDictNameLabel.Text = "animConvRoofDictName"; - // - // label8 - // - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(10, 41); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(27, 13); - this.label8.TabIndex = 4; - this.label8.Text = "Clip:"; - // - // ConvRoofNameLabel - // - this.ConvRoofNameLabel.AutoSize = true; - this.ConvRoofNameLabel.Location = new System.Drawing.Point(40, 41); - this.ConvRoofNameLabel.Name = "ConvRoofNameLabel"; - this.ConvRoofNameLabel.Size = new System.Drawing.Size(105, 13); - this.ConvRoofNameLabel.TabIndex = 5; - this.ConvRoofNameLabel.Text = "animConvRoofName"; - // // VehicleForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -829,6 +831,8 @@ this.ToolsTabControl.ResumeLayout(false); this.ToolsVehicleTabPage.ResumeLayout(false); this.ToolsVehicleTabPage.PerformLayout(); + this.ConvRoofPanel.ResumeLayout(false); + this.ConvRoofPanel.PerformLayout(); this.ToolsModelsTabPage.ResumeLayout(false); this.ToolsTexturesTabPage.ResumeLayout(false); this.ToolsDetailsTabPage.ResumeLayout(false); @@ -837,8 +841,6 @@ ((System.ComponentModel.ISupportInitialize)(this.TimeOfDayTrackBar)).EndInit(); this.ConsolePanel.ResumeLayout(false); this.ConsolePanel.PerformLayout(); - this.ConvRoofPanel.ResumeLayout(false); - this.ConvRoofPanel.PerformLayout(); this.ResumeLayout(false); this.PerformLayout();