From e7423c55dbcd52104c103aba3e6490cda22ab283 Mon Sep 17 00:00:00 2001 From: dexy Date: Sun, 26 Jan 2020 06:31:28 +1100 Subject: [PATCH] Particles file clean up and types research --- .../GameFiles/Resources/Particle.cs | 4758 ++++++++++------- 1 file changed, 2765 insertions(+), 1993 deletions(-) diff --git a/CodeWalker.Core/GameFiles/Resources/Particle.cs b/CodeWalker.Core/GameFiles/Resources/Particle.cs index 3ca47b8..fa55a40 100644 --- a/CodeWalker.Core/GameFiles/Resources/Particle.cs +++ b/CodeWalker.Core/GameFiles/Resources/Particle.cs @@ -40,27 +40,23 @@ using EXP = System.ComponentModel.ExpandableObjectConverter; namespace CodeWalker.GameFiles { - // pgBase - // ptxFxList [TC(typeof(EXP))] public class ParticleEffectsList : ResourceFileBase { + // pgBase + // ptxFxList public override long BlockLength => 0x60; // structure data public ulong NamePointer { get; set; } - public uint Unknown_18h { get; set; } // 0x00000000 - public uint Unknown_1Ch { get; set; } // 0x00000000 + public ulong Unknown_18h; // 0x0000000000000000 public ulong TextureDictionaryPointer { get; set; } - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 + public ulong Unknown_28h; // 0x0000000000000000 public ulong DrawableDictionaryPointer { get; set; } public ulong ParticleRuleDictionaryPointer { get; set; } - public uint Unknown_40h { get; set; } // 0x00000000 - public uint Unknown_44h { get; set; } // 0x00000000 + public ulong Unknown_40h; // 0x0000000000000000 public ulong EmitterRuleDictionaryPointer { get; set; } public ulong EffectRuleDictionaryPointer { get; set; } - public uint Unknown_58h { get; set; } // 0x00000000 - public uint Unknown_5Ch { get; set; } // 0x00000000 + public ulong Unknown_58h; // 0x0000000000000000 // reference data public string_r Name { get; set; } @@ -77,39 +73,35 @@ namespace CodeWalker.GameFiles // read structure data this.NamePointer = reader.ReadUInt64(); - this.Unknown_18h = reader.ReadUInt32(); - this.Unknown_1Ch = reader.ReadUInt32(); + this.Unknown_18h = reader.ReadUInt64(); this.TextureDictionaryPointer = reader.ReadUInt64(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); + this.Unknown_28h = reader.ReadUInt64(); this.DrawableDictionaryPointer = reader.ReadUInt64(); this.ParticleRuleDictionaryPointer = reader.ReadUInt64(); - this.Unknown_40h = reader.ReadUInt32(); - this.Unknown_44h = reader.ReadUInt32(); + this.Unknown_40h = reader.ReadUInt64(); this.EmitterRuleDictionaryPointer = reader.ReadUInt64(); this.EffectRuleDictionaryPointer = reader.ReadUInt64(); - this.Unknown_58h = reader.ReadUInt32(); - this.Unknown_5Ch = reader.ReadUInt32(); + this.Unknown_58h = reader.ReadUInt64(); // read reference data - this.Name = reader.ReadBlockAt( - this.NamePointer // offset - ); - this.TextureDictionary = reader.ReadBlockAt( - this.TextureDictionaryPointer // offset - ); - this.DrawableDictionary = reader.ReadBlockAt( - this.DrawableDictionaryPointer // offset - ); - this.ParticleRuleDictionary = reader.ReadBlockAt( - this.ParticleRuleDictionaryPointer // offset - ); - this.EffectRuleDictionary = reader.ReadBlockAt( - this.EmitterRuleDictionaryPointer // offset - ); - this.EmitterRuleDictionary = reader.ReadBlockAt( - this.EffectRuleDictionaryPointer // offset - ); + this.Name = reader.ReadBlockAt(this.NamePointer); + this.TextureDictionary = reader.ReadBlockAt(this.TextureDictionaryPointer); + this.DrawableDictionary = reader.ReadBlockAt(this.DrawableDictionaryPointer); + this.ParticleRuleDictionary = reader.ReadBlockAt(this.ParticleRuleDictionaryPointer); + this.EffectRuleDictionary = reader.ReadBlockAt(this.EmitterRuleDictionaryPointer); + this.EmitterRuleDictionary = reader.ReadBlockAt(this.EffectRuleDictionaryPointer); + + + + if (Unknown_18h != 0) + { } + if (Unknown_28h != 0) + { } + if (Unknown_40h != 0) + { } + if (Unknown_58h != 0) + { } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { @@ -126,18 +118,14 @@ namespace CodeWalker.GameFiles // write structure data writer.Write(this.NamePointer); writer.Write(this.Unknown_18h); - writer.Write(this.Unknown_1Ch); writer.Write(this.TextureDictionaryPointer); writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); writer.Write(this.DrawableDictionaryPointer); writer.Write(this.ParticleRuleDictionaryPointer); writer.Write(this.Unknown_40h); - writer.Write(this.Unknown_44h); writer.Write(this.EmitterRuleDictionaryPointer); writer.Write(this.EffectRuleDictionaryPointer); writer.Write(this.Unknown_58h); - writer.Write(this.Unknown_5Ch); } public void WriteXml(StringBuilder sb, int indent, string ddsfolder) { @@ -176,60 +164,51 @@ namespace CodeWalker.GameFiles } - - - - // pgBase - // pgDictionaryBase - // pgDictionary [TC(typeof(EXP))] public class ParticleRuleDictionary : ResourceSystemBlock { + // pgBase + // pgDictionaryBase + // pgDictionary public override long BlockLength => 0x40; // structure data - public uint VFT { get; set; } - public uint Unknown_4h { get; set; } // 0x00000001 - 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; } // 0x00000001 - public uint Unknown_1Ch { get; set; } // 0x00000000 + public MetaHash VFT { get; set; } + public uint Unknown_4h = 1; // 0x00000001 + public ulong Unknown_8h; // 0x0000000000000000 + public ulong Unknown_10h; // 0x0000000000000000 + public ulong Unknown_18h = 1; // 0x0000000000000001 public ResourceSimpleList64 ParticleRuleNameHashes { get; set; } public ResourcePointerList64 ParticleRules { get; set; } - /// - /// Reads the data-block from a stream. - /// + public override void Read(ResourceDataReader reader, params object[] parameters) { // read structure data this.VFT = reader.ReadUInt32(); this.Unknown_4h = reader.ReadUInt32(); - this.Unknown_8h = reader.ReadUInt32(); - this.Unknown_Ch = reader.ReadUInt32(); - this.Unknown_10h = reader.ReadUInt32(); - this.Unknown_14h = reader.ReadUInt32(); - this.Unknown_18h = reader.ReadUInt32(); - this.Unknown_1Ch = reader.ReadUInt32(); + this.Unknown_8h = reader.ReadUInt64(); + this.Unknown_10h = reader.ReadUInt64(); + this.Unknown_18h = reader.ReadUInt64(); this.ParticleRuleNameHashes = reader.ReadBlock>(); this.ParticleRules = reader.ReadBlock>(); - } - /// - /// Writes the data-block to a stream. - /// + if (Unknown_4h != 1) + { } + if (Unknown_8h != 0) + { } + if (Unknown_10h != 0) + { } + if (Unknown_18h != 1) + { } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { // write structure data writer.Write(this.VFT); writer.Write(this.Unknown_4h); writer.Write(this.Unknown_8h); - writer.Write(this.Unknown_Ch); writer.Write(this.Unknown_10h); - writer.Write(this.Unknown_14h); writer.Write(this.Unknown_18h); - writer.Write(this.Unknown_1Ch); writer.WriteBlock(this.ParticleRuleNameHashes); writer.WriteBlock(this.ParticleRules); } @@ -244,25 +223,19 @@ namespace CodeWalker.GameFiles } - - - - // pgBase - // pgDictionaryBase - // pgDictionary [TC(typeof(EXP))] public class ParticleEffectRuleDictionary : ResourceSystemBlock { + // pgBase + // pgDictionaryBase + // pgDictionary public override long BlockLength => 0x40; // structure data - public uint VFT { get; set; } - public uint Unknown_4h { get; set; } // 0x00000001 - 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; } // 0x00000001 - public uint Unknown_1Ch { get; set; } // 0x00000000 + public MetaHash VFT { get; set; } + public uint Unknown_4h = 1; // 0x00000001 + public ulong Unknown_8h; // 0x0000000000000000 + public ulong Unknown_10h; // 0x0000000000000000 + public ulong Unknown_18h = 1; // 0x0000000000000001 public ResourceSimpleList64 EffectRuleNameHashes { get; set; } public ResourcePointerList64 EffectRules { get; set; } @@ -271,27 +244,29 @@ namespace CodeWalker.GameFiles // read structure data this.VFT = reader.ReadUInt32(); this.Unknown_4h = reader.ReadUInt32(); - this.Unknown_8h = reader.ReadUInt32(); - this.Unknown_Ch = reader.ReadUInt32(); - this.Unknown_10h = reader.ReadUInt32(); - this.Unknown_14h = reader.ReadUInt32(); - this.Unknown_18h = reader.ReadUInt32(); - this.Unknown_1Ch = reader.ReadUInt32(); + this.Unknown_8h = reader.ReadUInt64(); + this.Unknown_10h = reader.ReadUInt64(); + this.Unknown_18h = reader.ReadUInt64(); this.EffectRuleNameHashes = reader.ReadBlock>(); this.EffectRules = reader.ReadBlock>(); - } + if (Unknown_4h != 1) + { } + if (Unknown_8h != 0) + { } + if (Unknown_10h != 0) + { } + if (Unknown_18h != 1) + { } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { // write structure data writer.Write(this.VFT); writer.Write(this.Unknown_4h); writer.Write(this.Unknown_8h); - writer.Write(this.Unknown_Ch); writer.Write(this.Unknown_10h); - writer.Write(this.Unknown_14h); writer.Write(this.Unknown_18h); - writer.Write(this.Unknown_1Ch); writer.WriteBlock(this.EffectRuleNameHashes); writer.WriteBlock(this.EffectRules); } @@ -306,33 +281,27 @@ namespace CodeWalker.GameFiles } - - - - // pgBase - // pgDictionaryBase - // pgDictionary [TC(typeof(EXP))] public class ParticleEmitterRuleDictionary : ResourceSystemBlock { + // pgBase + // pgDictionaryBase + // pgDictionary public override long BlockLength => 0x40; // structure data - public uint VFT { get; set; } - public uint Unknown_4h { get; set; } // 0x00000001 - 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; } // 0x00000001 - public uint Unknown_1Ch { get; set; } // 0x00000000 + public MetaHash VFT { get; set; } + public uint Unknown_4h = 1; // 0x00000001 + public ulong Unknown_8h; // 0x0000000000000000 + public ulong Unknown_10h; // 0x0000000000000000 + public ulong Unknown_18h = 1; // 0x0000000000000001 public ulong HashesPointer { get; set; } public ushort HashesCount1 { get; set; } public ushort HashesCount2 { get; set; } - public uint Unknown_2Ch { get; set; } // 0x00000000 + public uint Unknown_2Ch; // 0x00000000 public ulong EffectRulesPointer { get; set; } public ushort EffectRulesCount1 { get; set; } public ushort EffectRulesCount2 { get; set; } - public uint Unknown_3Ch { get; set; } // 0x00000000 + public uint Unknown_3Ch; // 0x00000000 // reference data public ResourceSimpleArray Hashes { get; set; } @@ -343,12 +312,9 @@ namespace CodeWalker.GameFiles // read structure data this.VFT = reader.ReadUInt32(); this.Unknown_4h = reader.ReadUInt32(); - this.Unknown_8h = reader.ReadUInt32(); - this.Unknown_Ch = reader.ReadUInt32(); - this.Unknown_10h = reader.ReadUInt32(); - this.Unknown_14h = reader.ReadUInt32(); - this.Unknown_18h = reader.ReadUInt32(); - this.Unknown_1Ch = reader.ReadUInt32(); + this.Unknown_8h = reader.ReadUInt64(); + this.Unknown_10h = reader.ReadUInt64(); + this.Unknown_18h = reader.ReadUInt64(); this.HashesPointer = reader.ReadUInt64(); this.HashesCount1 = reader.ReadUInt16(); this.HashesCount2 = reader.ReadUInt16(); @@ -359,16 +325,22 @@ namespace CodeWalker.GameFiles this.Unknown_3Ch = reader.ReadUInt32(); // read reference data - this.Hashes = reader.ReadBlockAt>( - this.HashesPointer, // offset - this.HashesCount1 - ); - this.EmitterRules = reader.ReadBlockAt>( - this.EffectRulesPointer, // offset - this.EffectRulesCount1 - ); - } + this.Hashes = reader.ReadBlockAt>(this.HashesPointer, this.HashesCount1); + this.EmitterRules = reader.ReadBlockAt>(this.EffectRulesPointer, this.EffectRulesCount1); + if (Unknown_4h != 1) + { } + if (Unknown_8h != 0) + { } + if (Unknown_10h != 0) + { } + if (Unknown_18h != 1) + { } + if (Unknown_2Ch != 0) + { } + if (Unknown_3Ch != 0) + { } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { // update structure data @@ -383,11 +355,8 @@ namespace CodeWalker.GameFiles writer.Write(this.VFT); writer.Write(this.Unknown_4h); writer.Write(this.Unknown_8h); - writer.Write(this.Unknown_Ch); writer.Write(this.Unknown_10h); - writer.Write(this.Unknown_14h); writer.Write(this.Unknown_18h); - writer.Write(this.Unknown_1Ch); writer.Write(this.HashesPointer); writer.Write(this.HashesCount1); writer.Write(this.HashesCount2); @@ -408,102 +377,84 @@ namespace CodeWalker.GameFiles } - - - - - - - // pgBase - // pgBaseRefCounted - // ptxParticleRule [TC(typeof(EXP))] public class ParticleRule : ResourceSystemBlock { + // pgBase + // pgBaseRefCounted + // ptxParticleRule public override long BlockLength => 0x240; // structure data - public uint VFT { get; set; } - public uint Unknown_4h { get; set; } // 0x00000001 - public uint Unknown_8h { get; set; } // 0x00000000 - public uint Unknown_Ch { get; set; } // 0x00000000 - public uint Unknown_10h { get; set; } - public uint Unknown_14h { get; set; } // 0x00000000 - public uint Unknown_18h { get; set; } // 0x00000000 - public uint Unknown_1Ch { get; set; } // 0x00000000 - public ParticleEffectSpawner emb1 { get; set; } - public ParticleEffectSpawner emb2 { get; set; } - public uint Unknown_100h { get; set; } - public uint Unknown_104h { get; set; } - public uint Unknown_108h { get; set; } - public uint Unknown_10Ch { get; set; } - public uint Unknown_110h { get; set; } // 0x00000000 - public uint Unknown_114h { get; set; } - public uint Unknown_118h { get; set; } - public uint Unknown_11Ch { get; set; } + public MetaHash VFT { get; set; } + public uint Unknown_4h = 1; // 0x00000001 + public ulong Unknown_8h; // 0x0000000000000000 + public MetaHash Unknown_10h { get; set; } + public uint Unknown_14h; //0x00000000 + public ulong Unknown_18h; // 0x0000000000000000 + public ParticleEffectSpawner Spawner1 { get; set; } + public ParticleEffectSpawner Spawner2 { get; set; } + public MetaHash Unknown_100h { get; set; } + public MetaHash Unknown_104h { get; set; } + public MetaHash Unknown_108h { get; set; } + public MetaHash Unknown_10Ch { get; set; } + public uint Unknown_110h; // 0x00000000 + public MetaHash Unknown_114h { get; set; } + public MetaHash Unknown_118h { get; set; } + public MetaHash Unknown_11Ch { get; set; } public ulong NamePointer { get; set; } - public ResourcePointerList64 Unknown_128h { get; set; } - public ResourcePointerList64 Unknown_138h { get; set; } - public ResourcePointerList64 Unknown_148h { get; set; } - public ResourcePointerList64 Unknown_158h { get; set; } - public ResourcePointerList64 Unknown_168h { get; set; } - public uint Unknown_178h { get; set; } // 0x00000000 - public uint Unknown_17Ch { get; set; } // 0x00000000 - public uint Unknown_180h { get; set; } // 0x00000000 - public uint Unknown_184h { get; set; } // 0x00000000 - public ResourceSimpleList64 Unknown_188h { get; set; } - public uint Unknown_198h { get; set; } // 0x00000000 - public uint Unknown_19Ch { get; set; } // 0x00000000 - public uint Unknown_1A0h { get; set; } // 0x00000000 - public uint Unknown_1A4h { get; set; } // 0x00000000 - public uint Unknown_1A8h { get; set; } // 0x00000000 - public uint Unknown_1ACh { get; set; } // 0x00000000 - public uint VFTx3 { get; set; } - public uint Unknown_1B4h { get; set; } // 0x00000001 - public ulong p9 { get; set; } - public ulong p10 { get; set; } - public uint Unknown_1C8h { get; set; } // 0x00000000 - public uint Unknown_1CCh { get; set; } // 0x00000000 - public uint Unknown_1D0h { get; set; } - public uint Unknown_1D4h { get; set; } // 0x00000000 - public uint VFTx4 { get; set; } - public uint Unknown_1DCh { get; set; } // 0x00000001 - public uint Unknown_1E0h { get; set; } - public uint Unknown_1E4h { get; set; } - public uint Unknown_1E8h { get; set; } - public uint Unknown_1ECh { get; set; } + public ResourcePointerList64 BehaviourList1 { get; set; } + public ResourcePointerList64 BehaviourList2 { get; set; } + public ResourcePointerList64 BehaviourList3 { get; set; } + public ResourcePointerList64 BehaviourList4 { get; set; } + public ResourcePointerList64 BehaviourList5 { get; set; } + public ulong Unknown_178h; // 0x0000000000000000 + public ulong Unknown_180h; // 0x0000000000000000 + public ResourceSimpleList64 UnknownList1 { get; set; } + public ulong Unknown_198h; // 0x0000000000000000 + public ulong Unknown_1A0h; // 0x0000000000000000 + public ulong Unknown_1A8h; // 0x0000000000000000 + public MetaHash VFTx3 { get; set; } + public uint Unknown_1B4h = 1; // 0x00000001 + public ulong String1Pointer { get; set; } + public ulong String2Pointer { get; set; } + public ulong Unknown_1C8h; // 0x0000000000000000 + public MetaHash Unknown_1D0h { get; set; } + public uint Unknown_1D4h; // 0x00000000 + public MetaHash VFTx4 { get; set; } + public uint Unknown_1DCh = 1; // 0x00000001 + public MetaHash Unknown_1E0h { get; set; } + public MetaHash Unknown_1E4h { get; set; } + public MetaHash Unknown_1E8h { get; set; } + public MetaHash Unknown_1ECh { get; set; } public ResourcePointerList64 ShaderVars { get; set; } - public uint Unknown_200h { get; set; } // 0x00000001 - public uint Unknown_204h { get; set; } // 0x00000000 - public uint Unknown_208h { get; set; } - public uint Unknown_20Ch { get; set; } // 0x00000000 - public ResourceSimpleList64 Unknown_210h { get; set; } - public uint Unknown_220h { get; set; } - public uint Unknown_224h { get; set; } // 0x00000000 - public uint Unknown_228h { get; set; } // 0x00000000 - public uint Unknown_22Ch { get; set; } // 0x00000000 - public uint Unknown_230h { get; set; } // 0x00000000 - public uint Unknown_234h { get; set; } // 0x00000000 - public uint Unknown_238h { get; set; } // 0x00000000 - public uint Unknown_23Ch { get; set; } // 0x00000000 + public ulong Unknown_200h = 1; // 0x0000000000000001 + public MetaHash Unknown_208h { get; set; } + public uint Unknown_20Ch; // 0x00000000 + public ResourceSimpleList64 UnknownList2 { get; set; } + public MetaHash Unknown_220h { get; set; } + public uint Unknown_224h; // 0x00000000 + public ulong Unknown_228h; // 0x0000000000000000 + public ulong Unknown_230h; // 0x0000000000000000 + public ulong Unknown_238h; // 0x0000000000000000 // reference data public string_r Name { get; set; } - public string_r p9data { get; set; } - public string_r p10data { get; set; } + public string_r String1 { get; set; } + public string_r String2 { get; set; } public override void Read(ResourceDataReader reader, params object[] parameters) { + #region read data + // read structure data this.VFT = reader.ReadUInt32(); this.Unknown_4h = reader.ReadUInt32(); - this.Unknown_8h = reader.ReadUInt32(); - this.Unknown_Ch = reader.ReadUInt32(); + this.Unknown_8h = reader.ReadUInt64(); this.Unknown_10h = reader.ReadUInt32(); this.Unknown_14h = reader.ReadUInt32(); - this.Unknown_18h = reader.ReadUInt32(); - this.Unknown_1Ch = reader.ReadUInt32(); - this.emb1 = reader.ReadBlock(); - this.emb2 = reader.ReadBlock(); + this.Unknown_18h = reader.ReadUInt64(); + this.Spawner1 = reader.ReadBlock(); + this.Spawner2 = reader.ReadBlock(); this.Unknown_100h = reader.ReadUInt32(); this.Unknown_104h = reader.ReadUInt32(); this.Unknown_108h = reader.ReadUInt32(); @@ -513,28 +464,22 @@ namespace CodeWalker.GameFiles this.Unknown_118h = reader.ReadUInt32(); this.Unknown_11Ch = reader.ReadUInt32(); this.NamePointer = reader.ReadUInt64(); - this.Unknown_128h = reader.ReadBlock>(); - this.Unknown_138h = reader.ReadBlock>(); - this.Unknown_148h = reader.ReadBlock>(); - this.Unknown_158h = reader.ReadBlock>(); - this.Unknown_168h = reader.ReadBlock>(); - this.Unknown_178h = reader.ReadUInt32(); - this.Unknown_17Ch = reader.ReadUInt32(); - this.Unknown_180h = reader.ReadUInt32(); - this.Unknown_184h = reader.ReadUInt32(); - this.Unknown_188h = reader.ReadBlock>(); - this.Unknown_198h = reader.ReadUInt32(); - this.Unknown_19Ch = reader.ReadUInt32(); - this.Unknown_1A0h = reader.ReadUInt32(); - this.Unknown_1A4h = reader.ReadUInt32(); - this.Unknown_1A8h = reader.ReadUInt32(); - this.Unknown_1ACh = reader.ReadUInt32(); + this.BehaviourList1 = reader.ReadBlock>(); + this.BehaviourList2 = reader.ReadBlock>(); + this.BehaviourList3 = reader.ReadBlock>(); + this.BehaviourList4 = reader.ReadBlock>(); + this.BehaviourList5 = reader.ReadBlock>(); + this.Unknown_178h = reader.ReadUInt64(); + this.Unknown_180h = reader.ReadUInt64(); + this.UnknownList1 = reader.ReadBlock>(); + this.Unknown_198h = reader.ReadUInt64(); + this.Unknown_1A0h = reader.ReadUInt64(); + this.Unknown_1A8h = reader.ReadUInt64(); this.VFTx3 = reader.ReadUInt32(); this.Unknown_1B4h = reader.ReadUInt32(); - this.p9 = reader.ReadUInt64(); - this.p10 = reader.ReadUInt64(); - this.Unknown_1C8h = reader.ReadUInt32(); - this.Unknown_1CCh = reader.ReadUInt32(); + this.String1Pointer = reader.ReadUInt64(); + this.String2Pointer = reader.ReadUInt64(); + this.Unknown_1C8h = reader.ReadUInt64(); this.Unknown_1D0h = reader.ReadUInt32(); this.Unknown_1D4h = reader.ReadUInt32(); this.VFTx4 = reader.ReadUInt32(); @@ -544,50 +489,164 @@ namespace CodeWalker.GameFiles this.Unknown_1E8h = reader.ReadUInt32(); this.Unknown_1ECh = reader.ReadUInt32(); this.ShaderVars = reader.ReadBlock>(); - this.Unknown_200h = reader.ReadUInt32(); - this.Unknown_204h = reader.ReadUInt32(); + this.Unknown_200h = reader.ReadUInt64(); this.Unknown_208h = reader.ReadUInt32(); this.Unknown_20Ch = reader.ReadUInt32(); - this.Unknown_210h = reader.ReadBlock>(); + this.UnknownList2 = reader.ReadBlock>(); this.Unknown_220h = reader.ReadUInt32(); this.Unknown_224h = reader.ReadUInt32(); - this.Unknown_228h = reader.ReadUInt32(); - this.Unknown_22Ch = reader.ReadUInt32(); - this.Unknown_230h = reader.ReadUInt32(); - this.Unknown_234h = reader.ReadUInt32(); - this.Unknown_238h = reader.ReadUInt32(); - this.Unknown_23Ch = reader.ReadUInt32(); + this.Unknown_228h = reader.ReadUInt64(); + this.Unknown_230h = reader.ReadUInt64(); + this.Unknown_238h = reader.ReadUInt64(); // read reference data - this.Name = reader.ReadBlockAt( - this.NamePointer // offset - ); - this.p9data = reader.ReadBlockAt( - this.p9 // offset - ); - this.p10data = reader.ReadBlockAt( - this.p10 // offset - ); - } + this.Name = reader.ReadBlockAt(this.NamePointer); + this.String1 = reader.ReadBlockAt(this.String1Pointer); + this.String2 = reader.ReadBlockAt(this.String2Pointer); + #endregion + + + if (Unknown_4h != 1) + { } + if (Unknown_8h != 0) + { } + switch (Unknown_10h) + { + default: + break; + } + if (Unknown_14h != 0) + { } + if (Unknown_18h != 0) + { } + switch (Unknown_100h) + { + default: + break; + } + switch (Unknown_104h) + { + default: + break; + } + switch (Unknown_108h) + { + default: + break; + } + switch (Unknown_10Ch) + { + default: + break; + } + if (Unknown_110h != 0) + { } + switch (Unknown_114h) + { + default: + break; + } + switch (Unknown_118h) + { + default: + break; + } + switch (Unknown_11Ch) + { + default: + break; + } + if (Unknown_178h != 0) + { } + if (Unknown_180h != 0) + { } + if (Unknown_198h != 0) + { } + if (Unknown_1A0h != 0) + { } + if (Unknown_1A8h != 0) + { } + switch (VFTx3) + { + default: + break; + } + if (Unknown_1B4h != 1) + { } + if (Unknown_1C8h != 0) + { } + switch (Unknown_1D0h) + { + default: + break; + } + if (Unknown_1D4h != 0) + { } + switch (VFTx4) + { + default: + break; + } + if (Unknown_1DCh != 1) + { } + switch (Unknown_1E0h) + { + default: + break; + } + switch (Unknown_1E4h) + { + default: + break; + } + switch (Unknown_1E8h) + { + default: + break; + } + switch (Unknown_1ECh) + { + default: + break; + } + if (Unknown_200h != 1) + { } + if (Unknown_208h != 0) + { } + if (Unknown_20Ch != 0) + { } + switch (Unknown_220h) + { + default: + break; + } + if (Unknown_224h != 0) + { } + if (Unknown_228h != 0) + { } + if (Unknown_230h != 0) + { } + if (Unknown_238h != 0) + { } + + } public override void Write(ResourceDataWriter writer, params object[] parameters) { // update structure data this.NamePointer = (ulong)(this.Name != null ? this.Name.FilePosition : 0); - this.p9 = (ulong)(this.p9data != null ? this.p9data.FilePosition : 0); - this.p10 = (ulong)(this.p10data != null ? this.p10data.FilePosition : 0); + this.String1Pointer = (ulong)(this.String1 != null ? this.String1.FilePosition : 0); + this.String2Pointer = (ulong)(this.String2 != null ? this.String2.FilePosition : 0); // write structure data writer.Write(this.VFT); writer.Write(this.Unknown_4h); writer.Write(this.Unknown_8h); - writer.Write(this.Unknown_Ch); writer.Write(this.Unknown_10h); writer.Write(this.Unknown_14h); writer.Write(this.Unknown_18h); - writer.Write(this.Unknown_1Ch); - writer.WriteBlock(this.emb1); - writer.WriteBlock(this.emb2); + writer.WriteBlock(this.Spawner1); + writer.WriteBlock(this.Spawner2); writer.Write(this.Unknown_100h); writer.Write(this.Unknown_104h); writer.Write(this.Unknown_108h); @@ -597,28 +656,22 @@ namespace CodeWalker.GameFiles writer.Write(this.Unknown_118h); writer.Write(this.Unknown_11Ch); writer.Write(this.NamePointer); - writer.WriteBlock(this.Unknown_128h); - writer.WriteBlock(this.Unknown_138h); - writer.WriteBlock(this.Unknown_148h); - writer.WriteBlock(this.Unknown_158h); - writer.WriteBlock(this.Unknown_168h); + writer.WriteBlock(this.BehaviourList1); + writer.WriteBlock(this.BehaviourList2); + writer.WriteBlock(this.BehaviourList3); + writer.WriteBlock(this.BehaviourList4); + writer.WriteBlock(this.BehaviourList5); writer.Write(this.Unknown_178h); - writer.Write(this.Unknown_17Ch); writer.Write(this.Unknown_180h); - writer.Write(this.Unknown_184h); - writer.WriteBlock(this.Unknown_188h); + writer.WriteBlock(this.UnknownList1); writer.Write(this.Unknown_198h); - writer.Write(this.Unknown_19Ch); writer.Write(this.Unknown_1A0h); - writer.Write(this.Unknown_1A4h); writer.Write(this.Unknown_1A8h); - writer.Write(this.Unknown_1ACh); writer.Write(this.VFTx3); writer.Write(this.Unknown_1B4h); - writer.Write(this.p9); - writer.Write(this.p10); + writer.Write(this.String1Pointer); + writer.Write(this.String2Pointer); writer.Write(this.Unknown_1C8h); - writer.Write(this.Unknown_1CCh); writer.Write(this.Unknown_1D0h); writer.Write(this.Unknown_1D4h); writer.Write(this.VFTx4); @@ -629,144 +682,393 @@ namespace CodeWalker.GameFiles writer.Write(this.Unknown_1ECh); writer.WriteBlock(this.ShaderVars); writer.Write(this.Unknown_200h); - writer.Write(this.Unknown_204h); writer.Write(this.Unknown_208h); writer.Write(this.Unknown_20Ch); - writer.WriteBlock(this.Unknown_210h); + writer.WriteBlock(this.UnknownList2); writer.Write(this.Unknown_220h); writer.Write(this.Unknown_224h); writer.Write(this.Unknown_228h); - writer.Write(this.Unknown_22Ch); writer.Write(this.Unknown_230h); - writer.Write(this.Unknown_234h); writer.Write(this.Unknown_238h); - writer.Write(this.Unknown_23Ch); } public override IResourceBlock[] GetReferences() { var list = new List(); if (Name != null) list.Add(Name); - if (p9data != null) list.Add(p9data); - if (p10data != null) list.Add(p10data); + if (String1 != null) list.Add(String1); + if (String2 != null) list.Add(String2); return list.ToArray(); } public override Tuple[] GetParts() { return new Tuple[] { - new Tuple(88, emb1), - new Tuple(96, emb2), - new Tuple(0x128, Unknown_128h), - new Tuple(0x138, Unknown_138h), - new Tuple(0x148, Unknown_148h), - new Tuple(0x158, Unknown_158h), - new Tuple(0x168, Unknown_168h), - new Tuple(0x188, Unknown_188h), + new Tuple(88, Spawner1), + new Tuple(96, Spawner2), + new Tuple(0x128, BehaviourList1), + new Tuple(0x138, BehaviourList2), + new Tuple(0x148, BehaviourList3), + new Tuple(0x158, BehaviourList4), + new Tuple(0x168, BehaviourList5), + new Tuple(0x188, UnknownList1), new Tuple(0x1F0, ShaderVars), - new Tuple(0x210, Unknown_210h) + new Tuple(0x210, UnknownList2) }; } } + [TC(typeof(EXP))] public class ParticleRuleUnknownItem : ResourceSystemBlock + { + public override long BlockLength => 0x58; + + // structure data + public MetaHash Unknown_0h { get; set; } // 0x73616942 //text? + public MetaHash Unknown_4h { get; set; } // 0x6E694C20 + public MetaHash Unknown_8h { get; set; } // 0x6553206B + public MetaHash Unknown_Ch { get; set; } // 0x30305F74 + public ulong Unknown_10h; // 0x0000000000000000 + public ulong Unknown_18h; // 0x0000000000000000 + public ulong Unknown_20h; // 0x0000000000000000 + public ulong Unknown_28h; // 0x0000000000000000 + public ulong Unknown_30h; // 0x0000000000000000 + public ulong Unknown_38h; // 0x0000000000000000 + public ResourceSimpleList64 Unknown_40h { get; set; } + public uint Unknown_50h { get; set; } + public uint Unknown_54h; // 0x00000000 + + public override void Read(ResourceDataReader reader, params object[] parameters) + { + // read structure data + this.Unknown_0h = reader.ReadUInt32(); + this.Unknown_4h = reader.ReadUInt32(); + this.Unknown_8h = reader.ReadUInt32(); + this.Unknown_Ch = reader.ReadUInt32(); + this.Unknown_10h = reader.ReadUInt64(); + this.Unknown_18h = reader.ReadUInt64(); + this.Unknown_20h = reader.ReadUInt64(); + this.Unknown_28h = reader.ReadUInt64(); + this.Unknown_30h = reader.ReadUInt64(); + this.Unknown_38h = reader.ReadUInt64(); + this.Unknown_40h = reader.ReadBlock>(); + this.Unknown_50h = reader.ReadUInt32(); + this.Unknown_54h = reader.ReadUInt32(); + + switch (Unknown_0h) + { + default: + break; + } + switch (Unknown_4h) + { + default: + break; + } + switch (Unknown_8h) + { + default: + break; + } + switch (Unknown_Ch) + { + default: + break; + } + if (Unknown_10h != 0) + { } + if (Unknown_18h != 0) + { } + if (Unknown_20h != 0) + { } + if (Unknown_28h != 0) + { } + if (Unknown_30h != 0) + { } + if (Unknown_38h != 0) + { } + switch (Unknown_50h) + { + default: + break; + } + if (Unknown_54h != 0) + { } + } + + 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_10h); + writer.Write(this.Unknown_18h); + writer.Write(this.Unknown_20h); + writer.Write(this.Unknown_28h); + writer.Write(this.Unknown_30h); + writer.Write(this.Unknown_38h); + writer.WriteBlock(this.Unknown_40h); + writer.Write(this.Unknown_50h); + writer.Write(this.Unknown_54h); + } + + public override Tuple[] GetParts() + { + return new Tuple[] { + new Tuple(0x40, Unknown_40h) + }; + } + } + + + [TC(typeof(EXP))] public class ParticleRuleUnknownItem2 : ResourceSystemBlock + { + public override long BlockLength => 0x30; + + // structure data + public MetaHash Unknown_0h { get; set; } + public MetaHash Unknown_4h { get; set; } + public MetaHash Unknown_8h { get; set; } + public MetaHash Unknown_Ch { get; set; } + public ulong String1Pointer { get; set; } + public ulong DrawablePointer { get; set; } + public MetaHash Unknown_20h { get; set; } + public uint Unknown_24h { get; set; } // 0x00000000 + public ulong Unknown_28h; // 0x0000000000000000 + + // reference data + public string_r String1 { get; set; } + public Drawable Drawable { get; set; } + + public override void Read(ResourceDataReader reader, params object[] parameters) + { + // read structure data + this.Unknown_0h = reader.ReadUInt32(); + this.Unknown_4h = reader.ReadUInt32(); + this.Unknown_8h = reader.ReadUInt32(); + this.Unknown_Ch = reader.ReadUInt32(); + this.String1Pointer = reader.ReadUInt64(); + this.DrawablePointer = reader.ReadUInt64(); + this.Unknown_20h = reader.ReadUInt32(); + this.Unknown_24h = reader.ReadUInt32(); + this.Unknown_28h = reader.ReadUInt64(); + + // read reference data + this.String1 = reader.ReadBlockAt(this.String1Pointer); + this.Drawable = reader.ReadBlockAt(this.DrawablePointer); + + + switch (Unknown_0h) + { + default: + break; + } + switch (Unknown_4h) + { + default: + break; + } + switch (Unknown_8h) + { + default: + break; + } + switch (Unknown_Ch) + { + default: + break; + } + switch (Unknown_20h) + { + default: + break; + } + if (Unknown_24h != 0) + { } + if (Unknown_28h != 0) + { } + } + public override void Write(ResourceDataWriter writer, params object[] parameters) + { + // update structure data + this.String1Pointer = (ulong)(this.String1 != null ? this.String1.FilePosition : 0); + this.DrawablePointer = (ulong)(this.Drawable != null ? this.Drawable.FilePosition : 0); + + // 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.String1Pointer); + writer.Write(this.DrawablePointer); + writer.Write(this.Unknown_20h); + writer.Write(this.Unknown_24h); + writer.Write(this.Unknown_28h); + } + + public override IResourceBlock[] GetReferences() + { + var list = new List(); + if (String1 != null) list.Add(String1); + if (Drawable != null) list.Add(Drawable); + return list.ToArray(); + } + } + - // pgBase - // ptxEffectSpawner [TC(typeof(EXP))] public class ParticleEffectSpawner : ResourceSystemBlock { + // pgBase + // ptxEffectSpawner public override long BlockLength => 0x70; // structure data - public uint VFT { get; set; } - public uint Unknown_4h { get; set; } // 0x00000001 - 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; } - public uint Unknown_1Ch { get; set; } - public uint Unknown_20h { get; set; } - public uint Unknown_24h { get; set; } - public uint Unknown_28h { get; set; } - public uint Unknown_2Ch { get; set; } // 0x00000000 - public uint Unknown_30h { get; set; } // 0x00000000 - public uint Unknown_34h { get; set; } // 0x00000000 - public uint Unknown_38h { get; set; } - public uint Unknown_3Ch { get; set; } - public uint Unknown_40h { get; set; } - public uint Unknown_44h { get; set; } - public uint Unknown_48h { get; set; } - public uint Unknown_4Ch { get; set; } // 0x00000000 - public uint Unknown_50h { get; set; } // 0x00000000 - public uint Unknown_54h { get; set; } // 0x00000000 + public MetaHash VFT { get; set; } + public uint Unknown_4h = 1; // 0x00000001 + public ulong Unknown_8h; // 0x0000000000000000 + public ulong Unknown_10h; // 0x0000000000000000 + public MetaHash Unknown_18h { get; set; } + public MetaHash Unknown_1Ch { get; set; } + public MetaHash Unknown_20h { get; set; } + public MetaHash Unknown_24h { get; set; } + public MetaHash Unknown_28h { get; set; } + public uint Unknown_2Ch; // 0x00000000 + public ulong Unknown_30h; // 0x0000000000000000 + public MetaHash Unknown_38h { get; set; } + public MetaHash Unknown_3Ch { get; set; } + public MetaHash Unknown_40h { get; set; } + public MetaHash Unknown_44h { get; set; } + public MetaHash Unknown_48h { get; set; } + public uint Unknown_4Ch; // 0x00000000 + public ulong Unknown_50h; // 0x0000000000000000 public ulong EmitterRulePointer { get; set; } - public ulong p1 { get; set; } + public ulong String1Pointer { get; set; } public uint Unknown_68h { get; set; } public uint Unknown_6Ch { get; set; } // reference data public ParticleEffectRule EmitterRule { get; set; } - public string_r p1data { get; set; } + public string_r String1 { get; set; } - /// - /// Reads the data-block from a stream. - /// public override void Read(ResourceDataReader reader, params object[] parameters) { // read structure data this.VFT = reader.ReadUInt32(); this.Unknown_4h = reader.ReadUInt32(); - this.Unknown_8h = reader.ReadUInt32(); - this.Unknown_Ch = reader.ReadUInt32(); - this.Unknown_10h = reader.ReadUInt32(); - this.Unknown_14h = reader.ReadUInt32(); + this.Unknown_8h = reader.ReadUInt64(); + this.Unknown_10h = reader.ReadUInt64(); this.Unknown_18h = reader.ReadUInt32(); this.Unknown_1Ch = reader.ReadUInt32(); this.Unknown_20h = reader.ReadUInt32(); this.Unknown_24h = reader.ReadUInt32(); this.Unknown_28h = reader.ReadUInt32(); this.Unknown_2Ch = reader.ReadUInt32(); - this.Unknown_30h = reader.ReadUInt32(); - this.Unknown_34h = reader.ReadUInt32(); + this.Unknown_30h = reader.ReadUInt64(); this.Unknown_38h = reader.ReadUInt32(); this.Unknown_3Ch = reader.ReadUInt32(); this.Unknown_40h = reader.ReadUInt32(); this.Unknown_44h = reader.ReadUInt32(); this.Unknown_48h = reader.ReadUInt32(); this.Unknown_4Ch = reader.ReadUInt32(); - this.Unknown_50h = reader.ReadUInt32(); - this.Unknown_54h = reader.ReadUInt32(); + this.Unknown_50h = reader.ReadUInt64(); this.EmitterRulePointer = reader.ReadUInt64(); - this.p1 = reader.ReadUInt64(); + this.String1Pointer = reader.ReadUInt64(); this.Unknown_68h = reader.ReadUInt32(); this.Unknown_6Ch = reader.ReadUInt32(); // read reference data - this.EmitterRule = reader.ReadBlockAt( - this.EmitterRulePointer // offset - ); - this.p1data = reader.ReadBlockAt( - this.p1 // offset - ); - } + this.EmitterRule = reader.ReadBlockAt(this.EmitterRulePointer); + this.String1 = reader.ReadBlockAt(this.String1Pointer); - /// - /// Writes the data-block to a stream. - /// + if (Unknown_40h != 1) + { } + if (Unknown_8h != 0) + { } + if (Unknown_10h != 0) + { } + switch (Unknown_18h) + { + default: + break; + } + switch (Unknown_1Ch) + { + default: + break; + } + switch (Unknown_20h) + { + default: + break; + } + switch (Unknown_24h) + { + default: + break; + } + switch (Unknown_28h) + { + default: + break; + } + if (Unknown_2Ch != 0) + { } + if (Unknown_30h != 0) + { } + switch (Unknown_38h) + { + default: + break; + } + switch (Unknown_3Ch) + { + default: + break; + } + switch (Unknown_40h) + { + default: + break; + } + switch (Unknown_44h) + { + default: + break; + } + switch (Unknown_48h) + { + default: + break; + } + if (Unknown_4Ch != 0) + { } + if (Unknown_50h != 0) + { } + switch (Unknown_68h) + { + default: + break; + } + switch (Unknown_6Ch) + { + default: + break; + } + + } public override void Write(ResourceDataWriter writer, params object[] parameters) { // update structure data this.EmitterRulePointer = (ulong)(this.EmitterRule != null ? this.EmitterRule.FilePosition : 0); - this.p1 = (ulong)(this.p1data != null ? this.p1data.FilePosition : 0); + this.String1Pointer = (ulong)(this.String1 != null ? this.String1.FilePosition : 0); // write structure data writer.Write(this.VFT); writer.Write(this.Unknown_4h); writer.Write(this.Unknown_8h); - writer.Write(this.Unknown_Ch); writer.Write(this.Unknown_10h); - writer.Write(this.Unknown_14h); writer.Write(this.Unknown_18h); writer.Write(this.Unknown_1Ch); writer.Write(this.Unknown_20h); @@ -774,7 +1076,6 @@ namespace CodeWalker.GameFiles writer.Write(this.Unknown_28h); writer.Write(this.Unknown_2Ch); writer.Write(this.Unknown_30h); - writer.Write(this.Unknown_34h); writer.Write(this.Unknown_38h); writer.Write(this.Unknown_3Ch); writer.Write(this.Unknown_40h); @@ -782,80 +1083,72 @@ namespace CodeWalker.GameFiles writer.Write(this.Unknown_48h); writer.Write(this.Unknown_4Ch); writer.Write(this.Unknown_50h); - writer.Write(this.Unknown_54h); writer.Write(this.EmitterRulePointer); - writer.Write(this.p1); + writer.Write(this.String1Pointer); writer.Write(this.Unknown_68h); writer.Write(this.Unknown_6Ch); } - /// - /// Returns a list of data blocks which are referenced by this block. - /// + public override IResourceBlock[] GetReferences() { var list = new List(); if (EmitterRule != null) list.Add(EmitterRule); - if (p1data != null) list.Add(p1data); + if (String1 != null) list.Add(String1); return list.ToArray(); } } - // pgBase - // pgBaseRefCounted - // ptxEffectRule [TC(typeof(EXP))] public class ParticleEffectRule : ResourceSystemBlock { + // pgBase + // pgBaseRefCounted + // ptxEffectRule public override long BlockLength => 0x3C0; // structure data public uint VFT { get; set; } - public uint Unknown_4h { get; set; } // 0x00000001 - public uint Unknown_8h { get; set; } // 0x00000000 - public uint Unknown_Ch { get; set; } // 0x00000000 - public uint Unknown_10h { get; set; } // 0x00000001 - public uint Unknown_14h { get; set; } // 0x00000000 - public uint Unknown_18h { get; set; } // 0x40866666 - public uint Unknown_1Ch { get; set; } // 0x00000000 + public uint Unknown_4h = 1; // 0x00000001 + public ulong Unknown_8h; // 0x0000000000000000 + public ulong Unknown_10h = 1; // 0x0000000000000001 + public MetaHash Unknown_18h { get; set; } = 0x40866666; // 0x40866666 //4.2f + public uint Unknown_1Ch; // 0x00000000 public ulong NamePointer { get; set; } - public uint Unknown_28h { get; set; } // 0x50000000 -> ".?AVptxFxList@rage@@" pointer to itself - public uint Unknown_2Ch { get; set; } // 0x00000000 - public uint Unknown_30h { get; set; } - public uint Unknown_34h { get; set; } // 0x00000001 + public ulong Unknown_28h { get; set; } // 0x50000000 -> ".?AVptxFxList@rage@@" pointer to itself + public MetaHash Unknown_30h { get; set; } + public uint Unknown_34h = 1; // 0x00000001 public ulong EventEmittersPointer { get; set; } public ushort EventEmittersCount1 { get; set; } public ushort EventEmittersCount2 { get; set; } - public uint Unknown_44h { get; set; } - public ulong p4 { get; set; } - public uint Unknown_50h { get; set; } - public uint Unknown_54h { get; set; } - public uint Unknown_58h { get; set; } // 0x00000000 - public uint Unknown_5Ch { get; set; } // 0x00000000 - public uint Unknown_60h { get; set; } // 0x00000000 - public uint Unknown_64h { get; set; } // 0x00000000 - public uint Unknown_68h { get; set; } // 0x00000000 - public uint Unknown_6Ch { get; set; } - public uint Unknown_70h { get; set; } - public uint Unknown_74h { get; set; } - public uint Unknown_78h { 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 uint Unknown_90h { get; set; } - public uint Unknown_94h { get; set; } - public uint Unknown_98h { get; set; } - public uint Unknown_9Ch { get; set; } - public uint Unknown_A0h { get; set; } - public uint Unknown_A4h { get; set; } - public uint Unknown_A8h { get; set; } - public uint Unknown_ACh { get; set; } - public uint Unknown_B0h { get; set; } - public uint Unknown_B4h { get; set; } - public uint Unknown_B8h { get; set; } - public uint Unknown_BCh { get; set; } + public MetaHash Unknown_44h { get; set; } + public ulong UnknownData1Pointer { get; set; } + public MetaHash Unknown_50h { get; set; } + public MetaHash Unknown_54h { get; set; } + public ulong Unknown_58h; // 0x0000000000000000 + public ulong Unknown_60h; // 0x0000000000000000 + public uint Unknown_68h; // 0x00000000 + public MetaHash Unknown_6Ch { get; set; } + public MetaHash Unknown_70h { get; set; } + public MetaHash Unknown_74h { get; set; } + public MetaHash Unknown_78h { get; set; } + public MetaHash Unknown_7Ch { get; set; } + public MetaHash Unknown_80h { get; set; } + public MetaHash Unknown_84h { get; set; } + public MetaHash Unknown_88h { get; set; } + public MetaHash Unknown_8Ch { get; set; } + public MetaHash Unknown_90h { get; set; } + public MetaHash Unknown_94h { get; set; } + public MetaHash Unknown_98h { get; set; } + public MetaHash Unknown_9Ch { get; set; } + public MetaHash Unknown_A0h { get; set; } + public MetaHash Unknown_A4h { get; set; } + public MetaHash Unknown_A8h { get; set; } + public MetaHash Unknown_ACh { get; set; } + public MetaHash Unknown_B0h { get; set; } + public MetaHash Unknown_B4h { get; set; } + public MetaHash Unknown_B8h { get; set; } + public MetaHash Unknown_BCh { get; set; } public ParticleKeyframeProp KeyframeProp0 { get; set; } public ParticleKeyframeProp KeyframeProp1 { get; set; } public ParticleKeyframeProp KeyframeProp2 { get; set; } @@ -864,50 +1157,45 @@ namespace CodeWalker.GameFiles public ulong KeyframePropsPointer { get; set; } public ushort KeyframePropsCount1 { get; set; } public ushort KeyframePropsCount2 { get; set; } - public uint Unknown_39Ch { get; set; } // 0x00000000 - public uint Unknown_3A0h { get; set; } - public uint Unknown_3A4h { get; set; } // 0x00000000 - public uint Unknown_3A8h { get; set; } // 0x42C80000 + public uint Unknown_39Ch; // 0x00000000 + public MetaHash Unknown_3A0h { get; set; } + public uint Unknown_3A4h; // 0x00000000 + public MetaHash Unknown_3A8h { get; set; } = 0x42C80000; // 0x42C80000 //100.0f public uint Unknown_3ACh { get; set; } // 0x00000000 - public uint Unknown_3B0h { get; set; } // 0x00000000 - public uint Unknown_3B4h { get; set; } // 0x00000000 - public uint Unknown_3B8h { get; set; } // 0x00000000 - public uint Unknown_3BCh { get; set; } // 0x00000000 + public ulong Unknown_3B0h { get; set; } // 0x0000000000000000 + public ulong Unknown_3B8h { get; set; } // 0x0000000000000000 // reference data public string_r Name { get; set; } public ResourcePointerArray64 EventEmitters { get; set; } - public ParticleUnknown_P_004 p4data { get; set; } + public ParticleUnknown1 UnknownData { get; set; } public ResourcePointerArray64 KeyframeProps { get; set; } public override void Read(ResourceDataReader reader, params object[] parameters) { + #region read + // read structure data this.VFT = reader.ReadUInt32(); this.Unknown_4h = reader.ReadUInt32(); - this.Unknown_8h = reader.ReadUInt32(); - this.Unknown_Ch = reader.ReadUInt32(); - this.Unknown_10h = reader.ReadUInt32(); - this.Unknown_14h = reader.ReadUInt32(); + this.Unknown_8h = reader.ReadUInt64(); + this.Unknown_10h = reader.ReadUInt64(); this.Unknown_18h = reader.ReadUInt32(); this.Unknown_1Ch = reader.ReadUInt32(); this.NamePointer = reader.ReadUInt64(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); + this.Unknown_28h = reader.ReadUInt64(); this.Unknown_30h = reader.ReadUInt32(); this.Unknown_34h = reader.ReadUInt32(); this.EventEmittersPointer = reader.ReadUInt64(); this.EventEmittersCount1 = reader.ReadUInt16(); this.EventEmittersCount2 = reader.ReadUInt16(); this.Unknown_44h = reader.ReadUInt32(); - this.p4 = reader.ReadUInt64(); + this.UnknownData1Pointer = reader.ReadUInt64(); this.Unknown_50h = reader.ReadUInt32(); this.Unknown_54h = reader.ReadUInt32(); - this.Unknown_58h = reader.ReadUInt32(); - this.Unknown_5Ch = reader.ReadUInt32(); - this.Unknown_60h = reader.ReadUInt32(); - this.Unknown_64h = reader.ReadUInt32(); + this.Unknown_58h = reader.ReadUInt64(); + this.Unknown_60h = reader.ReadUInt64(); this.Unknown_68h = reader.ReadUInt32(); this.Unknown_6Ch = reader.ReadUInt32(); this.Unknown_70h = reader.ReadUInt32(); @@ -943,26 +1231,181 @@ namespace CodeWalker.GameFiles this.Unknown_3A4h = reader.ReadUInt32(); this.Unknown_3A8h = reader.ReadUInt32(); this.Unknown_3ACh = reader.ReadUInt32(); - this.Unknown_3B0h = reader.ReadUInt32(); - this.Unknown_3B4h = reader.ReadUInt32(); - this.Unknown_3B8h = reader.ReadUInt32(); - this.Unknown_3BCh = reader.ReadUInt32(); + this.Unknown_3B0h = reader.ReadUInt64(); + this.Unknown_3B8h = reader.ReadUInt64(); // read reference data - this.Name = reader.ReadBlockAt( - this.NamePointer // offset - ); - this.EventEmitters = reader.ReadBlockAt>( - this.EventEmittersPointer, // offset - this.EventEmittersCount1 - ); - this.p4data = reader.ReadBlockAt( - this.p4 // offset - ); - this.KeyframeProps = reader.ReadBlockAt>( - this.KeyframePropsPointer, // offset - this.KeyframePropsCount2 - ); + this.Name = reader.ReadBlockAt(this.NamePointer); + this.EventEmitters = reader.ReadBlockAt>(this.EventEmittersPointer, this.EventEmittersCount1); + this.UnknownData = reader.ReadBlockAt(this.UnknownData1Pointer); + this.KeyframeProps = reader.ReadBlockAt>(this.KeyframePropsPointer, this.KeyframePropsCount2); + + #endregion + + + if (Unknown_4h != 1) + { } + if (Unknown_8h != 0) + { } + if (Unknown_10h != 1) + { } + if (Unknown_18h != 0x40866666) + { } + if (Unknown_1Ch != 0) + { } + if (Unknown_28h != 0) + { } + switch (Unknown_30h) + { + default: + break; + } + if (Unknown_34h != 1) + { } + switch (Unknown_44h) + { + default: + break; + } + switch (Unknown_50h) + { + default: + break; + } + switch (Unknown_54h) + { + default: + break; + } + if (Unknown_58h != 0) + { } + if (Unknown_60h != 0) + { } + if (Unknown_68h != 0) + { } + switch (Unknown_6Ch) + { + default: + break; + } + switch (Unknown_70h) + { + default: + break; + } + switch (Unknown_74h) + { + default: + break; + } + switch (Unknown_78h) + { + default: + break; + } + switch (Unknown_7Ch) + { + default: + break; + } + switch (Unknown_80h) + { + default: + break; + } + switch (Unknown_84h) + { + default: + break; + } + switch (Unknown_88h) + { + default: + break; + } + switch (Unknown_8Ch) + { + default: + break; + } + switch (Unknown_90h) + { + default: + break; + } + switch (Unknown_94h) + { + default: + break; + } + switch (Unknown_98h) + { + default: + break; + } + switch (Unknown_9Ch) + { + default: + break; + } + switch (Unknown_A0h) + { + default: + break; + } + switch (Unknown_A4h) + { + default: + break; + } + switch (Unknown_A8h) + { + default: + break; + } + switch (Unknown_ACh) + { + default: + break; + } + switch (Unknown_B0h) + { + default: + break; + } + switch (Unknown_B4h) + { + default: + break; + } + switch (Unknown_B8h) + { + default: + break; + } + switch (Unknown_BCh) + { + default: + break; + } + if (Unknown_39Ch != 0) + { } + switch (Unknown_3A0h) + { + default: + break; + } + if (Unknown_3A4h != 0) + { } + if (Unknown_3A8h != 0x42C80000) + { } + if (Unknown_3ACh != 0) + { } + if (Unknown_3B0h != 0) + { } + if (Unknown_3B8h != 0) + { } + } public override void Write(ResourceDataWriter writer, params object[] parameters) @@ -971,7 +1414,7 @@ namespace CodeWalker.GameFiles this.NamePointer = (ulong)(this.Name != null ? this.Name.FilePosition : 0); this.EventEmittersPointer = (ulong)(this.EventEmitters != null ? this.EventEmitters.FilePosition : 0); //this.c3b = (ushort)(this.p3data != null ? this.p3data.Count : 0); - this.p4 = (ulong)(this.p4data != null ? this.p4data.FilePosition : 0); + this.UnknownData1Pointer = (ulong)(this.UnknownData != null ? this.UnknownData.FilePosition : 0); this.KeyframePropsPointer = (ulong)(this.KeyframeProps != null ? this.KeyframeProps.FilePosition : 0); //this.refcnt2 = (ushort)(this.refs != null ? this.refs.Count : 0); @@ -979,27 +1422,22 @@ namespace CodeWalker.GameFiles writer.Write(this.VFT); writer.Write(this.Unknown_4h); writer.Write(this.Unknown_8h); - writer.Write(this.Unknown_Ch); writer.Write(this.Unknown_10h); - writer.Write(this.Unknown_14h); writer.Write(this.Unknown_18h); writer.Write(this.Unknown_1Ch); writer.Write(this.NamePointer); writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); writer.Write(this.Unknown_30h); writer.Write(this.Unknown_34h); writer.Write(this.EventEmittersPointer); writer.Write(this.EventEmittersCount1); writer.Write(this.EventEmittersCount2); writer.Write(this.Unknown_44h); - writer.Write(this.p4); + writer.Write(this.UnknownData1Pointer); writer.Write(this.Unknown_50h); writer.Write(this.Unknown_54h); writer.Write(this.Unknown_58h); - writer.Write(this.Unknown_5Ch); writer.Write(this.Unknown_60h); - writer.Write(this.Unknown_64h); writer.Write(this.Unknown_68h); writer.Write(this.Unknown_6Ch); writer.Write(this.Unknown_70h); @@ -1036,9 +1474,7 @@ namespace CodeWalker.GameFiles writer.Write(this.Unknown_3A8h); writer.Write(this.Unknown_3ACh); writer.Write(this.Unknown_3B0h); - writer.Write(this.Unknown_3B4h); writer.Write(this.Unknown_3B8h); - writer.Write(this.Unknown_3BCh); } public override IResourceBlock[] GetReferences() @@ -1046,7 +1482,7 @@ namespace CodeWalker.GameFiles var list = new List(); if (Name != null) list.Add(Name); if (EventEmitters != null) list.Add(EventEmitters); - if (p4data != null) list.Add(p4data); + if (UnknownData != null) list.Add(UnknownData); if (KeyframeProps != null) list.Add(KeyframeProps); return list.ToArray(); } @@ -1062,48 +1498,34 @@ namespace CodeWalker.GameFiles }; } } + - - // datBase - // ptxKeyframeProp [TC(typeof(EXP))] public class ParticleKeyframeProp : ResourceSystemBlock { + // datBase + // ptxKeyframeProp public override long BlockLength => 0x90; // structure data public uint VFT { get; set; } - public uint Unknown_4h { get; set; } // 0x00000001 - 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 uint Unknown_20h { get; set; } // 0x00000000 - public uint Unknown_24h { get; set; } // 0x00000000 - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 - public uint Unknown_30h { get; set; } // 0x00000000 - public uint Unknown_34h { get; set; } // 0x00000000 - public uint Unknown_38h { get; set; } // 0x00000000 - public uint Unknown_3Ch { get; set; } // 0x00000000 - public uint Unknown_40h { get; set; } // 0x00000000 - public uint Unknown_44h { get; set; } // 0x00000000 - public uint Unknown_48h { get; set; } // 0x00000000 - public uint Unknown_4Ch { get; set; } // 0x00000000 - public uint Unknown_50h { get; set; } // 0x00000000 - public uint Unknown_54h { get; set; } // 0x00000000 - public uint Unknown_58h { get; set; } // 0x00000000 - public uint Unknown_5Ch { get; set; } // 0x00000000 - public uint Unknown_60h { get; set; } // 0x00000000 - public uint Unknown_64h { get; set; } // 0x00000000 - public uint Unknown_68h { get; set; } - public uint Unknown_6Ch { get; set; } - public ResourceSimpleList64 Unknown_70h { get; set; } - 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 + public uint Unknown_4h = 1; // 0x00000001 + public ulong Unknown_8h; // 0x0000000000000000 + public ulong Unknown_10h; // 0x0000000000000000 + public ulong Unknown_18h; // 0x0000000000000000 + public ulong Unknown_20h; // 0x0000000000000000 + public ulong Unknown_28h; // 0x0000000000000000 + public ulong Unknown_30h; // 0x0000000000000000 + public ulong Unknown_38h; // 0x0000000000000000 + public ulong Unknown_40h; // 0x0000000000000000 + public ulong Unknown_48h; // 0x0000000000000000 + public ulong Unknown_50h; // 0x0000000000000000 + public ulong Unknown_58h; // 0x0000000000000000 + public ulong Unknown_60h; // 0x0000000000000000 + public MetaHash Unknown_68h { get; set; } + public MetaHash Unknown_6Ch { get; set; } + public ResourceSimpleList64 Items { get; set; } + public ulong Unknown_80h; // 0x0000000000000000 + public ulong Unknown_88h; // 0x0000000000000000 public override void Read(ResourceDataReader reader, params object[] parameters) @@ -1111,37 +1533,65 @@ namespace CodeWalker.GameFiles // read structure data this.VFT = reader.ReadUInt32(); this.Unknown_4h = reader.ReadUInt32(); - this.Unknown_8h = reader.ReadUInt32(); - this.Unknown_Ch = reader.ReadUInt32(); - this.Unknown_10h = reader.ReadUInt32(); - this.Unknown_14h = reader.ReadUInt32(); - this.Unknown_18h = reader.ReadUInt32(); - this.Unknown_1Ch = reader.ReadUInt32(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); - this.Unknown_30h = reader.ReadUInt32(); - this.Unknown_34h = reader.ReadUInt32(); - this.Unknown_38h = reader.ReadUInt32(); - this.Unknown_3Ch = reader.ReadUInt32(); - this.Unknown_40h = reader.ReadUInt32(); - this.Unknown_44h = reader.ReadUInt32(); - this.Unknown_48h = reader.ReadUInt32(); - this.Unknown_4Ch = reader.ReadUInt32(); - this.Unknown_50h = reader.ReadUInt32(); - this.Unknown_54h = reader.ReadUInt32(); - this.Unknown_58h = reader.ReadUInt32(); - this.Unknown_5Ch = reader.ReadUInt32(); - this.Unknown_60h = reader.ReadUInt32(); - this.Unknown_64h = reader.ReadUInt32(); + this.Unknown_8h = reader.ReadUInt64(); + this.Unknown_10h = reader.ReadUInt64(); + this.Unknown_18h = reader.ReadUInt64(); + this.Unknown_20h = reader.ReadUInt64(); + this.Unknown_28h = reader.ReadUInt64(); + this.Unknown_30h = reader.ReadUInt64(); + this.Unknown_38h = reader.ReadUInt64(); + this.Unknown_40h = reader.ReadUInt64(); + this.Unknown_48h = reader.ReadUInt64(); + this.Unknown_50h = reader.ReadUInt64(); + this.Unknown_58h = reader.ReadUInt64(); + this.Unknown_60h = reader.ReadUInt64(); this.Unknown_68h = reader.ReadUInt32(); this.Unknown_6Ch = reader.ReadUInt32(); - this.Unknown_70h = reader.ReadBlock>(); - this.Unknown_80h = reader.ReadUInt32(); - this.Unknown_84h = reader.ReadUInt32(); - this.Unknown_88h = reader.ReadUInt32(); - this.Unknown_8Ch = reader.ReadUInt32(); + this.Items = reader.ReadBlock>(); + this.Unknown_80h = reader.ReadUInt64(); + this.Unknown_88h = reader.ReadUInt64(); + + + if (Unknown_4h != 1) + { } + if (Unknown_8h != 0) + { } + if (Unknown_10h != 0) + { } + if (Unknown_18h != 0) + { } + if (Unknown_20h != 0) + { } + if (Unknown_28h != 0) + { } + if (Unknown_30h != 0) + { } + if (Unknown_38h != 0) + { } + if (Unknown_40h != 0) + { } + if (Unknown_48h != 0) + { } + if (Unknown_50h != 0) + { } + if (Unknown_58h != 0) + { } + if (Unknown_60h != 0) + { } + switch (Unknown_68h) + { + default: + break; + } + switch (Unknown_6Ch) + { + default: + break; + } + if (Unknown_80h != 0) + { } + if (Unknown_88h != 0) + { } } public override void Write(ResourceDataWriter writer, params object[] parameters) @@ -1150,88 +1600,166 @@ namespace CodeWalker.GameFiles writer.Write(this.VFT); writer.Write(this.Unknown_4h); writer.Write(this.Unknown_8h); - writer.Write(this.Unknown_Ch); writer.Write(this.Unknown_10h); - writer.Write(this.Unknown_14h); writer.Write(this.Unknown_18h); - writer.Write(this.Unknown_1Ch); writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); writer.Write(this.Unknown_30h); - writer.Write(this.Unknown_34h); writer.Write(this.Unknown_38h); - writer.Write(this.Unknown_3Ch); writer.Write(this.Unknown_40h); - writer.Write(this.Unknown_44h); writer.Write(this.Unknown_48h); - writer.Write(this.Unknown_4Ch); writer.Write(this.Unknown_50h); - writer.Write(this.Unknown_54h); writer.Write(this.Unknown_58h); - writer.Write(this.Unknown_5Ch); writer.Write(this.Unknown_60h); - writer.Write(this.Unknown_64h); writer.Write(this.Unknown_68h); writer.Write(this.Unknown_6Ch); - writer.WriteBlock(this.Unknown_70h); + writer.WriteBlock(this.Items); writer.Write(this.Unknown_80h); - writer.Write(this.Unknown_84h); writer.Write(this.Unknown_88h); - writer.Write(this.Unknown_8Ch); } public override Tuple[] GetParts() { return new Tuple[] { - new Tuple(0x70, Unknown_70h) + new Tuple(0x70, Items) }; } } - - [TC(typeof(EXP))] public class ParticleUnknown_P_011 : ResourceSystemBlock + [TC(typeof(EXP))] public class ParticleKeyframePropItem : ResourceSystemBlock { public override long BlockLength => 0x20; // structure data public float Unknown_0h { get; set; } public float Unknown_4h { get; set; } - public uint Unknown_8h { get; set; } // 0x00000000 - public uint Unknown_Ch { get; set; } // 0x00000000 + public ulong Unknown_8h; // 0x0000000000000000 public float Unknown_10h { get; set; } public float Unknown_14h { get; set; } public float Unknown_18h { get; set; } public float Unknown_1Ch { get; set; } - /// - /// Reads the data-block from a stream. - /// 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.ReadUInt32(); - this.Unknown_Ch = reader.ReadUInt32(); + this.Unknown_8h = reader.ReadUInt64(); this.Unknown_10h = reader.ReadSingle(); this.Unknown_14h = reader.ReadSingle(); this.Unknown_18h = reader.ReadSingle(); this.Unknown_1Ch = reader.ReadSingle(); - } - /// - /// Writes the data-block to a stream. - /// + switch (Unknown_0h) + { + default: + break; + } + switch (Unknown_4h) + { + default: + break; + } + if (Unknown_8h != 0) + { } + switch (Unknown_10h) + { + default: + break; + } + switch (Unknown_14h) + { + default: + break; + } + switch (Unknown_18h) + { + default: + break; + } + switch (Unknown_1Ch) + { + default: + break; + } + } + 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_10h); + writer.Write(this.Unknown_14h); + writer.Write(this.Unknown_18h); + writer.Write(this.Unknown_1Ch); + } + } + [TC(typeof(EXP))] public class ParticleKeyframePropItem2 : ResourceSystemBlock + { + public override long BlockLength => 0x20; + + // structure data + public MetaHash Unknown_0h { get; set; } + public MetaHash Unknown_4h { get; set; } + public ulong Unknown_8h; // 0x0000000000000000 + public MetaHash Unknown_10h { get; set; } + public MetaHash Unknown_14h { get; set; } + public MetaHash Unknown_18h { get; set; } + public MetaHash Unknown_1Ch { get; set; } + + public override void Read(ResourceDataReader reader, params object[] parameters) + { + // read structure data + this.Unknown_0h = reader.ReadUInt32(); + this.Unknown_4h = reader.ReadUInt32(); + this.Unknown_8h = reader.ReadUInt64(); + this.Unknown_10h = reader.ReadUInt32(); + this.Unknown_14h = reader.ReadUInt32(); + this.Unknown_18h = reader.ReadUInt32(); + this.Unknown_1Ch = reader.ReadUInt32(); + + switch (Unknown_0h) + { + default: + break; + } + switch (Unknown_4h) + { + default: + break; + } + if (Unknown_8h != 0) + { } + switch (Unknown_10h) + { + default: + break; + } + switch (Unknown_14h) + { + default: + break; + } + switch (Unknown_18h) + { + default: + break; + } + switch (Unknown_1Ch) + { + default: + break; + } + } + 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_10h); writer.Write(this.Unknown_14h); writer.Write(this.Unknown_18h); @@ -1240,41 +1768,38 @@ namespace CodeWalker.GameFiles } - // ptxEvent - // ptxEventEmitter [TC(typeof(EXP))] public class ParticleEventEmitter : ResourceSystemBlock { + // ptxEvent + // ptxEventEmitter public override long BlockLength => 0x70; // structure data public uint VFT { get; set; } - public uint Unknown_4h { get; set; } // 0x00000001 - public uint Unknown_8h { get; set; } - public uint Unknown_Ch { get; set; } // 0x00000000 - public uint Unknown_10h { get; set; } - public uint Unknown_14h { get; set; } // 0x00000000 - public ulong p1 { get; set; } - public uint Unknown_20h { get; set; } // 0x00000000 - public uint Unknown_24h { get; set; } // 0x00000000 - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 - public ulong p2 { get; set; } - public ulong p3 { get; set; } - public ulong p4 { get; set; } - public ulong p5 { get; set; } - public uint Unknown_50h { get; set; } - public uint Unknown_54h { get; set; } - public uint Unknown_58h { get; set; } - public uint Unknown_5Ch { get; set; } - public uint Unknown_60h { get; set; } - public uint Unknown_64h { get; set; } - public uint Unknown_68h { get; set; } // 0x00000000 - public uint Unknown_6Ch { get; set; } // 0x00000000 + public uint Unknown_4h = 1; // 0x00000001 + public MetaHash Unknown_8h { get; set; } + public uint Unknown_Ch; // 0x00000000 + public MetaHash Unknown_10h { get; set; } + public uint Unknown_14h; // 0x00000000 + public ulong UnknownDataPointer { get; set; } + public ulong Unknown_20h; // 0x0000000000000000 + public ulong Unknown_28h; // 0x0000000000000000 + public ulong String1Pointer { get; set; } + public ulong String2Pointer { get; set; } + public ulong EmitterRulePointer { get; set; } + public ulong ParticleRulePointer { get; set; } + public MetaHash Unknown_50h { get; set; } + public MetaHash Unknown_54h { get; set; } + public MetaHash Unknown_58h { get; set; } + public MetaHash Unknown_5Ch { get; set; } + public MetaHash Unknown_60h { get; set; } + public MetaHash Unknown_64h { get; set; } + public ulong Unknown_68h; // 0x0000000000000000 // reference data - public ParticleUnknown_P_005 p1data { get; set; } - public string_r p2data { get; set; } - public string_r p3data { get; set; } + public ParticleUnknown1 UnknownData { get; set; } + public string_r String1 { get; set; } + public string_r String2 { get; set; } public ParticleEmitterRule EmitterRule { get; set; } public ParticleRule ParticleRule { get; set; } @@ -1287,50 +1812,91 @@ namespace CodeWalker.GameFiles this.Unknown_Ch = reader.ReadUInt32(); this.Unknown_10h = reader.ReadUInt32(); this.Unknown_14h = reader.ReadUInt32(); - this.p1 = reader.ReadUInt64(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); - this.p2 = reader.ReadUInt64(); - this.p3 = reader.ReadUInt64(); - this.p4 = reader.ReadUInt64(); - this.p5 = reader.ReadUInt64(); + this.UnknownDataPointer = reader.ReadUInt64(); + this.Unknown_20h = reader.ReadUInt64(); + this.Unknown_28h = reader.ReadUInt64(); + this.String1Pointer = reader.ReadUInt64(); + this.String2Pointer = reader.ReadUInt64(); + this.EmitterRulePointer = reader.ReadUInt64(); + this.ParticleRulePointer = reader.ReadUInt64(); this.Unknown_50h = reader.ReadUInt32(); this.Unknown_54h = reader.ReadUInt32(); this.Unknown_58h = reader.ReadUInt32(); this.Unknown_5Ch = reader.ReadUInt32(); this.Unknown_60h = reader.ReadUInt32(); this.Unknown_64h = reader.ReadUInt32(); - this.Unknown_68h = reader.ReadUInt32(); - this.Unknown_6Ch = reader.ReadUInt32(); + this.Unknown_68h = reader.ReadUInt64(); // read reference data - this.p1data = reader.ReadBlockAt( - this.p1 // offset - ); - this.p2data = reader.ReadBlockAt( - this.p2 // offset - ); - this.p3data = reader.ReadBlockAt( - this.p3 // offset - ); - this.EmitterRule = reader.ReadBlockAt( - this.p4 // offset - ); - this.ParticleRule = reader.ReadBlockAt( - this.p5 // offset - ); + this.UnknownData = reader.ReadBlockAt(this.UnknownDataPointer); + this.String1 = reader.ReadBlockAt(this.String1Pointer); + this.String2 = reader.ReadBlockAt(this.String2Pointer); + this.EmitterRule = reader.ReadBlockAt(this.EmitterRulePointer); + this.ParticleRule = reader.ReadBlockAt(this.ParticleRulePointer); + + if (Unknown_4h != 1) + { } + switch (Unknown_8h) + { + default: + break; + } + if (Unknown_Ch != 0) + { } + switch (Unknown_10h) + { + default: + break; + } + if (Unknown_14h != 0) + { } + if (Unknown_20h != 0) + { } + if (Unknown_28h != 0) + { } + switch (Unknown_50h) + { + default: + break; + } + switch (Unknown_54h) + { + default: + break; + } + switch (Unknown_58h) + { + default: + break; + } + switch (Unknown_5Ch) + { + default: + break; + } + switch (Unknown_60h) + { + default: + break; + } + switch (Unknown_64h) + { + default: + break; + } + if (Unknown_68h != 0) + { } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { // update structure data - this.p1 = (ulong)(this.p1data != null ? this.p1data.FilePosition : 0); - this.p2 = (ulong)(this.p2data != null ? this.p2data.FilePosition : 0); - this.p3 = (ulong)(this.p3data != null ? this.p3data.FilePosition : 0); - this.p4 = (ulong)(this.EmitterRule != null ? this.EmitterRule.FilePosition : 0); - this.p5 = (ulong)(this.ParticleRule != null ? this.ParticleRule.FilePosition : 0); + this.UnknownDataPointer = (ulong)(this.UnknownData != null ? this.UnknownData.FilePosition : 0); + this.String1Pointer = (ulong)(this.String1 != null ? this.String1.FilePosition : 0); + this.String2Pointer = (ulong)(this.String2 != null ? this.String2.FilePosition : 0); + this.EmitterRulePointer = (ulong)(this.EmitterRule != null ? this.EmitterRule.FilePosition : 0); + this.ParticleRulePointer = (ulong)(this.ParticleRule != null ? this.ParticleRule.FilePosition : 0); // write structure data writer.Write(this.VFT); @@ -1339,15 +1905,13 @@ namespace CodeWalker.GameFiles writer.Write(this.Unknown_Ch); writer.Write(this.Unknown_10h); writer.Write(this.Unknown_14h); - writer.Write(this.p1); + writer.Write(this.UnknownDataPointer); writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); - writer.Write(this.p2); - writer.Write(this.p3); - writer.Write(this.p4); - writer.Write(this.p5); + writer.Write(this.String1Pointer); + writer.Write(this.String2Pointer); + writer.Write(this.EmitterRulePointer); + writer.Write(this.ParticleRulePointer); writer.Write(this.Unknown_50h); writer.Write(this.Unknown_54h); writer.Write(this.Unknown_58h); @@ -1355,15 +1919,14 @@ namespace CodeWalker.GameFiles writer.Write(this.Unknown_60h); writer.Write(this.Unknown_64h); writer.Write(this.Unknown_68h); - writer.Write(this.Unknown_6Ch); } public override IResourceBlock[] GetReferences() { var list = new List(); - if (p1data != null) list.Add(p1data); - if (p2data != null) list.Add(p2data); - if (p3data != null) list.Add(p3data); + if (UnknownData != null) list.Add(UnknownData); + if (String1 != null) list.Add(String1); + if (String2 != null) list.Add(String2); if (EmitterRule != null) list.Add(EmitterRule); if (ParticleRule != null) list.Add(ParticleRule); return list.ToArray(); @@ -1371,372 +1934,73 @@ namespace CodeWalker.GameFiles } - [TC(typeof(EXP))] public class ParticleUnknown_P_005 : ResourceSystemBlock - { - public override long BlockLength => 0x40; - - // structure data - public ResourceSimpleList64 Unknown_0h { get; set; } - public ResourceSimpleList64 Unknown_10h { get; set; } - public uint Unknown_20h { get; set; } // 0x00000001 - public uint Unknown_24h { get; set; } // 0x00000000 - public ResourceSimpleList64 Unknown_28h { get; set; } - public uint Unknown_38h { get; set; } // 0x00000000 - public uint Unknown_3Ch { get; set; } // 0x00000000 - - public override void Read(ResourceDataReader reader, params object[] parameters) - { - // read structure data - this.Unknown_0h = reader.ReadBlock>(); - this.Unknown_10h = reader.ReadBlock>(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadBlock>(); - this.Unknown_38h = reader.ReadUInt32(); - this.Unknown_3Ch = reader.ReadUInt32(); - } - - public override void Write(ResourceDataWriter writer, params object[] parameters) - { - // write structure data - writer.WriteBlock(this.Unknown_0h); - writer.WriteBlock(this.Unknown_10h); - writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); - writer.WriteBlock(this.Unknown_28h); - writer.Write(this.Unknown_38h); - writer.Write(this.Unknown_3Ch); - } - - public override Tuple[] GetParts() - { - return new Tuple[] { - new Tuple(0, Unknown_0h), - new Tuple(0x10, Unknown_10h), - new Tuple(0x28, Unknown_28h) - }; - } - } - - [TC(typeof(EXP))] public class ParticleUnknown_P_008 : ResourceSystemBlock - { - public override long BlockLength => 24; - - // structure data - public ulong p1 { get; set; } - 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 - - // reference data - public string_r p1data { get; set; } - - public override void Read(ResourceDataReader reader, params object[] parameters) - { - // read structure data - this.p1 = reader.ReadUInt64(); - this.Unknown_8h = reader.ReadUInt32(); - this.Unknown_Ch = reader.ReadUInt32(); - this.Unknown_10h = reader.ReadUInt32(); - this.Unknown_14h = reader.ReadUInt32(); - - // read reference data - this.p1data = reader.ReadBlockAt( - this.p1 // offset - ); - } - - public override void Write(ResourceDataWriter writer, params object[] parameters) - { - // update structure data - this.p1 = (ulong)(this.p1data != null ? this.p1data.FilePosition : 0); - - // write structure data - writer.Write(this.p1); - writer.Write(this.Unknown_8h); - writer.Write(this.Unknown_Ch); - writer.Write(this.Unknown_10h); - writer.Write(this.Unknown_14h); - } - - public override IResourceBlock[] GetReferences() - { - var list = new List(); - if (p1data != null) list.Add(p1data); - return list.ToArray(); - } - } - - [TC(typeof(EXP))] public class ParticleUnknown_P_003 : ResourceSystemBlock - { - public override long BlockLength => 24; - - // structure data - public ResourceSimpleList64 Unknown_0h { get; set; } - public uint Unknown_10h { get; set; } - public uint Unknown_14h { get; set; } - - public override void Read(ResourceDataReader reader, params object[] parameters) - { - // read structure data - this.Unknown_0h = reader.ReadBlock>(); - this.Unknown_10h = reader.ReadUInt32(); - this.Unknown_14h = reader.ReadUInt32(); - } - - public override void Write(ResourceDataWriter writer, params object[] parameters) - { - // write structure data - writer.WriteBlock(this.Unknown_0h); - writer.Write(this.Unknown_10h); - writer.Write(this.Unknown_14h); - } - - public override Tuple[] GetParts() - { - return new Tuple[] { - new Tuple(0, Unknown_0h) - }; - } - } - - [TC(typeof(EXP))] public class ParticleUnknown_P_006 : ResourceSystemBlock - { - public override long BlockLength => 0x30; - - // structure data - public ResourceSimpleList64 Unknown_0h { get; set; } - 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 uint Unknown_20h { get; set; } - public uint Unknown_24h { get; set; } - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 - - public override void Read(ResourceDataReader reader, params object[] parameters) - { - // read structure data - this.Unknown_0h = reader.ReadBlock>(); - this.Unknown_10h = reader.ReadUInt32(); - this.Unknown_14h = reader.ReadUInt32(); - this.Unknown_18h = reader.ReadUInt32(); - this.Unknown_1Ch = reader.ReadUInt32(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); - } - - public override void Write(ResourceDataWriter writer, params object[] parameters) - { - // write structure data - writer.WriteBlock(this.Unknown_0h); - writer.Write(this.Unknown_10h); - writer.Write(this.Unknown_14h); - writer.Write(this.Unknown_18h); - writer.Write(this.Unknown_1Ch); - writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); - writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); - } - - public override Tuple[] GetParts() - { - return new Tuple[] { - new Tuple(0, Unknown_0h) - }; - } - } - - [TC(typeof(EXP))] public class ParticleUnknown_P_009 : ResourceSystemBlock - { - public override long BlockLength => 0x20; - - // structure data - public uint Unknown_0h { get; set; } - public uint Unknown_4h { get; set; } - public uint Unknown_8h { get; set; } // 0x00000000 - public uint Unknown_Ch { get; set; } // 0x00000000 - 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 override void Read(ResourceDataReader reader, params object[] parameters) - { - // read structure data - this.Unknown_0h = reader.ReadUInt32(); - this.Unknown_4h = reader.ReadUInt32(); - this.Unknown_8h = reader.ReadUInt32(); - this.Unknown_Ch = reader.ReadUInt32(); - this.Unknown_10h = reader.ReadUInt32(); - this.Unknown_14h = reader.ReadUInt32(); - this.Unknown_18h = reader.ReadUInt32(); - this.Unknown_1Ch = reader.ReadUInt32(); - } - - 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_10h); - writer.Write(this.Unknown_14h); - writer.Write(this.Unknown_18h); - writer.Write(this.Unknown_1Ch); - } - } - - [TC(typeof(EXP))] public class ParticleUnknown_P_010 : ResourceSystemBlock - { - public override long BlockLength => 0x10; - - // structure data - public uint Unknown_0h { get; set; } - public uint Unknown_4h { get; set; } // 0x00000000 - public ulong Unknown_8h_Pointer { get; set; } - - // reference data - public ParticleUnknown_P_003 Unknown_8h_Data { get; set; } - - public override void Read(ResourceDataReader reader, params object[] parameters) - { - // read structure data - this.Unknown_0h = reader.ReadUInt32(); - this.Unknown_4h = reader.ReadUInt32(); - this.Unknown_8h_Pointer = reader.ReadUInt64(); - - // read reference data - this.Unknown_8h_Data = reader.ReadBlockAt( - this.Unknown_8h_Pointer // offset - ); - } - - public override void Write(ResourceDataWriter writer, params object[] parameters) - { - // update structure data - this.Unknown_8h_Pointer = (ulong)(this.Unknown_8h_Data != null ? this.Unknown_8h_Data.FilePosition : 0); - - // write structure data - writer.Write(this.Unknown_0h); - writer.Write(this.Unknown_4h); - writer.Write(this.Unknown_8h_Pointer); - } - - public override IResourceBlock[] GetReferences() - { - var list = new List(); - if (Unknown_8h_Data != null) list.Add(Unknown_8h_Data); - return list.ToArray(); - } - } - - - - // pgBase - // pgBaseRefCounted - // ptxEmitterRule [TC(typeof(EXP))] public class ParticleEmitterRule : ResourceSystemBlock { + // pgBase + // pgBaseRefCounted + // ptxEmitterRule public override long BlockLength => 0x630; // structure data public uint VFT { get; set; } - public uint Unknown_4h { get; set; } // 0x00000001 - public uint Unknown_8h { get; set; } // 0x00000000 - public uint Unknown_Ch { get; set; } // 0x00000000 - public uint Unknown_10h { get; set; } - public uint Unknown_14h { get; set; } // 0x00000000 - public uint Unknown_18h { get; set; } // 0x40833333 - public uint Unknown_1Ch { get; set; } // 0x00000000 + public uint Unknown_4h = 1; // 0x00000001 + public ulong Unknown_8h; // 0x0000000000000000 + public MetaHash Unknown_10h { get; set; } + public uint Unknown_14h; // 0x00000000 + public float Unknown_18h { get; set; } = 4.1f; // 0x40833333 4.1f + public uint Unknown_1Ch; // 0x00000000 public ulong NamePointer { get; set; } - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 - public uint Unknown_30h { get; set; } // 0x00000000 - public uint Unknown_34h { get; set; } // 0x00000000 - public ulong p2 { get; set; } - public uint Unknown_40h { get; set; } // 0x00000000 - public uint Unknown_44h { get; set; } // 0x00000000 - public ulong p3 { get; set; } - public uint Unknown_50h { get; set; } // 0x00000000 - public uint Unknown_54h { get; set; } // 0x00000000 - public ulong p4 { get; set; } - public uint Unknown_60h { get; set; } // 0x00000000 - public uint Unknown_64h { get; set; } // 0x00000000 - public uint Unknown_68h { get; set; } // 0x00000000 - public uint Unknown_6Ch { get; set; } // 0x00000000 - public uint Unknown_70h { get; set; } // 0x00000000 - public uint Unknown_74h { get; set; } // 0x00000000 - public ParticleKeyframeProp KeyframeProp0 { get; set; } - public ParticleKeyframeProp KeyframeProp1 { get; set; } - public ParticleKeyframeProp KeyframeProp2 { get; set; } - public ParticleKeyframeProp KeyframeProp3 { get; set; } - public ParticleKeyframeProp KeyframeProp4 { get; set; } - public ParticleKeyframeProp KeyframeProp5 { get; set; } - public ParticleKeyframeProp KeyframeProp6 { get; set; } - public ParticleKeyframeProp KeyframeProp7 { get; set; } - public ParticleKeyframeProp KeyframeProp8 { get; set; } - public ParticleKeyframeProp KeyframeProp9 { get; set; } - public ulong KeyframePropsPointer { get; set; } - public ushort KeyframePropsCount1 { get; set; } // 10 - public ushort KeyframePropsCount2 { get; set; } // 10 - public uint Unknown_624h { get; set; } // 0x00000000 - public uint Unknown_628h { get; set; } - public uint Unknown_62Ch { get; set; } // 0x00000000 + public ulong Unknown_28h; // 0x0000000000000000 + public ulong Unknown_30h; // 0x0000000000000000 + public ulong Domain1Pointer { get; set; } + public ulong Unknown_40h; // 0x0000000000000000 + public ulong Domain2Pointer { get; set; } + public ulong Unknown_50h; // 0x0000000000000000 + public ulong Domain3Pointer { get; set; } + public ulong Unknown_60h; // 0x0000000000000000 + public ulong Unknown_68h; // 0x0000000000000000 + public ulong Unknown_70h; // 0x0000000000000000 + public ParticleKeyframeProp[] KeyframeProps1 { get; set; } = new ParticleKeyframeProp[10]; + public ulong KeyframeProps2Pointer { get; set; } + public ushort KeyframePropsCount1 = 10; // 10 + public ushort KeyframePropsCount2 = 10; // 10 + public uint Unknown_624h; // 0x00000000 + public MetaHash Unknown_628h { get; set; } + public uint Unknown_62Ch; // 0x00000000 // reference data public string_r Name { get; set; } - public ParticleDomain p2data { get; set; } - public ParticleDomain p3data { get; set; } - public ParticleDomain p4data { get; set; } - public ResourcePointerArray64 KeyframeProps { get; set; } + public ParticleDomain Domain1 { get; set; } + public ParticleDomain Domain2 { get; set; } + public ParticleDomain Domain3 { get; set; } + public ResourcePointerArray64 KeyframeProps2 { get; set; } public override void Read(ResourceDataReader reader, params object[] parameters) { // read structure data this.VFT = reader.ReadUInt32(); this.Unknown_4h = reader.ReadUInt32(); - this.Unknown_8h = reader.ReadUInt32(); - this.Unknown_Ch = reader.ReadUInt32(); + this.Unknown_8h = reader.ReadUInt64(); this.Unknown_10h = reader.ReadUInt32(); this.Unknown_14h = reader.ReadUInt32(); - this.Unknown_18h = reader.ReadUInt32(); + this.Unknown_18h = reader.ReadSingle(); this.Unknown_1Ch = reader.ReadUInt32(); this.NamePointer = reader.ReadUInt64(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); - this.Unknown_30h = reader.ReadUInt32(); - this.Unknown_34h = reader.ReadUInt32(); - this.p2 = reader.ReadUInt64(); - this.Unknown_40h = reader.ReadUInt32(); - this.Unknown_44h = reader.ReadUInt32(); - this.p3 = reader.ReadUInt64(); - this.Unknown_50h = reader.ReadUInt32(); - this.Unknown_54h = reader.ReadUInt32(); - this.p4 = reader.ReadUInt64(); - this.Unknown_60h = reader.ReadUInt32(); - this.Unknown_64h = reader.ReadUInt32(); - this.Unknown_68h = reader.ReadUInt32(); - this.Unknown_6Ch = reader.ReadUInt32(); - this.Unknown_70h = reader.ReadUInt32(); - this.Unknown_74h = reader.ReadUInt32(); - this.KeyframeProp0 = reader.ReadBlock(); - this.KeyframeProp1 = reader.ReadBlock(); - this.KeyframeProp2 = reader.ReadBlock(); - this.KeyframeProp3 = reader.ReadBlock(); - this.KeyframeProp4 = reader.ReadBlock(); - this.KeyframeProp5 = reader.ReadBlock(); - this.KeyframeProp6 = reader.ReadBlock(); - this.KeyframeProp7 = reader.ReadBlock(); - this.KeyframeProp8 = reader.ReadBlock(); - this.KeyframeProp9 = reader.ReadBlock(); - this.KeyframePropsPointer = reader.ReadUInt64(); + this.Unknown_28h = reader.ReadUInt64(); + this.Unknown_30h = reader.ReadUInt64(); + this.Domain1Pointer = reader.ReadUInt64(); + this.Unknown_40h = reader.ReadUInt64(); + this.Domain2Pointer = reader.ReadUInt64(); + this.Unknown_50h = reader.ReadUInt64(); + this.Domain3Pointer = reader.ReadUInt64(); + this.Unknown_60h = reader.ReadUInt64(); + this.Unknown_68h = reader.ReadUInt64(); + this.Unknown_70h = reader.ReadUInt64(); + for (int i = 0; i < 10; i++) + { + this.KeyframeProps1[i] = reader.ReadBlock(); + } + this.KeyframeProps2Pointer = reader.ReadUInt64(); this.KeyframePropsCount1 = reader.ReadUInt16(); this.KeyframePropsCount2 = reader.ReadUInt16(); this.Unknown_624h = reader.ReadUInt32(); @@ -1744,72 +2008,90 @@ namespace CodeWalker.GameFiles this.Unknown_62Ch = reader.ReadUInt32(); // read reference data - this.Name = reader.ReadBlockAt( - this.NamePointer // offset - ); - this.p2data = reader.ReadBlockAt( - this.p2 // offset - ); - this.p3data = reader.ReadBlockAt( - this.p3 // offset - ); - this.p4data = reader.ReadBlockAt( - this.p4 // offset - ); - this.KeyframeProps = reader.ReadBlockAt>( - this.KeyframePropsPointer, // offset - this.KeyframePropsCount2 - ); - } + this.Name = reader.ReadBlockAt(this.NamePointer); + this.Domain1 = reader.ReadBlockAt(this.Domain1Pointer); + this.Domain2 = reader.ReadBlockAt(this.Domain2Pointer); + this.Domain3 = reader.ReadBlockAt(this.Domain3Pointer); + this.KeyframeProps2 = reader.ReadBlockAt>(this.KeyframeProps2Pointer, this.KeyframePropsCount2); + + if (Unknown_4h != 1) + { } + if (Unknown_8h != 0) + { } + switch (Unknown_10h) + { + default: + break; + } + if (Unknown_14h != 0) + { } + if (Unknown_18h != 4.1f) + { } + if (Unknown_1Ch != 0) + { } + if (Unknown_28h != 0) + { } + if (Unknown_30h != 0) + { } + if (Unknown_40h != 0) + { } + if (Unknown_50h != 0) + { } + if (Unknown_60h != 0) + { } + if (Unknown_68h != 0) + { } + if (Unknown_70h != 0) + { } + if (KeyframePropsCount1 != 10) + { } + if (KeyframePropsCount2 != 10) + { } + if (Unknown_624h != 0) + { } + switch (Unknown_628h) + { + default: + break; + } + if (Unknown_62Ch != 0) + { } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { // update structure data this.NamePointer = (ulong)(this.Name != null ? this.Name.FilePosition : 0); - this.p2 = (ulong)(this.p2data != null ? this.p2data.FilePosition : 0); - this.p3 = (ulong)(this.p3data != null ? this.p3data.FilePosition : 0); - this.p4 = (ulong)(this.p4data != null ? this.p4data.FilePosition : 0); - this.KeyframePropsPointer = (ulong)(this.KeyframeProps != null ? this.KeyframeProps.FilePosition : 0); + this.Domain1Pointer = (ulong)(this.Domain1 != null ? this.Domain1.FilePosition : 0); + this.Domain2Pointer = (ulong)(this.Domain2 != null ? this.Domain2.FilePosition : 0); + this.Domain3Pointer = (ulong)(this.Domain3 != null ? this.Domain3.FilePosition : 0); + this.KeyframeProps2Pointer = (ulong)(this.KeyframeProps2 != null ? this.KeyframeProps2.FilePosition : 0); //this.refcnt2 = (ushort)(this.refs != null ? this.refs.Count : 0); // write structure data writer.Write(this.VFT); writer.Write(this.Unknown_4h); writer.Write(this.Unknown_8h); - writer.Write(this.Unknown_Ch); writer.Write(this.Unknown_10h); writer.Write(this.Unknown_14h); writer.Write(this.Unknown_18h); writer.Write(this.Unknown_1Ch); writer.Write(this.NamePointer); writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); writer.Write(this.Unknown_30h); - writer.Write(this.Unknown_34h); - writer.Write(this.p2); + writer.Write(this.Domain1Pointer); writer.Write(this.Unknown_40h); - writer.Write(this.Unknown_44h); - writer.Write(this.p3); + writer.Write(this.Domain2Pointer); writer.Write(this.Unknown_50h); - writer.Write(this.Unknown_54h); - writer.Write(this.p4); + writer.Write(this.Domain3Pointer); writer.Write(this.Unknown_60h); - writer.Write(this.Unknown_64h); writer.Write(this.Unknown_68h); - writer.Write(this.Unknown_6Ch); writer.Write(this.Unknown_70h); - writer.Write(this.Unknown_74h); - writer.WriteBlock(this.KeyframeProp0); - writer.WriteBlock(this.KeyframeProp1); - writer.WriteBlock(this.KeyframeProp2); - writer.WriteBlock(this.KeyframeProp3); - writer.WriteBlock(this.KeyframeProp4); - writer.WriteBlock(this.KeyframeProp5); - writer.WriteBlock(this.KeyframeProp6); - writer.WriteBlock(this.KeyframeProp7); - writer.WriteBlock(this.KeyframeProp8); - writer.WriteBlock(this.KeyframeProp9); - writer.Write(this.KeyframePropsPointer); + for (int i = 0; i < 10; i++) + { + writer.WriteBlock(this.KeyframeProps1[i]); + } + writer.Write(this.KeyframeProps2Pointer); writer.Write(this.KeyframePropsCount1); writer.Write(this.KeyframePropsCount2); writer.Write(this.Unknown_624h); @@ -1821,58 +2103,340 @@ namespace CodeWalker.GameFiles { var list = new List(); if (Name != null) list.Add(Name); - if (p2data != null) list.Add(p2data); - if (p3data != null) list.Add(p3data); - if (p4data != null) list.Add(p4data); - if (KeyframeProps != null) list.Add(KeyframeProps); + if (Domain1 != null) list.Add(Domain1); + if (Domain2 != null) list.Add(Domain2); + if (Domain3 != null) list.Add(Domain3); + if (KeyframeProps2 != null) list.Add(KeyframeProps2); return list.ToArray(); } public override Tuple[] GetParts() { return new Tuple[] { - new Tuple(120, KeyframeProp0), - new Tuple(264, KeyframeProp1), - new Tuple(408, KeyframeProp2), - new Tuple(552, KeyframeProp3), - new Tuple(696, KeyframeProp4), - new Tuple(840, KeyframeProp5), - new Tuple(984, KeyframeProp6), - new Tuple(1128, KeyframeProp7), - new Tuple(1272, KeyframeProp8), - new Tuple(1416, KeyframeProp9), + new Tuple(120, KeyframeProps1[0]), + new Tuple(264, KeyframeProps1[1]), + new Tuple(408, KeyframeProps1[2]), + new Tuple(552, KeyframeProps1[3]), + new Tuple(696, KeyframeProps1[4]), + new Tuple(840, KeyframeProps1[5]), + new Tuple(984, KeyframeProps1[6]), + new Tuple(1128, KeyframeProps1[7]), + new Tuple(1272, KeyframeProps1[8]), + new Tuple(1416, KeyframeProps1[9]), }; } } - // datBase - // ptxDomain + + + + + + + + + + [TC(typeof(EXP))] public class ParticleUnknown1 : ResourceSystemBlock + { + public override long BlockLength => 0x40; + + // structure data + public ResourceSimpleList64 Unknown_0h { get; set; } + public ResourceSimpleList64 Unknown_10h { get; set; } + public ulong Unknown_20h = 1; // 0x0000000000000001 + public ResourceSimpleList64 Unknown_28h { get; set; } + public ulong Unknown_38h; // 0x0000000000000000 + + public override void Read(ResourceDataReader reader, params object[] parameters) + { + // read structure data + this.Unknown_0h = reader.ReadBlock>(); + this.Unknown_10h = reader.ReadBlock>(); + this.Unknown_20h = reader.ReadUInt64(); + this.Unknown_28h = reader.ReadBlock>(); + this.Unknown_38h = reader.ReadUInt64(); + + if (Unknown_20h != 1) + { } + if (Unknown_38h != 0) + { } + } + public override void Write(ResourceDataWriter writer, params object[] parameters) + { + // write structure data + writer.WriteBlock(this.Unknown_0h); + writer.WriteBlock(this.Unknown_10h); + writer.Write(this.Unknown_20h); + writer.WriteBlock(this.Unknown_28h); + writer.Write(this.Unknown_38h); + } + + public override Tuple[] GetParts() + { + return new Tuple[] { + new Tuple(0, Unknown_0h), + new Tuple(0x10, Unknown_10h), + new Tuple(0x28, Unknown_28h) + }; + } + } + + + [TC(typeof(EXP))] public class ParticleStringBlock : ResourceSystemBlock + { + public override long BlockLength => 24; + + // structure data + public ulong String1Pointer { get; set; } + public ulong Unknown_8h; // 0x0000000000000000 + public ulong Unknown_10h; // 0x0000000000000000 + + // reference data + public string_r String1 { get; set; } + + public override void Read(ResourceDataReader reader, params object[] parameters) + { + // read structure data + this.String1Pointer = reader.ReadUInt64(); + this.Unknown_8h = reader.ReadUInt64(); + this.Unknown_10h = reader.ReadUInt64(); + + // read reference data + this.String1 = reader.ReadBlockAt(this.String1Pointer); + + + if (Unknown_8h != 0) + { } + if (Unknown_10h != 0) + { } + } + + public override void Write(ResourceDataWriter writer, params object[] parameters) + { + // update structure data + this.String1Pointer = (ulong)(this.String1 != null ? this.String1.FilePosition : 0); + + // write structure data + writer.Write(this.String1Pointer); + writer.Write(this.Unknown_8h); + writer.Write(this.Unknown_10h); + } + + public override IResourceBlock[] GetReferences() + { + var list = new List(); + if (String1 != null) list.Add(String1); + return list.ToArray(); + } + } + + + [TC(typeof(EXP))] public class ParticleUnknown2Block : ResourceSystemBlock + { + public override long BlockLength => 0x10; + + // structure data + public MetaHash Unknown_0h { get; set; } + public uint Unknown_4h; // 0x00000000 + public ulong ItemPointer { get; set; } + + // reference data + public ParticleUnknown2 Item { get; set; } + + public override void Read(ResourceDataReader reader, params object[] parameters) + { + // read structure data + this.Unknown_0h = reader.ReadUInt32(); + this.Unknown_4h = reader.ReadUInt32(); + this.ItemPointer = reader.ReadUInt64(); + + // read reference data + this.Item = reader.ReadBlockAt(this.ItemPointer); + + switch (Unknown_0h) + { + default: + break; + } + if (Unknown_4h != 0) + { } + + } + + public override void Write(ResourceDataWriter writer, params object[] parameters) + { + // update structure data + this.ItemPointer = (ulong)(this.Item != null ? this.Item.FilePosition : 0); + + // write structure data + writer.Write(this.Unknown_0h); + writer.Write(this.Unknown_4h); + writer.Write(this.ItemPointer); + } + + public override IResourceBlock[] GetReferences() + { + var list = new List(); + if (Item != null) list.Add(Item); + return list.ToArray(); + } + } + + + [TC(typeof(EXP))] public class ParticleUnknown2 : ResourceSystemBlock + { + public override long BlockLength => 24; + + // structure data + public ResourceSimpleList64 Unknown_0h { get; set; } + public MetaHash Unknown_10h { get; set; } + public MetaHash Unknown_14h { get; set; } + + public override void Read(ResourceDataReader reader, params object[] parameters) + { + // read structure data + this.Unknown_0h = reader.ReadBlock>(); + this.Unknown_10h = reader.ReadUInt32(); + this.Unknown_14h = reader.ReadUInt32(); + } + + public override void Write(ResourceDataWriter writer, params object[] parameters) + { + // write structure data + writer.WriteBlock(this.Unknown_0h); + writer.Write(this.Unknown_10h); + writer.Write(this.Unknown_14h); + + switch (Unknown_10h) + { + default: + break; + } + switch (Unknown_14h) + { + default: + break; + } + } + + public override Tuple[] GetParts() + { + return new Tuple[] { + new Tuple(0, Unknown_0h) + }; + } + } + + + [TC(typeof(EXP))] public class ParticleUnknown3 : ResourceSystemBlock + { + public override long BlockLength => 0x30; + + // structure data + public ResourceSimpleList64 Unknown_0h { get; set; } + public ulong Unknown_10h; // 0x0000000000000000 + public ulong Unknown_18h; // 0x0000000000000000 + public MetaHash Unknown_20h { get; set; } + public MetaHash Unknown_24h { get; set; } + public ulong Unknown_28h; // 0x0000000000000000 + + public override void Read(ResourceDataReader reader, params object[] parameters) + { + // read structure data + this.Unknown_0h = reader.ReadBlock>(); + this.Unknown_10h = reader.ReadUInt64(); + this.Unknown_18h = reader.ReadUInt64(); + this.Unknown_20h = reader.ReadUInt32(); + this.Unknown_24h = reader.ReadUInt32(); + this.Unknown_28h = reader.ReadUInt64(); + + if (Unknown_10h != 0) + { } + if (Unknown_18h != 0) + { } + switch (Unknown_20h) + { + default: + break; + } + switch (Unknown_24h) + { + default: + break; + } + if (Unknown_28h != 0) + { } + } + + public override void Write(ResourceDataWriter writer, params object[] parameters) + { + // write structure data + writer.WriteBlock(this.Unknown_0h); + writer.Write(this.Unknown_10h); + writer.Write(this.Unknown_18h); + writer.Write(this.Unknown_20h); + writer.Write(this.Unknown_24h); + writer.Write(this.Unknown_28h); + } + + public override Tuple[] GetParts() + { + return new Tuple[] { + new Tuple(0, Unknown_0h) + }; + } + } + + + + + + + + + + + + + + + + + + public enum ParticleDomainType : byte + { + Box = 0, + Sphere = 1, + Cylinder = 2, + Attractor = 3, + } + [TC(typeof(EXP))] public class ParticleDomain : ResourceSystemBlock, IResourceXXSystemBlock { + // datBase + // ptxDomain public override long BlockLength => 0x280; // structure data public uint VFT { get; set; } - public uint Unknown_4h { get; set; } // 0x00000001 - public uint Unknown_8h { get; set; } - public byte Unknown_Ch { get; set; } + public uint Unknown_4h = 1; // 0x00000001 + public MetaHash Unknown_8h { get; set; } + public ParticleDomainType DomainType { get; set; } public byte Unknown_Dh { get; set; } public ushort Unknown_Eh { get; set; } - public uint Unknown_10h { get; set; } - public uint Unknown_14h { get; set; } // 0x00000000 + public MetaHash Unknown_10h { get; set; } + public uint Unknown_14h; // 0x00000000 public ParticleKeyframeProp KeyframeProp0 { get; set; } public ParticleKeyframeProp KeyframeProp1 { get; set; } public ParticleKeyframeProp KeyframeProp2 { get; set; } public ParticleKeyframeProp KeyframeProp3 { get; set; } - public uint Unknown_258h { get; set; } - public uint Unknown_25Ch { get; set; } // 0x00000000 + public MetaHash Unknown_258h { get; set; } + public uint Unknown_25Ch; // 0x00000000 public ResourcePointerList64 KeyframeProps { get; set; } - public uint Unknown_270h { get; set; } // 0x00000000 - public uint Unknown_274h { get; set; } // 0x00000000 - public uint Unknown_278h { get; set; } // 0x00000000 - public uint Unknown_27Ch { get; set; } // 0x00000000 + public ulong Unknown_270h; // 0x0000000000000000 + public ulong Unknown_278h; // 0x0000000000000000 public override void Read(ResourceDataReader reader, params object[] parameters) { @@ -1880,7 +2444,7 @@ namespace CodeWalker.GameFiles this.VFT = reader.ReadUInt32(); this.Unknown_4h = reader.ReadUInt32(); this.Unknown_8h = reader.ReadUInt32(); - this.Unknown_Ch = reader.ReadByte(); + this.DomainType = (ParticleDomainType)reader.ReadByte(); this.Unknown_Dh = reader.ReadByte(); this.Unknown_Eh = reader.ReadUInt16(); this.Unknown_10h = reader.ReadUInt32(); @@ -1892,19 +2456,53 @@ namespace CodeWalker.GameFiles this.Unknown_258h = reader.ReadUInt32(); this.Unknown_25Ch = reader.ReadUInt32(); this.KeyframeProps = reader.ReadBlock>(); - this.Unknown_270h = reader.ReadUInt32(); - this.Unknown_274h = reader.ReadUInt32(); - this.Unknown_278h = reader.ReadUInt32(); - this.Unknown_27Ch = reader.ReadUInt32(); - } + this.Unknown_270h = reader.ReadUInt64(); + this.Unknown_278h = reader.ReadUInt64(); + if (Unknown_4h != 1) + { } + switch (Unknown_8h) + { + default: + break; + } + switch (Unknown_Dh) + { + default: + break; + } + switch (Unknown_Eh) + { + default: + break; + } + switch (Unknown_10h) + { + default: + break; + } + if (Unknown_14h != 0) + { } + switch (Unknown_258h) + { + default: + break; + } + if (Unknown_25Ch != 0) + { } + if (Unknown_270h != 0) + { } + if (Unknown_278h != 0) + { } + + } public override void Write(ResourceDataWriter writer, params object[] parameters) { // write structure data writer.Write(this.VFT); writer.Write(this.Unknown_4h); writer.Write(this.Unknown_8h); - writer.Write(this.Unknown_Ch); + writer.Write((byte)this.DomainType); writer.Write(this.Unknown_Dh); writer.Write(this.Unknown_Eh); writer.Write(this.Unknown_10h); @@ -1917,9 +2515,7 @@ namespace CodeWalker.GameFiles writer.Write(this.Unknown_25Ch); writer.WriteBlock(this.KeyframeProps); writer.Write(this.Unknown_270h); - writer.Write(this.Unknown_274h); writer.Write(this.Unknown_278h); - writer.Write(this.Unknown_27Ch); } public override Tuple[] GetParts() @@ -1936,182 +2532,44 @@ namespace CodeWalker.GameFiles public IResourceSystemBlock GetType(ResourceDataReader reader, params object[] parameters) { reader.Position += 12; - byte type = reader.ReadByte(); + var type = (ParticleDomainType)reader.ReadByte(); reader.Position -= 13; switch (type) { - case 0: return new ParticleDomainBox(); - case 1: return new ParticleDomainSphere(); - case 2: return new ParticleDomainCylinder(); - case 3: return new ParticleDomainAttractor(); + case ParticleDomainType.Box: return new ParticleDomainBox(); + case ParticleDomainType.Sphere: return new ParticleDomainSphere(); + case ParticleDomainType.Cylinder: return new ParticleDomainCylinder(); + case ParticleDomainType.Attractor: return new ParticleDomainAttractor(); default: return null;// throw new Exception("Unknown domain type"); } } } - // ptxDomainBox [TC(typeof(EXP))] public class ParticleDomainBox : ParticleDomain - { } + { + // ptxDomainBox + } - // ptxDomainSphere [TC(typeof(EXP))] public class ParticleDomainSphere : ParticleDomain - { } + { + // ptxDomainSphere + } - // ptxDomainCylinder [TC(typeof(EXP))] public class ParticleDomainCylinder : ParticleDomain - { } + { + // ptxDomainCylinder + } - // ptxDomainAttractor [TC(typeof(EXP))] public class ParticleDomainAttractor : ParticleDomain - { } - - - - - - - [TC(typeof(EXP))] public class ParticleUnknown_P_004 : ResourceSystemBlock { - public override long BlockLength => 0x40; - - // structure data - public ResourceSimpleList64 Unknown_0h { get; set; } - public ResourceSimpleList64 Unknown_10h { get; set; } - public uint Unknown_20h { get; set; } // 0x00000001 - public uint Unknown_24h { get; set; } // 0x00000000 - public ResourceSimpleList64 Unknown_28h { get; set; } - public uint Unknown_38h { get; set; } // 0x00000000 - public uint Unknown_3Ch { get; set; } // 0x00000000 - - public override void Read(ResourceDataReader reader, params object[] parameters) - { - // read structure data - this.Unknown_0h = reader.ReadBlock>(); - this.Unknown_10h = reader.ReadBlock>(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadBlock>(); - this.Unknown_38h = reader.ReadUInt32(); - this.Unknown_3Ch = reader.ReadUInt32(); - } - - public override void Write(ResourceDataWriter writer, params object[] parameters) - { - // write structure data - writer.WriteBlock(this.Unknown_0h); - writer.WriteBlock(this.Unknown_10h); - writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); - writer.WriteBlock(this.Unknown_28h); - writer.Write(this.Unknown_38h); - writer.Write(this.Unknown_3Ch); - } - - public override Tuple[] GetParts() - { - return new Tuple[] { - new Tuple(0, Unknown_0h), - new Tuple(0x10, Unknown_10h), - new Tuple(0x28, Unknown_28h) - }; - } + // ptxDomainAttractor } - [TC(typeof(EXP))] public class ParticleUnknown_P_002 : ResourceSystemBlock - { - public override long BlockLength => 24; - // structure data - public ulong p1 { get; set; } - 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 - // reference data - public string_r p1data { get; set; } - public override void Read(ResourceDataReader reader, params object[] parameters) - { - // read structure data - this.p1 = reader.ReadUInt64(); - this.Unknown_8h = reader.ReadUInt32(); - this.Unknown_Ch = reader.ReadUInt32(); - this.Unknown_10h = reader.ReadUInt32(); - this.Unknown_14h = reader.ReadUInt32(); - - // read reference data - this.p1data = reader.ReadBlockAt( - this.p1 // offset - ); - } - - public override void Write(ResourceDataWriter writer, params object[] parameters) - { - // update structure data - this.p1 = (ulong)(this.p1data != null ? this.p1data.FilePosition : 0); - - // write structure data - writer.Write(this.p1); - writer.Write(this.Unknown_8h); - writer.Write(this.Unknown_Ch); - writer.Write(this.Unknown_10h); - writer.Write(this.Unknown_14h); - } - - public override IResourceBlock[] GetReferences() - { - var list = new List(); - if (p1data != null) list.Add(p1data); - return list.ToArray(); - } - } - - [TC(typeof(EXP))] public class ParticleUnknown_P_007 : ResourceSystemBlock - { - public override long BlockLength => 0x10; - - // structure data - public uint Unknown_0h { get; set; } - public uint Unknown_4h { get; set; } // 0x00000000 - public ulong p1 { get; set; } - - // reference data - public ParticleUnknown_P_003 p1data { get; set; } - - public override void Read(ResourceDataReader reader, params object[] parameters) - { - // read structure data - this.Unknown_0h = reader.ReadUInt32(); - this.Unknown_4h = reader.ReadUInt32(); - this.p1 = reader.ReadUInt64(); - - // read reference data - this.p1data = reader.ReadBlockAt( - this.p1 // offset - ); - } - - public override void Write(ResourceDataWriter writer, params object[] parameters) - { - // update structure data - this.p1 = (ulong)(this.p1data != null ? this.p1data.FilePosition : 0); - - // write structure data - writer.Write(this.Unknown_0h); - writer.Write(this.Unknown_4h); - writer.Write(this.p1); - } - - public override IResourceBlock[] GetReferences() - { - var list = new List(); - if (p1data != null) list.Add(p1data); - return list.ToArray(); - } - } @@ -2149,32 +2607,36 @@ namespace CodeWalker.GameFiles Liquid = 0xDF229542 } - // ptxBehaviour [TC(typeof(EXP))] public class ParticleBehaviour : ResourceSystemBlock, IResourceXXSystemBlock { + // ptxBehaviour public override long BlockLength => 0x10; // structure data public uint VFT { get; set; } - public uint Unknown_4h { get; set; } // 0x00000001 - public uint Type { get; set; } - public uint Unknown_Ch { get; set; } // 0x00000000 + public uint Unknown_4h = 1; // 0x00000001 + public ParticleBehaviourType Type { get; set; } + public uint Unknown_Ch; // 0x00000000 public override void Read(ResourceDataReader reader, params object[] parameters) { // read structure data this.VFT = reader.ReadUInt32(); this.Unknown_4h = reader.ReadUInt32(); - this.Type = reader.ReadUInt32(); + this.Type = (ParticleBehaviourType)reader.ReadUInt32(); this.Unknown_Ch = reader.ReadUInt32(); - } + if (Unknown_4h != 1) + { } + if (Unknown_Ch != 0) + { } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { // write structure data writer.Write(this.VFT); writer.Write(this.Unknown_4h); - writer.Write(this.Type); + writer.Write((uint)this.Type); writer.Write(this.Unknown_Ch); } @@ -2215,73 +2677,64 @@ namespace CodeWalker.GameFiles } } - // ptxu_Age [TC(typeof(EXP))] public class ParticleBehaviourAge : ParticleBehaviour { + // ptxu_Age public override long BlockLength => 0x30; // structure data - 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 uint Unknown_20h { get; set; } // 0x00000000 - public uint Unknown_24h { get; set; } // 0x00000000 - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 + public ulong Unknown_10h; // 0x0000000000000000 + public ulong Unknown_18h; // 0x0000000000000000 + public ulong Unknown_20h; // 0x0000000000000000 + public ulong Unknown_28h; // 0x0000000000000000 public override void Read(ResourceDataReader reader, params object[] parameters) { base.Read(reader, parameters); // read structure data - this.Unknown_10h = reader.ReadUInt32(); - this.Unknown_14h = reader.ReadUInt32(); - this.Unknown_18h = reader.ReadUInt32(); - this.Unknown_1Ch = reader.ReadUInt32(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); - } + this.Unknown_10h = reader.ReadUInt64(); + this.Unknown_18h = reader.ReadUInt64(); + this.Unknown_20h = reader.ReadUInt64(); + this.Unknown_28h = reader.ReadUInt64(); + if (Unknown_10h != 0) + { } + if (Unknown_18h != 0) + { } + if (Unknown_20h != 0) + { } + if (Unknown_28h != 0) + { } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { base.Write(writer, parameters); // write structure data writer.Write(this.Unknown_10h); - writer.Write(this.Unknown_14h); writer.Write(this.Unknown_18h); - writer.Write(this.Unknown_1Ch); writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); } } - // ptxu_Acceleration [TC(typeof(EXP))] public class ParticleBehaviourAcceleration : ParticleBehaviour { + // ptxu_Acceleration public override long BlockLength => 0x170; // structure data public ResourcePointerList64 KeyframeProps { get; set; } - public uint Unknown_20h { get; set; } // 0x00000000 - public uint Unknown_24h { get; set; } // 0x00000000 - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 + public ulong Unknown_20h; // 0x0000000000000000 + public ulong Unknown_28h; // 0x0000000000000000 public ParticleKeyframeProp KeyframeProp0 { get; set; } public ParticleKeyframeProp KeyframeProp1 { get; set; } - public uint Unknown_150h { get; set; } // 0x00000000 - public uint Unknown_154h { get; set; } // 0x00000000 - public uint Unknown_158h { get; set; } - public uint Unknown_15Ch { get; set; } - public uint Unknown_160h { get; set; } // 0x00000000 - public uint Unknown_164h { get; set; } // 0x00000000 - public uint Unknown_168h { get; set; } // 0x00000000 - public uint Unknown_16Ch { get; set; } // 0x00000000 + public ulong Unknown_150h; // 0x0000000000000000 + public MetaHash Unknown_158h { get; set; } + public MetaHash Unknown_15Ch { get; set; } + public ulong Unknown_160h; // 0x0000000000000000 + public ulong Unknown_168h; // 0x0000000000000000 public override void Read(ResourceDataReader reader, params object[] parameters) { @@ -2289,22 +2742,37 @@ namespace CodeWalker.GameFiles // read structure data this.KeyframeProps = reader.ReadBlock>(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); + this.Unknown_20h = reader.ReadUInt64(); + this.Unknown_28h = reader.ReadUInt64(); this.KeyframeProp0 = reader.ReadBlock(); this.KeyframeProp1 = reader.ReadBlock(); - this.Unknown_150h = reader.ReadUInt32(); - this.Unknown_154h = reader.ReadUInt32(); + this.Unknown_150h = reader.ReadUInt64(); this.Unknown_158h = reader.ReadUInt32(); this.Unknown_15Ch = reader.ReadUInt32(); - this.Unknown_160h = reader.ReadUInt32(); - this.Unknown_164h = reader.ReadUInt32(); - this.Unknown_168h = reader.ReadUInt32(); - this.Unknown_16Ch = reader.ReadUInt32(); - } + this.Unknown_160h = reader.ReadUInt64(); + this.Unknown_168h = reader.ReadUInt64(); + if (Unknown_20h != 0) + { } + if (Unknown_28h != 0) + { } + if (Unknown_150h != 0) + { } + switch (Unknown_158h) + { + default: + break; + } + switch (Unknown_15Ch) + { + default: + break; + } + if (Unknown_160h != 0) + { } + if (Unknown_168h != 0) + { } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { base.Write(writer, parameters); @@ -2312,19 +2780,14 @@ namespace CodeWalker.GameFiles // write structure data writer.WriteBlock(this.KeyframeProps); writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); writer.WriteBlock(this.KeyframeProp0); writer.WriteBlock(this.KeyframeProp1); writer.Write(this.Unknown_150h); - writer.Write(this.Unknown_154h); writer.Write(this.Unknown_158h); writer.Write(this.Unknown_15Ch); writer.Write(this.Unknown_160h); - writer.Write(this.Unknown_164h); writer.Write(this.Unknown_168h); - writer.Write(this.Unknown_16Ch); } public override Tuple[] GetParts() @@ -2337,71 +2800,66 @@ namespace CodeWalker.GameFiles } } - // ptxu_Velocity [TC(typeof(EXP))] public class ParticleBehaviourVelocity : ParticleBehaviour { + // ptxu_Velocity public override long BlockLength => 0x30; // structure data - 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 uint Unknown_20h { get; set; } // 0x00000000 - public uint Unknown_24h { get; set; } // 0x00000000 - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 + public ulong Unknown_10h; // 0x0000000000000000 + public ulong Unknown_18h; // 0x0000000000000000 + public ulong Unknown_20h; // 0x0000000000000000 + public ulong Unknown_28h; // 0x0000000000000000 public override void Read(ResourceDataReader reader, params object[] parameters) { base.Read(reader, parameters); // read structure data - this.Unknown_10h = reader.ReadUInt32(); - this.Unknown_14h = reader.ReadUInt32(); - this.Unknown_18h = reader.ReadUInt32(); - this.Unknown_1Ch = reader.ReadUInt32(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); - } + this.Unknown_10h = reader.ReadUInt64(); + this.Unknown_18h = reader.ReadUInt64(); + this.Unknown_20h = reader.ReadUInt64(); + this.Unknown_28h = reader.ReadUInt64(); + if (Unknown_10h != 0) + { } + if (Unknown_18h != 0) + { } + if (Unknown_20h != 0) + { } + if (Unknown_28h != 0) + { } + + } public override void Write(ResourceDataWriter writer, params object[] parameters) { base.Write(writer, parameters); // write structure data writer.Write(this.Unknown_10h); - writer.Write(this.Unknown_14h); writer.Write(this.Unknown_18h); - writer.Write(this.Unknown_1Ch); writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); } } - // ptxu_Rotation [TC(typeof(EXP))] public class ParticleBehaviourRotation : ParticleBehaviour { + // ptxu_Rotation public override long BlockLength => 0x280; // structure data public ResourcePointerList64 KeyframeProps { get; set; } - public uint Unknown_20h { get; set; } // 0x00000000 - public uint Unknown_24h { get; set; } // 0x00000000 - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 + public ulong Unknown_20h; // 0x0000000000000000 + public ulong Unknown_28h; // 0x0000000000000000 public ParticleKeyframeProp KeyframeProp0 { get; set; } public ParticleKeyframeProp KeyframeProp1 { get; set; } public ParticleKeyframeProp KeyframeProp2 { get; set; } public ParticleKeyframeProp KeyframeProp3 { get; set; } - public uint Unknown_270h { get; set; } - public uint Unknown_274h { get; set; } - public uint Unknown_278h { get; set; } - public uint Unknown_27Ch { get; set; } + public MetaHash Unknown_270h { get; set; } + public MetaHash Unknown_274h { get; set; } + public MetaHash Unknown_278h { get; set; } + public MetaHash Unknown_27Ch { get; set; } public override void Read(ResourceDataReader reader, params object[] parameters) { @@ -2409,10 +2867,8 @@ namespace CodeWalker.GameFiles // read structure data this.KeyframeProps = reader.ReadBlock>(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); + this.Unknown_20h = reader.ReadUInt64(); + this.Unknown_28h = reader.ReadUInt64(); this.KeyframeProp0 = reader.ReadBlock(); this.KeyframeProp1 = reader.ReadBlock(); this.KeyframeProp2 = reader.ReadBlock(); @@ -2421,8 +2877,33 @@ namespace CodeWalker.GameFiles this.Unknown_274h = reader.ReadUInt32(); this.Unknown_278h = reader.ReadUInt32(); this.Unknown_27Ch = reader.ReadUInt32(); - } + if (Unknown_20h != 0) + { } + if (Unknown_28h != 0) + { } + switch (Unknown_270h) + { + default: + break; + } + switch (Unknown_274h) + { + default: + break; + } + switch (Unknown_278h) + { + default: + break; + } + switch (Unknown_27Ch) + { + default: + break; + } + + } public override void Write(ResourceDataWriter writer, params object[] parameters) { base.Write(writer, parameters); @@ -2430,9 +2911,7 @@ namespace CodeWalker.GameFiles // write structure data writer.WriteBlock(this.KeyframeProps); writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); writer.WriteBlock(this.KeyframeProp0); writer.WriteBlock(this.KeyframeProp1); writer.WriteBlock(this.KeyframeProp2); @@ -2455,25 +2934,22 @@ namespace CodeWalker.GameFiles } } - // ptxu_Size [TC(typeof(EXP))] public class ParticleBehaviourSize : ParticleBehaviour { + // ptxu_Size public override long BlockLength => 0x280; // structure data public ResourcePointerList64 KeyframeProps { get; set; } - public uint Unknown_20h { get; set; } // 0x00000000 - public uint Unknown_24h { get; set; } // 0x00000000 - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 + public ulong Unknown_20h; // 0x0000000000000000 + public ulong Unknown_28h; // 0x0000000000000000 public ParticleKeyframeProp KeyframeProp0 { get; set; } public ParticleKeyframeProp KeyframeProp1 { get; set; } public ParticleKeyframeProp KeyframeProp2 { get; set; } public ParticleKeyframeProp KeyframeProp3 { get; set; } - public uint Unknown_270h { get; set; } - public uint Unknown_274h { get; set; } - public uint Unknown_278h { get; set; } // 0x00000000 - public uint Unknown_27Ch { get; set; } // 0x00000000 + public MetaHash Unknown_270h { get; set; } + public MetaHash Unknown_274h { get; set; } + public ulong Unknown_278h; // 0x0000000000000000 public override void Read(ResourceDataReader reader, params object[] parameters) { @@ -2481,20 +2957,33 @@ namespace CodeWalker.GameFiles // read structure data this.KeyframeProps = reader.ReadBlock>(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); + this.Unknown_20h = reader.ReadUInt64(); + this.Unknown_28h = reader.ReadUInt64(); this.KeyframeProp0 = reader.ReadBlock(); this.KeyframeProp1 = reader.ReadBlock(); this.KeyframeProp2 = reader.ReadBlock(); this.KeyframeProp3 = reader.ReadBlock(); this.Unknown_270h = reader.ReadUInt32(); this.Unknown_274h = reader.ReadUInt32(); - this.Unknown_278h = reader.ReadUInt32(); - this.Unknown_27Ch = reader.ReadUInt32(); - } + this.Unknown_278h = reader.ReadUInt64(); + if (Unknown_20h != 0) + { } + if (Unknown_28h != 0) + { } + switch (Unknown_270h) + { + default: + break; + } + switch (Unknown_274h) + { + default: + break; + } + if (Unknown_278h != 0) + { } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { base.Write(writer, parameters); @@ -2502,9 +2991,7 @@ namespace CodeWalker.GameFiles // write structure data writer.WriteBlock(this.KeyframeProps); writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); writer.WriteBlock(this.KeyframeProp0); writer.WriteBlock(this.KeyframeProp1); writer.WriteBlock(this.KeyframeProp2); @@ -2512,7 +2999,6 @@ namespace CodeWalker.GameFiles writer.Write(this.Unknown_270h); writer.Write(this.Unknown_274h); writer.Write(this.Unknown_278h); - writer.Write(this.Unknown_27Ch); } public override Tuple[] GetParts() @@ -2527,27 +3013,22 @@ namespace CodeWalker.GameFiles } } - // ptxu_Dampening [TC(typeof(EXP))] public class ParticleBehaviourDampening : ParticleBehaviour { + // ptxu_Dampening public override long BlockLength => 0x170; // structure data public ResourcePointerList64 KeyframeProps { get; set; } - public uint Unknown_20h { get; set; } // 0x00000000 - public uint Unknown_24h { get; set; } // 0x00000000 - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 + public ulong Unknown_20h; // 0x0000000000000000 + public ulong Unknown_28h; // 0x0000000000000000 public ParticleKeyframeProp KeyframeProp0 { get; set; } public ParticleKeyframeProp KeyframeProp1 { get; set; } - public uint Unknown_150h { get; set; } // 0x00000000 - public uint Unknown_154h { get; set; } // 0x00000000 - public uint Unknown_158h { get; set; } - public uint Unknown_15Ch { get; set; } // 0x00000000 - public uint Unknown_160h { get; set; } // 0x00000000 - public uint Unknown_164h { get; set; } // 0x00000000 - public uint Unknown_168h { get; set; } // 0x00000000 - public uint Unknown_16Ch { get; set; } // 0x00000000 + public ulong Unknown_150h; // 0x0000000000000000 + public MetaHash Unknown_158h { get; set; } + public uint Unknown_15Ch; // 0x00000000 + public ulong Unknown_160h; // 0x0000000000000000 + public ulong Unknown_168h; // 0x0000000000000000 public override void Read(ResourceDataReader reader, params object[] parameters) { @@ -2555,22 +3036,34 @@ namespace CodeWalker.GameFiles // read structure data this.KeyframeProps = reader.ReadBlock>(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); + this.Unknown_20h = reader.ReadUInt64(); + this.Unknown_28h = reader.ReadUInt64(); this.KeyframeProp0 = reader.ReadBlock(); this.KeyframeProp1 = reader.ReadBlock(); - this.Unknown_150h = reader.ReadUInt32(); - this.Unknown_154h = reader.ReadUInt32(); + this.Unknown_150h = reader.ReadUInt64(); this.Unknown_158h = reader.ReadUInt32(); this.Unknown_15Ch = reader.ReadUInt32(); - this.Unknown_160h = reader.ReadUInt32(); - this.Unknown_164h = reader.ReadUInt32(); - this.Unknown_168h = reader.ReadUInt32(); - this.Unknown_16Ch = reader.ReadUInt32(); - } + this.Unknown_160h = reader.ReadUInt64(); + this.Unknown_168h = reader.ReadUInt64(); + if (Unknown_20h != 0) + { } + if (Unknown_28h != 0) + { } + if (Unknown_150h != 0) + { } + switch (Unknown_158h) + { + default: + break; + } + if (Unknown_15Ch != 0) + { } + if (Unknown_160h != 0) + { } + if (Unknown_168h != 0) + { } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { base.Write(writer, parameters); @@ -2578,19 +3071,14 @@ namespace CodeWalker.GameFiles // write structure data writer.WriteBlock(this.KeyframeProps); writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); writer.WriteBlock(this.KeyframeProp0); writer.WriteBlock(this.KeyframeProp1); writer.Write(this.Unknown_150h); - writer.Write(this.Unknown_154h); writer.Write(this.Unknown_158h); writer.Write(this.Unknown_15Ch); writer.Write(this.Unknown_160h); - writer.Write(this.Unknown_164h); writer.Write(this.Unknown_168h); - writer.Write(this.Unknown_16Ch); } public override Tuple[] GetParts() @@ -2603,22 +3091,19 @@ namespace CodeWalker.GameFiles } } - // ptxu_MatrixWeight [TC(typeof(EXP))] public class ParticleBehaviourMatrixWeight : ParticleBehaviour { + // ptxu_MatrixWeight public override long BlockLength => 0xD0; // structure data public ResourcePointerList64 KeyframeProps { get; set; } - public uint Unknown_20h { get; set; } // 0x00000000 - public uint Unknown_24h { get; set; } // 0x00000000 - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 + public ulong Unknown_20h; // 0x0000000000000000 + public ulong Unknown_28h; // 0x0000000000000000 public ParticleKeyframeProp KeyframeProp0 { get; set; } - public uint Unknown_C0h { get; set; } - public uint Unknown_C4h { get; set; } // 0x00000000 - public uint Unknown_C8h { get; set; } // 0x00000000 - public uint Unknown_CCh { get; set; } // 0x00000000 + public MetaHash Unknown_C0h { get; set; } + public uint Unknown_C4h; // 0x00000000 + public ulong Unknown_C8h; // 0x0000000000000000 public override void Read(ResourceDataReader reader, params object[] parameters) { @@ -2626,17 +3111,28 @@ namespace CodeWalker.GameFiles // read structure data this.KeyframeProps = reader.ReadBlock>(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); + this.Unknown_20h = reader.ReadUInt64(); + this.Unknown_28h = reader.ReadUInt64(); this.KeyframeProp0 = reader.ReadBlock(); this.Unknown_C0h = reader.ReadUInt32(); this.Unknown_C4h = reader.ReadUInt32(); - this.Unknown_C8h = reader.ReadUInt32(); - this.Unknown_CCh = reader.ReadUInt32(); - } + this.Unknown_C8h = reader.ReadUInt64(); + + if (Unknown_20h != 0) + { } + if (Unknown_28h != 0) + { } + switch (Unknown_C0h) + { + default: + break; + } + if (Unknown_C4h != 0) + { } + if (Unknown_C8h != 0) + { } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { base.Write(writer, parameters); @@ -2644,14 +3140,11 @@ namespace CodeWalker.GameFiles // write structure data writer.WriteBlock(this.KeyframeProps); writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); writer.WriteBlock(this.KeyframeProp0); writer.Write(this.Unknown_C0h); writer.Write(this.Unknown_C4h); writer.Write(this.Unknown_C8h); - writer.Write(this.Unknown_CCh); } public override Tuple[] GetParts() @@ -2663,27 +3156,23 @@ namespace CodeWalker.GameFiles } } - // ptxu_Collision [TC(typeof(EXP))] public class ParticleBehaviourCollision : ParticleBehaviour { + // ptxu_Collision public override long BlockLength => 0x170; // structure data public ResourcePointerList64 KeyframeProps { get; set; } - public uint Unknown_20h { get; set; } // 0x00000000 - public uint Unknown_24h { get; set; } // 0x00000000 - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 + public ulong Unknown_20h; // 0x0000000000000000 + public ulong Unknown_28h; // 0x0000000000000000 public ParticleKeyframeProp KeyframeProp0 { get; set; } public ParticleKeyframeProp KeyframeProp1 { get; set; } - public uint Unknown_150h { get; set; } - public uint Unknown_154h { get; set; } - public uint Unknown_158h { get; set; } - public uint Unknown_15Ch { get; set; } - public uint Unknown_160h { get; set; } // 0x00000000 - public uint Unknown_164h { get; set; } // 0x00000000 - public uint Unknown_168h { get; set; } // 0x00000000 - public uint Unknown_16Ch { get; set; } // 0x00000000 + public MetaHash Unknown_150h { get; set; } + public MetaHash Unknown_154h { get; set; } + public MetaHash Unknown_158h { get; set; } + public MetaHash Unknown_15Ch { get; set; } + public ulong Unknown_160h; // 0x0000000000000000 + public ulong Unknown_168h; // 0x0000000000000000 public override void Read(ResourceDataReader reader, params object[] parameters) { @@ -2691,22 +3180,46 @@ namespace CodeWalker.GameFiles // read structure data this.KeyframeProps = reader.ReadBlock>(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); + this.Unknown_20h = reader.ReadUInt64(); + this.Unknown_28h = reader.ReadUInt64(); this.KeyframeProp0 = reader.ReadBlock(); this.KeyframeProp1 = reader.ReadBlock(); this.Unknown_150h = reader.ReadUInt32(); this.Unknown_154h = reader.ReadUInt32(); this.Unknown_158h = reader.ReadUInt32(); this.Unknown_15Ch = reader.ReadUInt32(); - this.Unknown_160h = reader.ReadUInt32(); - this.Unknown_164h = reader.ReadUInt32(); - this.Unknown_168h = reader.ReadUInt32(); - this.Unknown_16Ch = reader.ReadUInt32(); - } + this.Unknown_160h = reader.ReadUInt64(); + this.Unknown_168h = reader.ReadUInt64(); + if (Unknown_20h != 0) + { } + if (Unknown_28h != 0) + { } + switch (Unknown_150h) + { + default: + break; + } + switch (Unknown_154h) + { + default: + break; + } + switch (Unknown_158h) + { + default: + break; + } + switch (Unknown_15Ch) + { + default: + break; + } + if (Unknown_160h != 0) + { } + if (Unknown_168h != 0) + { } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { base.Write(writer, parameters); @@ -2714,9 +3227,7 @@ namespace CodeWalker.GameFiles // write structure data writer.WriteBlock(this.KeyframeProps); writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); writer.WriteBlock(this.KeyframeProp0); writer.WriteBlock(this.KeyframeProp1); writer.Write(this.Unknown_150h); @@ -2724,9 +3235,7 @@ namespace CodeWalker.GameFiles writer.Write(this.Unknown_158h); writer.Write(this.Unknown_15Ch); writer.Write(this.Unknown_160h); - writer.Write(this.Unknown_164h); writer.Write(this.Unknown_168h); - writer.Write(this.Unknown_16Ch); } public override Tuple[] GetParts() @@ -2739,22 +3248,20 @@ namespace CodeWalker.GameFiles } } - // ptxu_AnimateTexture [TC(typeof(EXP))] public class ParticleBehaviourAnimateTexture : ParticleBehaviour { + // ptxu_AnimateTexture public override long BlockLength => 0xD0; // structure data public ResourcePointerList64 KeyframeProps { get; set; } - public uint Unknown_20h { get; set; } // 0x00000000 - public uint Unknown_24h { get; set; } // 0x00000000 - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 + public ulong Unknown_20h; // 0x0000000000000000 + public ulong Unknown_28h; // 0x0000000000000000 public ParticleKeyframeProp KeyframeProp0 { get; set; } - public uint Unknown_C0h { get; set; } - public uint Unknown_C4h { get; set; } - public uint Unknown_C8h { get; set; } - public uint Unknown_CCh { get; set; } + public MetaHash Unknown_C0h { get; set; } + public MetaHash Unknown_C4h { get; set; } + public MetaHash Unknown_C8h { get; set; } + public MetaHash Unknown_CCh { get; set; } public override void Read(ResourceDataReader reader, params object[] parameters) { @@ -2762,17 +3269,39 @@ namespace CodeWalker.GameFiles // read structure data this.KeyframeProps = reader.ReadBlock>(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); + this.Unknown_20h = reader.ReadUInt64(); + this.Unknown_28h = reader.ReadUInt64(); this.KeyframeProp0 = reader.ReadBlock(); this.Unknown_C0h = reader.ReadUInt32(); this.Unknown_C4h = reader.ReadUInt32(); this.Unknown_C8h = reader.ReadUInt32(); this.Unknown_CCh = reader.ReadUInt32(); - } + if (Unknown_20h != 0) + { } + if (Unknown_28h != 0) + { } + switch (Unknown_C0h) + { + default: + break; + } + switch (Unknown_C4h) + { + default: + break; + } + switch (Unknown_C8h) + { + default: + break; + } + switch (Unknown_CCh) + { + default: + break; + } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { base.Write(writer, parameters); @@ -2780,9 +3309,7 @@ namespace CodeWalker.GameFiles // write structure data writer.WriteBlock(this.KeyframeProps); writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); writer.WriteBlock(this.KeyframeProp0); writer.Write(this.Unknown_C0h); writer.Write(this.Unknown_C4h); @@ -2799,24 +3326,21 @@ namespace CodeWalker.GameFiles } } - // ptxu_Colour [TC(typeof(EXP))] public class ParticleBehaviourColour : ParticleBehaviour { + // ptxu_Colour public override long BlockLength => 0x1F0; // structure data public ResourcePointerList64 KeyframeProps { get; set; } - public uint Unknown_20h { get; set; } // 0x00000000 - public uint Unknown_24h { get; set; } // 0x00000000 - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 + public ulong Unknown_20h; // 0x0000000000000000 + public ulong Unknown_28h; // 0x0000000000000000 public ParticleKeyframeProp KeyframeProp0 { get; set; } public ParticleKeyframeProp KeyframeProp1 { get; set; } public ParticleKeyframeProp KeyframeProp2 { get; set; } - public uint Unknown_1E0h { get; set; } - public uint Unknown_1E4h { get; set; } - public uint Unknown_1E8h { get; set; } // 0x00000000 - public uint Unknown_1ECh { get; set; } // 0x00000000 + public MetaHash Unknown_1E0h { get; set; } + public MetaHash Unknown_1E4h { get; set; } + public ulong Unknown_1E8h; // 0x0000000000000000 public override void Read(ResourceDataReader reader, params object[] parameters) { @@ -2824,19 +3348,32 @@ namespace CodeWalker.GameFiles // read structure data this.KeyframeProps = reader.ReadBlock>(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); + this.Unknown_20h = reader.ReadUInt64(); + this.Unknown_28h = reader.ReadUInt64(); this.KeyframeProp0 = reader.ReadBlock(); this.KeyframeProp1 = reader.ReadBlock(); this.KeyframeProp2 = reader.ReadBlock(); this.Unknown_1E0h = reader.ReadUInt32(); this.Unknown_1E4h = reader.ReadUInt32(); - this.Unknown_1E8h = reader.ReadUInt32(); - this.Unknown_1ECh = reader.ReadUInt32(); - } + this.Unknown_1E8h = reader.ReadUInt64(); + if (Unknown_20h != 0) + { } + if (Unknown_28h != 0) + { } + switch (Unknown_1E0h) + { + default: + break; + } + switch (Unknown_1E4h) + { + default: + break; + } + if (Unknown_1E8h != 0) + { } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { base.Write(writer, parameters); @@ -2844,16 +3381,13 @@ namespace CodeWalker.GameFiles // write structure data writer.WriteBlock(this.KeyframeProps); writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); writer.WriteBlock(this.KeyframeProp0); writer.WriteBlock(this.KeyframeProp1); writer.WriteBlock(this.KeyframeProp2); writer.Write(this.Unknown_1E0h); writer.Write(this.Unknown_1E4h); writer.Write(this.Unknown_1E8h); - writer.Write(this.Unknown_1ECh); } public override Tuple[] GetParts() @@ -2867,50 +3401,41 @@ namespace CodeWalker.GameFiles } } - // ptxd_Sprite [TC(typeof(EXP))] public class ParticleBehaviourSprite : ParticleBehaviour { + // ptxd_Sprite public override long BlockLength => 0x70; // structure data - 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 uint Unknown_20h { get; set; } // 0x00000000 - public uint Unknown_24h { get; set; } // 0x00000000 - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 - public uint Unknown_30h { get; set; } - public uint Unknown_34h { get; set; } - public uint Unknown_38h { get; set; } - public uint Unknown_3Ch { get; set; } - public uint Unknown_40h { get; set; } - public uint Unknown_44h { get; set; } - public uint Unknown_48h { get; set; } - public uint Unknown_4Ch { get; set; } - public uint Unknown_50h { get; set; } - public uint Unknown_54h { get; set; } - public uint Unknown_58h { get; set; } - public uint Unknown_5Ch { get; set; } - public uint Unknown_60h { get; set; } - public uint Unknown_64h { get; set; } // 0x00000000 - public uint Unknown_68h { get; set; } // 0x00000000 - public uint Unknown_6Ch { get; set; } // 0x00000000 + public ulong Unknown_10h; // 0x0000000000000000 + public ulong Unknown_18h; // 0x0000000000000000 + public ulong Unknown_20h; // 0x0000000000000000 + public ulong Unknown_28h; // 0x0000000000000000 + public MetaHash Unknown_30h { get; set; } + public MetaHash Unknown_34h { get; set; } + public MetaHash Unknown_38h { get; set; } + public MetaHash Unknown_3Ch { get; set; } + public MetaHash Unknown_40h { get; set; } + public MetaHash Unknown_44h { get; set; } + public MetaHash Unknown_48h { get; set; } + public MetaHash Unknown_4Ch { get; set; } + public MetaHash Unknown_50h { get; set; } + public MetaHash Unknown_54h { get; set; } + public MetaHash Unknown_58h { get; set; } + public MetaHash Unknown_5Ch { get; set; } + public MetaHash Unknown_60h { get; set; } + public uint Unknown_64h; // 0x00000000 + public ulong Unknown_68h; // 0x0000000000000000 public override void Read(ResourceDataReader reader, params object[] parameters) { base.Read(reader, parameters); // read structure data - this.Unknown_10h = reader.ReadUInt32(); - this.Unknown_14h = reader.ReadUInt32(); - this.Unknown_18h = reader.ReadUInt32(); - this.Unknown_1Ch = reader.ReadUInt32(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); + this.Unknown_10h = reader.ReadUInt64(); + this.Unknown_18h = reader.ReadUInt64(); + this.Unknown_20h = reader.ReadUInt64(); + this.Unknown_28h = reader.ReadUInt64(); this.Unknown_30h = reader.ReadUInt32(); this.Unknown_34h = reader.ReadUInt32(); this.Unknown_38h = reader.ReadUInt32(); @@ -2925,23 +3450,95 @@ namespace CodeWalker.GameFiles this.Unknown_5Ch = reader.ReadUInt32(); this.Unknown_60h = reader.ReadUInt32(); this.Unknown_64h = reader.ReadUInt32(); - this.Unknown_68h = reader.ReadUInt32(); - this.Unknown_6Ch = reader.ReadUInt32(); - } + this.Unknown_68h = reader.ReadUInt64(); + if (Unknown_10h != 0) + { } + if (Unknown_18h != 0) + { } + if (Unknown_20h != 0) + { } + if (Unknown_28h != 0) + { } + switch (Unknown_30h) + { + default: + break; + } + switch (Unknown_34h) + { + default: + break; + } + switch (Unknown_38h) + { + default: + break; + } + switch (Unknown_3Ch) + { + default: + break; + } + switch (Unknown_40h) + { + default: + break; + } + switch (Unknown_44h) + { + default: + break; + } + switch (Unknown_48h) + { + default: + break; + } + switch (Unknown_4Ch) + { + default: + break; + } + switch (Unknown_50h) + { + default: + break; + } + switch (Unknown_54h) + { + default: + break; + } + switch (Unknown_58h) + { + default: + break; + } + switch (Unknown_5Ch) + { + default: + break; + } + switch (Unknown_60h) + { + default: + break; + } + if (Unknown_64h != 0) + { } + if (Unknown_68h != 0) + { } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { base.Write(writer, parameters); // write structure data writer.Write(this.Unknown_10h); - writer.Write(this.Unknown_14h); writer.Write(this.Unknown_18h); - writer.Write(this.Unknown_1Ch); writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); writer.Write(this.Unknown_30h); writer.Write(this.Unknown_34h); writer.Write(this.Unknown_38h); @@ -2957,34 +3554,28 @@ namespace CodeWalker.GameFiles writer.Write(this.Unknown_60h); writer.Write(this.Unknown_64h); writer.Write(this.Unknown_68h); - writer.Write(this.Unknown_6Ch); } } - // ptxu_Wind [TC(typeof(EXP))] public class ParticleBehaviourWind : ParticleBehaviour { + // ptxu_Wind public override long BlockLength => 0xF0; // structure data public ResourcePointerList64 KeyframeProps { get; set; } - public uint Unknown_20h { get; set; } // 0x00000000 - public uint Unknown_24h { get; set; } // 0x00000000 - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 + public ulong Unknown_20h; // 0x0000000000000000 + public ulong Unknown_28h; // 0x0000000000000000 public ParticleKeyframeProp KeyframeProp0 { get; set; } - public uint Unknown_C0h { get; set; } // 0x00000000 - public uint Unknown_C4h { get; set; } // 0x00000000 - public uint Unknown_C8h { get; set; } // 0x00000000 - public uint Unknown_CCh { get; set; } // 0x00000000 - public uint Unknown_D0h { get; set; } - public uint Unknown_D4h { get; set; } - public uint Unknown_D8h { get; set; } - public uint Unknown_DCh { get; set; } - public uint Unknown_E0h { get; set; } - public uint Unknown_E4h { get; set; } // 0x00000000 - public uint Unknown_E8h { get; set; } // 0x00000000 - public uint Unknown_ECh { get; set; } // 0x00000000 + public ulong Unknown_C0h; // 0x0000000000000000 + public ulong Unknown_C8h; // 0x0000000000000000 + public MetaHash Unknown_D0h { get; set; } + public MetaHash Unknown_D4h { get; set; } + public MetaHash Unknown_D8h { get; set; } + public MetaHash Unknown_DCh { get; set; } + public MetaHash Unknown_E0h { get; set; } + public uint Unknown_E4h; // 0x00000000 + public ulong Unknown_E8h; // 0x0000000000000000 public override void Read(ResourceDataReader reader, params object[] parameters) { @@ -2992,25 +3583,57 @@ namespace CodeWalker.GameFiles // read structure data this.KeyframeProps = reader.ReadBlock>(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); + this.Unknown_20h = reader.ReadUInt64(); + this.Unknown_28h = reader.ReadUInt64(); this.KeyframeProp0 = reader.ReadBlock(); - this.Unknown_C0h = reader.ReadUInt32(); - this.Unknown_C4h = reader.ReadUInt32(); - this.Unknown_C8h = reader.ReadUInt32(); - this.Unknown_CCh = reader.ReadUInt32(); + this.Unknown_C0h = reader.ReadUInt64(); + this.Unknown_C8h = reader.ReadUInt64(); this.Unknown_D0h = reader.ReadUInt32(); this.Unknown_D4h = reader.ReadUInt32(); this.Unknown_D8h = reader.ReadUInt32(); this.Unknown_DCh = reader.ReadUInt32(); this.Unknown_E0h = reader.ReadUInt32(); this.Unknown_E4h = reader.ReadUInt32(); - this.Unknown_E8h = reader.ReadUInt32(); - this.Unknown_ECh = reader.ReadUInt32(); - } + this.Unknown_E8h = reader.ReadUInt64(); + if (Unknown_20h != 0) + { } + if (Unknown_28h != 0) + { } + if (Unknown_C0h != 0) + { } + if (Unknown_C8h != 0) + { } + switch (Unknown_D0h) + { + default: + break; + } + switch (Unknown_D4h) + { + default: + break; + } + switch (Unknown_D8h) + { + default: + break; + } + switch (Unknown_DCh) + { + default: + break; + } + switch (Unknown_E0h) + { + default: + break; + } + if (Unknown_E4h != 0) + { } + if (Unknown_E8h != 0) + { } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { base.Write(writer, parameters); @@ -3018,14 +3641,10 @@ namespace CodeWalker.GameFiles // write structure data writer.WriteBlock(this.KeyframeProps); writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); writer.WriteBlock(this.KeyframeProp0); writer.Write(this.Unknown_C0h); - writer.Write(this.Unknown_C4h); writer.Write(this.Unknown_C8h); - writer.Write(this.Unknown_CCh); writer.Write(this.Unknown_D0h); writer.Write(this.Unknown_D4h); writer.Write(this.Unknown_D8h); @@ -3033,7 +3652,6 @@ namespace CodeWalker.GameFiles writer.Write(this.Unknown_E0h); writer.Write(this.Unknown_E4h); writer.Write(this.Unknown_E8h); - writer.Write(this.Unknown_ECh); } public override Tuple[] GetParts() @@ -3045,17 +3663,15 @@ namespace CodeWalker.GameFiles } } - // ptxu_Light [TC(typeof(EXP))] public class ParticleBehaviourLight : ParticleBehaviour { + // ptxu_Light public override long BlockLength => 0x550; // structure data public ResourcePointerList64 KeyframeProps { get; set; } - public uint Unknown_20h { get; set; } // 0x00000000 - public uint Unknown_24h { get; set; } // 0x00000000 - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 + public ulong Unknown_20h; // 0x0000000000000000 + public ulong Unknown_28h; // 0x0000000000000000 public ParticleKeyframeProp KeyframeProp0 { get; set; } public ParticleKeyframeProp KeyframeProp1 { get; set; } public ParticleKeyframeProp KeyframeProp2 { get; set; } @@ -3065,10 +3681,10 @@ namespace CodeWalker.GameFiles public ParticleKeyframeProp KeyframeProp6 { get; set; } public ParticleKeyframeProp KeyframeProp7 { get; set; } public ParticleKeyframeProp KeyframeProp8 { get; set; } - public uint Unknown_540h { get; set; } - public uint Unknown_544h { get; set; } - public uint Unknown_548h { get; set; } - public uint Unknown_54Ch { get; set; } + public MetaHash Unknown_540h { get; set; } + public MetaHash Unknown_544h { get; set; } + public MetaHash Unknown_548h { get; set; } + public MetaHash Unknown_54Ch { get; set; } public override void Read(ResourceDataReader reader, params object[] parameters) { @@ -3076,10 +3692,8 @@ namespace CodeWalker.GameFiles // read structure data this.KeyframeProps = reader.ReadBlock>(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); + this.Unknown_20h = reader.ReadUInt64(); + this.Unknown_28h = reader.ReadUInt64(); this.KeyframeProp0 = reader.ReadBlock(); this.KeyframeProp1 = reader.ReadBlock(); this.KeyframeProp2 = reader.ReadBlock(); @@ -3093,8 +3707,33 @@ namespace CodeWalker.GameFiles this.Unknown_544h = reader.ReadUInt32(); this.Unknown_548h = reader.ReadUInt32(); this.Unknown_54Ch = reader.ReadUInt32(); - } + + if (Unknown_20h != 0) + { } + if (Unknown_28h != 0) + { } + switch (Unknown_540h) + { + default: + break; + } + switch (Unknown_544h) + { + default: + break; + } + switch (Unknown_548h) + { + default: + break; + } + switch (Unknown_54Ch) + { + default: + break; + } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { base.Write(writer, parameters); @@ -3102,9 +3741,7 @@ namespace CodeWalker.GameFiles // write structure data writer.WriteBlock(this.KeyframeProps); writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); writer.WriteBlock(this.KeyframeProp0); writer.WriteBlock(this.KeyframeProp1); writer.WriteBlock(this.KeyframeProp2); @@ -3137,57 +3774,67 @@ namespace CodeWalker.GameFiles } } - // ptxd_Model [TC(typeof(EXP))] public class ParticleBehaviourModel : ParticleBehaviour { + // ptxd_Model public override long BlockLength => 0x40; // structure data - 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 uint Unknown_20h { get; set; } // 0x00000000 - public uint Unknown_24h { get; set; } // 0x00000000 - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 - public uint Unknown_30h { get; set; } // 0x00000000 - public uint Unknown_34h { get; set; } - public uint Unknown_38h { get; set; } - public uint Unknown_3Ch { get; set; } // 0x00000000 + public ulong Unknown_10h; // 0x0000000000000000 + public ulong Unknown_18h; // 0x0000000000000000 + public ulong Unknown_20h; // 0x0000000000000000 + public ulong Unknown_28h; // 0x0000000000000000 + public uint Unknown_30h; // 0x00000000 + public MetaHash Unknown_34h { get; set; } + public MetaHash Unknown_38h { get; set; } + public uint Unknown_3Ch; // 0x00000000 public override void Read(ResourceDataReader reader, params object[] parameters) { base.Read(reader, parameters); // read structure data - this.Unknown_10h = reader.ReadUInt32(); - this.Unknown_14h = reader.ReadUInt32(); - this.Unknown_18h = reader.ReadUInt32(); - this.Unknown_1Ch = reader.ReadUInt32(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); + this.Unknown_10h = reader.ReadUInt64(); + this.Unknown_18h = reader.ReadUInt64(); + this.Unknown_20h = reader.ReadUInt64(); + this.Unknown_28h = reader.ReadUInt64(); this.Unknown_30h = reader.ReadUInt32(); this.Unknown_34h = reader.ReadUInt32(); this.Unknown_38h = reader.ReadUInt32(); this.Unknown_3Ch = reader.ReadUInt32(); - } + if (Unknown_10h != 0) + { } + if (Unknown_18h != 0) + { } + if (Unknown_20h != 0) + { } + if (Unknown_28h != 0) + { } + if (Unknown_30h != 0) + { } + switch (Unknown_34h) + { + default: + break; + } + switch (Unknown_38h) + { + default: + break; + } + if (Unknown_3Ch != 0) + { } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { base.Write(writer, parameters); // write structure data writer.Write(this.Unknown_10h); - writer.Write(this.Unknown_14h); writer.Write(this.Unknown_18h); - writer.Write(this.Unknown_1Ch); writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); writer.Write(this.Unknown_30h); writer.Write(this.Unknown_34h); writer.Write(this.Unknown_38h); @@ -3195,31 +3842,29 @@ namespace CodeWalker.GameFiles } } - // ptxu_Decal [TC(typeof(EXP))] public class ParticleBehaviourDecal : ParticleBehaviour { + // ptxu_Decal public override long BlockLength => 0x180; // structure data public ResourcePointerList64 KeyframeProps { get; set; } - public uint Unknown_20h { get; set; } // 0x00000000 - public uint Unknown_24h { get; set; } // 0x00000000 - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 + public ulong Unknown_20h; // 0x0000000000000000 + public ulong Unknown_28h; // 0x0000000000000000 public ParticleKeyframeProp KeyframeProp0 { get; set; } public ParticleKeyframeProp KeyframeProp1 { get; set; } - public uint Unknown_150h { get; set; } - public uint Unknown_154h { get; set; } - public uint Unknown_158h { get; set; } - public uint Unknown_15Ch { get; set; } - public uint Unknown_160h { get; set; } - public uint Unknown_164h { get; set; } - public uint Unknown_168h { get; set; } - public uint Unknown_16Ch { get; set; } - public uint Unknown_170h { get; set; } - public uint Unknown_174h { get; set; } // 0x3E99999A - public uint Unknown_178h { get; set; } // 0x3F800000 - public uint Unknown_17Ch { get; set; } // 0x00000000 + public MetaHash Unknown_150h { get; set; } + public MetaHash Unknown_154h { get; set; } + public MetaHash Unknown_158h { get; set; } + public MetaHash Unknown_15Ch { get; set; } + public MetaHash Unknown_160h { get; set; } + public MetaHash Unknown_164h { get; set; } + public MetaHash Unknown_168h { get; set; } + public MetaHash Unknown_16Ch { get; set; } + public MetaHash Unknown_170h { get; set; } + public float Unknown_174h = 0.3f; // 0x3E99999A // 0.3f + public float Unknown_178h = 1.0f; // 0x3F800000 // 1.0f + public uint Unknown_17Ch; // 0x00000000 public override void Read(ResourceDataReader reader, params object[] parameters) { @@ -3227,10 +3872,8 @@ namespace CodeWalker.GameFiles // read structure data this.KeyframeProps = reader.ReadBlock>(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); + this.Unknown_20h = reader.ReadUInt64(); + this.Unknown_28h = reader.ReadUInt64(); this.KeyframeProp0 = reader.ReadBlock(); this.KeyframeProp1 = reader.ReadBlock(); this.Unknown_150h = reader.ReadUInt32(); @@ -3242,9 +3885,65 @@ namespace CodeWalker.GameFiles this.Unknown_168h = reader.ReadUInt32(); this.Unknown_16Ch = reader.ReadUInt32(); this.Unknown_170h = reader.ReadUInt32(); - this.Unknown_174h = reader.ReadUInt32(); - this.Unknown_178h = reader.ReadUInt32(); + this.Unknown_174h = reader.ReadSingle(); + this.Unknown_178h = reader.ReadSingle(); this.Unknown_17Ch = reader.ReadUInt32(); + + if (Unknown_20h != 0) + { } + if (Unknown_28h != 0) + { } + switch (Unknown_150h) + { + default: + break; + } + switch (Unknown_154h) + { + default: + break; + } + switch (Unknown_158h) + { + default: + break; + } + switch (Unknown_15Ch) + { + default: + break; + } + switch (Unknown_160h) + { + default: + break; + } + switch (Unknown_164h) + { + default: + break; + } + switch (Unknown_168h) + { + default: + break; + } + switch (Unknown_16Ch) + { + default: + break; + } + switch (Unknown_170h) + { + default: + break; + } + if (Unknown_174h != 0.3f) + { } + if (Unknown_178h != 1.0f) + { } + if (Unknown_17Ch != 0) + { } } public override void Write(ResourceDataWriter writer, params object[] parameters) @@ -3254,9 +3953,7 @@ namespace CodeWalker.GameFiles // write structure data writer.WriteBlock(this.KeyframeProps); writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); writer.WriteBlock(this.KeyframeProp0); writer.WriteBlock(this.KeyframeProp1); writer.Write(this.Unknown_150h); @@ -3283,27 +3980,22 @@ namespace CodeWalker.GameFiles } } - // ptxu_ZCull [TC(typeof(EXP))] public class ParticleBehaviourZCull : ParticleBehaviour { + // ptxu_ZCull public override long BlockLength => 0x170; // structure data public ResourcePointerList64 KeyframeProps { get; set; } - public uint Unknown_20h { get; set; } // 0x00000000 - public uint Unknown_24h { get; set; } // 0x00000000 - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 + public ulong Unknown_20h; // 0x0000000000000000 + public ulong Unknown_28h; // 0x0000000000000000 public ParticleKeyframeProp KeyframeProp0 { get; set; } public ParticleKeyframeProp KeyframeProp1 { get; set; } - public uint Unknown_150h { get; set; } // 0x00000000 - public uint Unknown_154h { get; set; } // 0x00000000 - public uint Unknown_158h { get; set; } - public uint Unknown_15Ch { get; set; } - public uint Unknown_160h { get; set; } // 0x00000000 - public uint Unknown_164h { get; set; } // 0x00000000 - public uint Unknown_168h { get; set; } // 0x00000000 - public uint Unknown_16Ch { get; set; } // 0x00000000 + public ulong Unknown_150h; // 0x0000000000000000 + public MetaHash Unknown_158h { get; set; } + public MetaHash Unknown_15Ch { get; set; } + public ulong Unknown_160h; // 0x0000000000000000 + public ulong Unknown_168h; // 0x0000000000000000 public override void Read(ResourceDataReader reader, params object[] parameters) { @@ -3311,22 +4003,37 @@ namespace CodeWalker.GameFiles // read structure data this.KeyframeProps = reader.ReadBlock>(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); + this.Unknown_20h = reader.ReadUInt64(); + this.Unknown_28h = reader.ReadUInt64(); this.KeyframeProp0 = reader.ReadBlock(); this.KeyframeProp1 = reader.ReadBlock(); - this.Unknown_150h = reader.ReadUInt32(); - this.Unknown_154h = reader.ReadUInt32(); + this.Unknown_150h = reader.ReadUInt64(); this.Unknown_158h = reader.ReadUInt32(); this.Unknown_15Ch = reader.ReadUInt32(); - this.Unknown_160h = reader.ReadUInt32(); - this.Unknown_164h = reader.ReadUInt32(); - this.Unknown_168h = reader.ReadUInt32(); - this.Unknown_16Ch = reader.ReadUInt32(); - } + this.Unknown_160h = reader.ReadUInt64(); + this.Unknown_168h = reader.ReadUInt64(); + if (Unknown_20h != 0) + { } + if (Unknown_28h != 0) + { } + if (Unknown_150h != 0) + { } + switch (Unknown_158h) + { + default: + break; + } + switch (Unknown_15Ch) + { + default: + break; + } + if (Unknown_160h != 0) + { } + if (Unknown_168h != 0) + { } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { base.Write(writer, parameters); @@ -3334,19 +4041,14 @@ namespace CodeWalker.GameFiles // write structure data writer.WriteBlock(this.KeyframeProps); writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); writer.WriteBlock(this.KeyframeProp0); writer.WriteBlock(this.KeyframeProp1); writer.Write(this.Unknown_150h); - writer.Write(this.Unknown_154h); writer.Write(this.Unknown_158h); writer.Write(this.Unknown_15Ch); writer.Write(this.Unknown_160h); - writer.Write(this.Unknown_164h); writer.Write(this.Unknown_168h); - writer.Write(this.Unknown_16Ch); } public override Tuple[] GetParts() @@ -3359,25 +4061,22 @@ namespace CodeWalker.GameFiles } } - // ptxu_Noise [TC(typeof(EXP))] public class ParticleBehaviourNoise : ParticleBehaviour { + // ptxu_Noise public override long BlockLength => 0x280; // structure data public ResourcePointerList64 KeyframeProps { get; set; } - public uint Unknown_20h { get; set; } // 0x00000000 - public uint Unknown_24h { get; set; } // 0x00000000 - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 + public ulong Unknown_20h; // 0x0000000000000000 + public ulong Unknown_28h; // 0x0000000000000000 public ParticleKeyframeProp KeyframeProp0 { get; set; } public ParticleKeyframeProp KeyframeProp1 { get; set; } public ParticleKeyframeProp KeyframeProp2 { get; set; } public ParticleKeyframeProp KeyframeProp3 { get; set; } - public uint Unknown_270h { get; set; } // 0x00000000 - public uint Unknown_274h { get; set; } - public uint Unknown_278h { get; set; } // 0x00000000 - public uint Unknown_27Ch { get; set; } // 0x00000000 + public uint Unknown_270h; // 0x00000000 + public MetaHash Unknown_274h { get; set; } + public ulong Unknown_278h; // 0x0000000000000000 public override void Read(ResourceDataReader reader, params object[] parameters) { @@ -3385,21 +4084,31 @@ namespace CodeWalker.GameFiles // read structure data this.KeyframeProps = reader.ReadBlock>(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); + this.Unknown_20h = reader.ReadUInt64(); + this.Unknown_28h = reader.ReadUInt64(); this.KeyframeProp0 = reader.ReadBlock(); this.KeyframeProp1 = reader.ReadBlock(); this.KeyframeProp2 = reader.ReadBlock(); this.KeyframeProp3 = reader.ReadBlock(); this.Unknown_270h = reader.ReadUInt32(); this.Unknown_274h = reader.ReadUInt32(); - this.Unknown_278h = reader.ReadUInt32(); - this.Unknown_27Ch = reader.ReadUInt32(); + this.Unknown_278h = reader.ReadUInt64(); + + if (Unknown_20h != 0) + { } + if (Unknown_28h != 0) + { } + if (Unknown_270h != 0) + { } + switch (Unknown_274h) + { + default: + break; + } + if (Unknown_278h != 0) + { } } - public override void Write(ResourceDataWriter writer, params object[] parameters) { base.Write(writer, parameters); @@ -3407,9 +4116,7 @@ namespace CodeWalker.GameFiles // write structure data writer.WriteBlock(this.KeyframeProps); writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); writer.WriteBlock(this.KeyframeProp0); writer.WriteBlock(this.KeyframeProp1); writer.WriteBlock(this.KeyframeProp2); @@ -3417,7 +4124,6 @@ namespace CodeWalker.GameFiles writer.Write(this.Unknown_270h); writer.Write(this.Unknown_274h); writer.Write(this.Unknown_278h); - writer.Write(this.Unknown_27Ch); } public override Tuple[] GetParts() @@ -3432,17 +4138,15 @@ namespace CodeWalker.GameFiles } } - // ptxu_Attractor [TC(typeof(EXP))] public class ParticleBehaviourAttractor : ParticleBehaviour { + // ptxu_Attractor public override long BlockLength => 0xC0; // structure data public ResourcePointerList64 KeyframeProps { get; set; } - public uint Unknown_20h { get; set; } // 0x00000000 - public uint Unknown_24h { get; set; } // 0x00000000 - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 + public ulong Unknown_20h; // 0x0000000000000000 + public ulong Unknown_28h; // 0x0000000000000000 public ParticleKeyframeProp KeyframeProp0 { get; set; } public override void Read(ResourceDataReader reader, params object[] parameters) @@ -3451,13 +4155,16 @@ namespace CodeWalker.GameFiles // read structure data this.KeyframeProps = reader.ReadBlock>(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); + this.Unknown_20h = reader.ReadUInt64(); + this.Unknown_28h = reader.ReadUInt64(); this.KeyframeProp0 = reader.ReadBlock(); - } + + if (Unknown_20h != 0) + { } + if (Unknown_28h != 0) + { } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { base.Write(writer, parameters); @@ -3465,9 +4172,7 @@ namespace CodeWalker.GameFiles // write structure data writer.WriteBlock(this.KeyframeProps); writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); writer.WriteBlock(this.KeyframeProp0); } @@ -3480,30 +4185,28 @@ namespace CodeWalker.GameFiles } } - // ptxd_Trail [TC(typeof(EXP))] public class ParticleBehaviourTrail : ParticleBehaviour { + // ptxd_Trail public override long BlockLength => 0xF0; // structure data public ResourcePointerList64 KeyframeProps { get; set; } - public uint Unknown_20h { get; set; } // 0x00000000 - public uint Unknown_24h { get; set; } // 0x00000000 - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 + public ulong Unknown_20h; // 0x0000000000000000 + public ulong Unknown_28h; // 0x0000000000000000 public ParticleKeyframeProp KeyframeProp0 { get; set; } - public uint Unknown_C0h { get; set; } // 0x00000000 - public uint Unknown_C4h { get; set; } - public uint Unknown_C8h { get; set; } - public uint Unknown_CCh { get; set; } - public uint Unknown_D0h { get; set; } // 0x00000000 - public uint Unknown_D4h { get; set; } - public uint Unknown_D8h { get; set; } - public uint Unknown_DCh { get; set; } - public uint Unknown_E0h { get; set; } - public uint Unknown_E4h { get; set; } - public uint Unknown_E8h { get; set; } // 0x00000000 - public uint Unknown_ECh { get; set; } + public uint Unknown_C0h; // 0x00000000 + public MetaHash Unknown_C4h { get; set; } + public MetaHash Unknown_C8h { get; set; } + public MetaHash Unknown_CCh { get; set; } + public uint Unknown_D0h; // 0x00000000 + public MetaHash Unknown_D4h { get; set; } + public MetaHash Unknown_D8h { get; set; } + public MetaHash Unknown_DCh { get; set; } + public MetaHash Unknown_E0h { get; set; } + public MetaHash Unknown_E4h { get; set; } + public uint Unknown_E8h; // 0x00000000 + public MetaHash Unknown_ECh { get; set; } public override void Read(ResourceDataReader reader, params object[] parameters) { @@ -3511,10 +4214,8 @@ namespace CodeWalker.GameFiles // read structure data this.KeyframeProps = reader.ReadBlock>(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); + this.Unknown_20h = reader.ReadUInt64(); + this.Unknown_28h = reader.ReadUInt64(); this.KeyframeProp0 = reader.ReadBlock(); this.Unknown_C0h = reader.ReadUInt32(); this.Unknown_C4h = reader.ReadUInt32(); @@ -3528,8 +4229,63 @@ namespace CodeWalker.GameFiles this.Unknown_E4h = reader.ReadUInt32(); this.Unknown_E8h = reader.ReadUInt32(); this.Unknown_ECh = reader.ReadUInt32(); - } + if (Unknown_20h != 0) + { } + if (Unknown_28h != 0) + { } + if (Unknown_C0h != 0) + { } + switch (Unknown_C4h) + { + default: + break; + } + switch (Unknown_C8h) + { + default: + break; + } + switch (Unknown_CCh) + { + default: + break; + } + if (Unknown_D0h != 0) + { } + switch (Unknown_D4h) + { + default: + break; + } + switch (Unknown_D8h) + { + default: + break; + } + switch (Unknown_DCh) + { + default: + break; + } + switch (Unknown_E0h) + { + default: + break; + } + switch (Unknown_E4h) + { + default: + break; + } + if (Unknown_E8h != 0) + { } + switch (Unknown_ECh) + { + default: + break; + } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { base.Write(writer, parameters); @@ -3537,9 +4293,7 @@ namespace CodeWalker.GameFiles // write structure data writer.WriteBlock(this.KeyframeProps); writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); writer.WriteBlock(this.KeyframeProp0); writer.Write(this.Unknown_C0h); writer.Write(this.Unknown_C4h); @@ -3564,17 +4318,15 @@ namespace CodeWalker.GameFiles } } - // ptxu_FogVolume [TC(typeof(EXP))] public class ParticleBehaviourFogVolume : ParticleBehaviour { + // ptxu_FogVolume public override long BlockLength => 0x430; // structure data public ResourcePointerList64 KeyframeProps { get; set; } - public uint Unknown_20h { get; set; } // 0x00000000 - public uint Unknown_24h { get; set; } // 0x00000000 - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 + public ulong Unknown_20h; // 0x0000000000000000 + public ulong Unknown_28h; // 0x0000000000000000 public ParticleKeyframeProp KeyframeProp0 { get; set; } public ParticleKeyframeProp KeyframeProp1 { get; set; } public ParticleKeyframeProp KeyframeProp2 { get; set; } @@ -3582,10 +4334,10 @@ namespace CodeWalker.GameFiles public ParticleKeyframeProp KeyframeProp4 { get; set; } public ParticleKeyframeProp KeyframeProp5 { get; set; } public ParticleKeyframeProp KeyframeProp6 { get; set; } - public uint Unknown_420h { get; set; } - public uint Unknown_424h { get; set; } - public uint Unknown_428h { get; set; } - public uint Unknown_42Ch { get; set; } + public MetaHash Unknown_420h { get; set; } + public MetaHash Unknown_424h { get; set; } + public MetaHash Unknown_428h { get; set; } + public MetaHash Unknown_42Ch { get; set; } public override void Read(ResourceDataReader reader, params object[] parameters) { @@ -3593,10 +4345,8 @@ namespace CodeWalker.GameFiles // read structure data this.KeyframeProps = reader.ReadBlock>(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); + this.Unknown_20h = reader.ReadUInt64(); + this.Unknown_28h = reader.ReadUInt64(); this.KeyframeProp0 = reader.ReadBlock(); this.KeyframeProp1 = reader.ReadBlock(); this.KeyframeProp2 = reader.ReadBlock(); @@ -3608,8 +4358,33 @@ namespace CodeWalker.GameFiles this.Unknown_424h = reader.ReadUInt32(); this.Unknown_428h = reader.ReadUInt32(); this.Unknown_42Ch = reader.ReadUInt32(); - } + + if (Unknown_20h != 0) + { } + if (Unknown_28h != 0) + { } + switch (Unknown_420h) + { + default: + break; + } + switch (Unknown_424h) + { + default: + break; + } + switch (Unknown_428h) + { + default: + break; + } + switch (Unknown_42Ch) + { + default: + break; + } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { base.Write(writer, parameters); @@ -3617,9 +4392,7 @@ namespace CodeWalker.GameFiles // write structure data writer.WriteBlock(this.KeyframeProps); writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); writer.WriteBlock(this.KeyframeProp0); writer.WriteBlock(this.KeyframeProp1); writer.WriteBlock(this.KeyframeProp2); @@ -3648,123 +4421,148 @@ namespace CodeWalker.GameFiles } } - // ptxu_River [TC(typeof(EXP))] public class ParticleBehaviourRiver : ParticleBehaviour { + // ptxu_River public override long BlockLength => 0x40; // structure data - 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 uint Unknown_20h { get; set; } // 0x00000000 - public uint Unknown_24h { get; set; } // 0x00000000 - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 - public uint Unknown_30h { get; set; } // 0x42C80000 - public uint Unknown_34h { get; set; } - public uint Unknown_38h { get; set; } // 0x00000000 - public uint Unknown_3Ch { get; set; } // 0x00000000 + public ulong Unknown_10h; // 0x0000000000000000 + public ulong Unknown_18h; // 0x0000000000000000 + public ulong Unknown_20h; // 0x0000000000000000 + public ulong Unknown_28h; // 0x0000000000000000 + public float Unknown_30h { get; set; } = 100.0f; // 0x42C80000 // 100.0f + public MetaHash Unknown_34h { get; set; } + public ulong Unknown_38h; // 0x0000000000000000 public override void Read(ResourceDataReader reader, params object[] parameters) { base.Read(reader, parameters); // read structure data - this.Unknown_10h = reader.ReadUInt32(); - this.Unknown_14h = reader.ReadUInt32(); - this.Unknown_18h = reader.ReadUInt32(); - this.Unknown_1Ch = reader.ReadUInt32(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); + this.Unknown_10h = reader.ReadUInt64(); + this.Unknown_18h = reader.ReadUInt64(); + this.Unknown_20h = reader.ReadUInt64(); + this.Unknown_28h = reader.ReadUInt64(); this.Unknown_30h = reader.ReadUInt32(); this.Unknown_34h = reader.ReadUInt32(); - this.Unknown_38h = reader.ReadUInt32(); - this.Unknown_3Ch = reader.ReadUInt32(); - } + this.Unknown_38h = reader.ReadUInt64(); + if (Unknown_10h != 0) + { } + if (Unknown_18h != 0) + { } + if (Unknown_20h != 0) + { } + if (Unknown_28h != 0) + { } + if (Unknown_30h != 100.0f) + { } + switch (Unknown_34h) + { + default: + break; + } + if (Unknown_38h != 0) + { } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { base.Write(writer, parameters); // write structure data writer.Write(this.Unknown_10h); - writer.Write(this.Unknown_14h); writer.Write(this.Unknown_18h); - writer.Write(this.Unknown_1Ch); writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); writer.Write(this.Unknown_30h); writer.Write(this.Unknown_34h); writer.Write(this.Unknown_38h); - writer.Write(this.Unknown_3Ch); } } - // ptxu_DecalPool [TC(typeof(EXP))] public class ParticleBehaviourDecalPool : ParticleBehaviour { + // ptxu_DecalPool public override long BlockLength => 0x50; // structure data - 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 uint Unknown_20h { get; set; } // 0x00000000 - public uint Unknown_24h { get; set; } // 0x00000000 - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 - public uint Unknown_30h { get; set; } // 0x00000000 - public uint Unknown_34h { get; set; } - public uint Unknown_38h { get; set; } - public uint Unknown_3Ch { get; set; } - public uint Unknown_40h { get; set; } - public uint Unknown_44h { get; set; } - public uint Unknown_48h { get; set; } // 0x00000000 - public uint Unknown_4Ch { get; set; } // 0x00000000 + public ulong Unknown_10h; // 0x0000000000000000 + public ulong Unknown_18h; // 0x0000000000000000 + public ulong Unknown_20h; // 0x0000000000000000 + public ulong Unknown_28h; // 0x0000000000000000 + public uint Unknown_30h; // 0x00000000 + public MetaHash Unknown_34h { get; set; } + public MetaHash Unknown_38h { get; set; } + public MetaHash Unknown_3Ch { get; set; } + public MetaHash Unknown_40h { get; set; } + public MetaHash Unknown_44h { get; set; } + public ulong Unknown_48h; // 0x0000000000000000 public override void Read(ResourceDataReader reader, params object[] parameters) { base.Read(reader, parameters); // read structure data - this.Unknown_10h = reader.ReadUInt32(); - this.Unknown_14h = reader.ReadUInt32(); - this.Unknown_18h = reader.ReadUInt32(); - this.Unknown_1Ch = reader.ReadUInt32(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); + this.Unknown_10h = reader.ReadUInt64(); + this.Unknown_18h = reader.ReadUInt64(); + this.Unknown_20h = reader.ReadUInt64(); + this.Unknown_28h = reader.ReadUInt64(); this.Unknown_30h = reader.ReadUInt32(); this.Unknown_34h = reader.ReadUInt32(); this.Unknown_38h = reader.ReadUInt32(); this.Unknown_3Ch = reader.ReadUInt32(); this.Unknown_40h = reader.ReadUInt32(); this.Unknown_44h = reader.ReadUInt32(); - this.Unknown_48h = reader.ReadUInt32(); - this.Unknown_4Ch = reader.ReadUInt32(); - } + this.Unknown_48h = reader.ReadUInt64(); + if (Unknown_10h != 0) + { } + if (Unknown_18h != 0) + { } + if (Unknown_20h != 0) + { } + if (Unknown_28h != 0) + { } + if (Unknown_30h != 0) + { } + switch (Unknown_34h) + { + default: + break; + } + switch (Unknown_38h) + { + default: + break; + } + switch (Unknown_3Ch) + { + default: + break; + } + switch (Unknown_40h) + { + default: + break; + } + switch (Unknown_44h) + { + default: + break; + } + if (Unknown_48h != 0) + { } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { base.Write(writer, parameters); // write structure data writer.Write(this.Unknown_10h); - writer.Write(this.Unknown_14h); writer.Write(this.Unknown_18h); - writer.Write(this.Unknown_1Ch); writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); writer.Write(this.Unknown_30h); writer.Write(this.Unknown_34h); writer.Write(this.Unknown_38h); @@ -3772,46 +4570,37 @@ namespace CodeWalker.GameFiles writer.Write(this.Unknown_40h); writer.Write(this.Unknown_44h); writer.Write(this.Unknown_48h); - writer.Write(this.Unknown_4Ch); } } - // ptxu_Liquid [TC(typeof(EXP))] public class ParticleBehaviourLiquid : ParticleBehaviour { + // ptxu_Liquid public override long BlockLength => 0x50; // structure data - 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 uint Unknown_20h { get; set; } // 0x00000000 - public uint Unknown_24h { get; set; } // 0x00000000 - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 - public uint Unknown_30h { get; set; } // 0x00000000 - public uint Unknown_34h { get; set; } - public uint Unknown_38h { get; set; } - public uint Unknown_3Ch { get; set; } - public uint Unknown_40h { get; set; } - public uint Unknown_44h { get; set; } - public uint Unknown_48h { get; set; } - public uint Unknown_4Ch { get; set; } // 0x00000000 + public ulong Unknown_10h; // 0x0000000000000000 + public ulong Unknown_18h; // 0x0000000000000000 + public ulong Unknown_20h; // 0x0000000000000000 + public ulong Unknown_28h; // 0x0000000000000000 + public uint Unknown_30h; // 0x00000000 + public MetaHash Unknown_34h { get; set; } + public MetaHash Unknown_38h { get; set; } + public MetaHash Unknown_3Ch { get; set; } + public MetaHash Unknown_40h { get; set; } + public MetaHash Unknown_44h { get; set; } + public MetaHash Unknown_48h { get; set; } + public uint Unknown_4Ch; // 0x00000000 public override void Read(ResourceDataReader reader, params object[] parameters) { base.Read(reader, parameters); // read structure data - this.Unknown_10h = reader.ReadUInt32(); - this.Unknown_14h = reader.ReadUInt32(); - this.Unknown_18h = reader.ReadUInt32(); - this.Unknown_1Ch = reader.ReadUInt32(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); + this.Unknown_10h = reader.ReadUInt64(); + this.Unknown_18h = reader.ReadUInt64(); + this.Unknown_20h = reader.ReadUInt64(); + this.Unknown_28h = reader.ReadUInt64(); this.Unknown_30h = reader.ReadUInt32(); this.Unknown_34h = reader.ReadUInt32(); this.Unknown_38h = reader.ReadUInt32(); @@ -3820,21 +4609,59 @@ namespace CodeWalker.GameFiles this.Unknown_44h = reader.ReadUInt32(); this.Unknown_48h = reader.ReadUInt32(); this.Unknown_4Ch = reader.ReadUInt32(); - } + if (Unknown_10h != 0) + { } + if (Unknown_18h != 0) + { } + if (Unknown_20h != 0) + { } + if (Unknown_28h != 0) + { } + if (Unknown_30h != 0) + { } + switch (Unknown_34h) + { + default: + break; + } + switch (Unknown_38h) + { + default: + break; + } + switch (Unknown_3Ch) + { + default: + break; + } + switch (Unknown_40h) + { + default: + break; + } + switch (Unknown_44h) + { + default: + break; + } + switch (Unknown_48h) + { + default: + break; + } + if (Unknown_4Ch != 0) + { } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { base.Write(writer, parameters); // write structure data writer.Write(this.Unknown_10h); - writer.Write(this.Unknown_14h); writer.Write(this.Unknown_18h); - writer.Write(this.Unknown_1Ch); writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); writer.Write(this.Unknown_30h); writer.Write(this.Unknown_34h); writer.Write(this.Unknown_38h); @@ -3853,106 +4680,30 @@ namespace CodeWalker.GameFiles - [TC(typeof(EXP))] public class ParticleUnknown_P_013 : ResourceSystemBlock + + + + + public enum ParticleShaderVarType : byte { - public override long BlockLength => 0x58; - - // structure data - public uint Unknown_0h { get; set; } // 0x73616942 - public uint Unknown_4h { get; set; } // 0x6E694C20 - public uint Unknown_8h { get; set; } // 0x6553206B - public uint Unknown_Ch { get; set; } // 0x30305F74 - 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 uint Unknown_20h { get; set; } // 0x00000000 - public uint Unknown_24h { get; set; } // 0x00000000 - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 - public uint Unknown_30h { get; set; } // 0x00000000 - public uint Unknown_34h { get; set; } // 0x00000000 - public uint Unknown_38h { get; set; } // 0x00000000 - public uint Unknown_3Ch { get; set; } // 0x00000000 - public ResourceSimpleList64 Unknown_40h { get; set; } - public uint Unknown_50h { get; set; } - public uint Unknown_54h { get; set; } // 0x00000000 - - public override void Read(ResourceDataReader reader, params object[] parameters) - { - // read structure data - this.Unknown_0h = reader.ReadUInt32(); - this.Unknown_4h = reader.ReadUInt32(); - this.Unknown_8h = reader.ReadUInt32(); - this.Unknown_Ch = reader.ReadUInt32(); - this.Unknown_10h = reader.ReadUInt32(); - this.Unknown_14h = reader.ReadUInt32(); - this.Unknown_18h = reader.ReadUInt32(); - this.Unknown_1Ch = reader.ReadUInt32(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); - this.Unknown_30h = reader.ReadUInt32(); - this.Unknown_34h = reader.ReadUInt32(); - this.Unknown_38h = reader.ReadUInt32(); - this.Unknown_3Ch = reader.ReadUInt32(); - this.Unknown_40h = reader.ReadBlock>(); - this.Unknown_50h = reader.ReadUInt32(); - this.Unknown_54h = reader.ReadUInt32(); - } - - 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_10h); - writer.Write(this.Unknown_14h); - writer.Write(this.Unknown_18h); - writer.Write(this.Unknown_1Ch); - writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); - writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); - writer.Write(this.Unknown_30h); - writer.Write(this.Unknown_34h); - writer.Write(this.Unknown_38h); - writer.Write(this.Unknown_3Ch); - writer.WriteBlock(this.Unknown_40h); - writer.Write(this.Unknown_50h); - writer.Write(this.Unknown_54h); - } - - public override Tuple[] GetParts() - { - return new Tuple[] { - new Tuple(0x40, Unknown_40h) - }; - } + Vector2 = 2, + Vector4 = 4, + Texture = 6, + Keyframe = 7, } - - - - - - - // datBase - // ptxShaderVar [TC(typeof(EXP))] public class ParticleShaderVar : ResourceSystemBlock, IResourceXXSystemBlock { + // datBase + // ptxShaderVar public override long BlockLength => 24; // structure data public uint VFT { get; set; } - public uint Unknown_4h { get; set; } // 0x00000001 - public uint Unknown_8h { get; set; } // 0x00000000 - public uint Unknown_Ch { get; set; } // 0x00000000 - public uint Unknown_10h { get; set; } - public byte Type { get; set; } + public uint Unknown_4h = 1; // 0x00000001 + public ulong Unknown_8h; // 0x0000000000000000 + public MetaHash Unknown_10h { get; set; } + public ParticleShaderVarType Type { get; set; } public byte Unknown_15h { get; set; } public ushort Unknown_16h { get; set; } @@ -3961,23 +4712,40 @@ namespace CodeWalker.GameFiles // read structure data this.VFT = reader.ReadUInt32(); this.Unknown_4h = reader.ReadUInt32(); - this.Unknown_8h = reader.ReadUInt32(); - this.Unknown_Ch = reader.ReadUInt32(); + this.Unknown_8h = reader.ReadUInt64(); this.Unknown_10h = reader.ReadUInt32(); - this.Type = reader.ReadByte(); + this.Type = (ParticleShaderVarType)reader.ReadByte(); this.Unknown_15h = reader.ReadByte(); this.Unknown_16h = reader.ReadUInt16(); - } + if (Unknown_4h != 1) + { } + if (Unknown_8h != 0) + { } + switch (Unknown_10h) + { + default: + break; + } + switch (Unknown_15h) + { + default: + break; + } + switch (Unknown_16h) + { + default: + break; + } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { // write structure data writer.Write(this.VFT); writer.Write(this.Unknown_4h); writer.Write(this.Unknown_8h); - writer.Write(this.Unknown_Ch); writer.Write(this.Unknown_10h); - writer.Write(this.Type); + writer.Write((byte)this.Type); writer.Write(this.Unknown_15h); writer.Write(this.Unknown_16h); } @@ -3985,36 +4753,36 @@ namespace CodeWalker.GameFiles public IResourceSystemBlock GetType(ResourceDataReader reader, params object[] parameters) { reader.Position += 20; - var type = reader.ReadByte(); + var type = (ParticleShaderVarType)reader.ReadByte(); reader.Position -= 21; switch (type) { - case 2: - case 4: return new ParticleShaderVarVector(); - case 6: return new ParticleShaderVarTexture(); - case 7: return new ParticleShaderVarKeyframe(); + case ParticleShaderVarType.Vector2: + case ParticleShaderVarType.Vector4: return new ParticleShaderVarVector(); + case ParticleShaderVarType.Texture: return new ParticleShaderVarTexture(); + case ParticleShaderVarType.Keyframe: return new ParticleShaderVarKeyframe(); default: return null;// throw new Exception("Unknown shader var type"); } } } - // ptxShaderVarVector [TC(typeof(EXP))] public class ParticleShaderVarVector : ParticleShaderVar { + // ptxShaderVarVector public override long BlockLength => 0x40; // structure data - public uint Unknown_18h { get; set; } - public uint Unknown_1Ch { get; set; } - public uint Unknown_20h { get; set; } - public uint Unknown_24h { get; set; } - public uint Unknown_28h { get; set; } - public uint Unknown_2Ch { get; set; } - public uint Unknown_30h { get; set; } - public uint Unknown_34h { get; set; } - public uint Unknown_38h { get; set; } - public uint Unknown_3Ch { get; set; } + public MetaHash Unknown_18h { get; set; } + public MetaHash Unknown_1Ch { get; set; } + public MetaHash Unknown_20h { get; set; } + public MetaHash Unknown_24h { get; set; } + public MetaHash Unknown_28h { get; set; } + public MetaHash Unknown_2Ch { get; set; } + public MetaHash Unknown_30h { get; set; } + public MetaHash Unknown_34h { get; set; } + public MetaHash Unknown_38h { get; set; } + public MetaHash Unknown_3Ch { get; set; } public override void Read(ResourceDataReader reader, params object[] parameters) { @@ -4031,8 +4799,58 @@ namespace CodeWalker.GameFiles this.Unknown_34h = reader.ReadUInt32(); this.Unknown_38h = reader.ReadUInt32(); this.Unknown_3Ch = reader.ReadUInt32(); - } + switch (Unknown_18h) + { + default: + break; + } + switch (Unknown_1Ch) + { + default: + break; + } + switch (Unknown_20h) + { + default: + break; + } + switch (Unknown_24h) + { + default: + break; + } + switch (Unknown_28h) + { + default: + break; + } + switch (Unknown_2Ch) + { + default: + break; + } + switch (Unknown_30h) + { + default: + break; + } + switch (Unknown_34h) + { + default: + break; + } + switch (Unknown_38h) + { + default: + break; + } + switch (Unknown_3Ch) + { + default: + break; + } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { base.Write(writer, parameters); @@ -4051,20 +4869,20 @@ namespace CodeWalker.GameFiles } } - // ptxShaderVarTexture [TC(typeof(EXP))] public class ParticleShaderVarTexture : ParticleShaderVar { + // ptxShaderVarTexture public override long BlockLength => 0x40; // structure data - public uint Unknown_18h { get; set; } - public uint Unknown_1Ch { get; set; } - public uint Unknown_20h { get; set; } - public uint Unknown_24h { get; set; } + public MetaHash Unknown_18h { get; set; } + public MetaHash Unknown_1Ch { get; set; } + public MetaHash Unknown_20h { get; set; } + public MetaHash Unknown_24h { get; set; } public ulong TexturePointer { get; set; } public ulong NamePointer { get; set; } - public uint NameHash { get; set; } - public uint Unknown_3Ch { get; set; } + public MetaHash NameHash { get; set; } + public MetaHash Unknown_3Ch { get; set; } // reference data public Texture Texture { get; set; } @@ -4085,14 +4903,41 @@ namespace CodeWalker.GameFiles this.Unknown_3Ch = reader.ReadUInt32(); // read reference data - this.Texture = reader.ReadBlockAt( - this.TexturePointer // offset - ); - this.Name = reader.ReadBlockAt( - this.NamePointer // offset - ); - } + this.Texture = reader.ReadBlockAt(this.TexturePointer); + this.Name = reader.ReadBlockAt(this.NamePointer); + + switch (Unknown_18h) + { + default: + break; + } + switch (Unknown_1Ch) + { + default: + break; + } + switch (Unknown_20h) + { + default: + break; + } + switch (Unknown_24h) + { + default: + break; + } + switch (NameHash) + { + default: + break; + } + switch (Unknown_3Ch) + { + default: + break; + } + } public override void Write(ResourceDataWriter writer, params object[] parameters) { base.Write(writer, parameters); @@ -4121,23 +4966,19 @@ namespace CodeWalker.GameFiles } } - // ptxShaderVarKeyframe [TC(typeof(EXP))] public class ParticleShaderVarKeyframe : ParticleShaderVar { + // ptxShaderVarKeyframe public override long BlockLength => 0x50; // structure data - public uint Unknown_18h { get; set; } - public uint Unknown_1Ch { get; set; } // 0x00000001 - public uint Unknown_20h { get; set; } // 0x00000000 - public uint Unknown_24h { get; set; } // 0x00000000 - public ResourceSimpleList64 Unknown_28h { get; set; } - public uint Unknown_38h { get; set; } // 0x00000000 - public uint Unknown_3Ch { get; set; } // 0x00000000 - public uint Unknown_40h { get; set; } // 0x00000000 - public uint Unknown_44h { get; set; } // 0x00000000 - public uint Unknown_48h { get; set; } // 0x00000000 - public uint Unknown_4Ch { get; set; } // 0x00000000 + public MetaHash Unknown_18h { get; set; } + public uint Unknown_1Ch = 1; // 0x00000001 + public ulong Unknown_20h; // 0x0000000000000000 + public ResourceSimpleList64 Items { get; set; } + public ulong Unknown_38h; // 0x0000000000000000 + public ulong Unknown_40h; // 0x0000000000000000 + public ulong Unknown_48h; // 0x0000000000000000 public override void Read(ResourceDataReader reader, params object[] parameters) { @@ -4146,17 +4987,29 @@ namespace CodeWalker.GameFiles // read structure data this.Unknown_18h = reader.ReadUInt32(); this.Unknown_1Ch = reader.ReadUInt32(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadBlock>(); - this.Unknown_38h = reader.ReadUInt32(); - this.Unknown_3Ch = reader.ReadUInt32(); - this.Unknown_40h = reader.ReadUInt32(); - this.Unknown_44h = reader.ReadUInt32(); - this.Unknown_48h = reader.ReadUInt32(); - this.Unknown_4Ch = reader.ReadUInt32(); - } + this.Unknown_20h = reader.ReadUInt64(); + this.Items = reader.ReadBlock>(); + this.Unknown_38h = reader.ReadUInt64(); + this.Unknown_40h = reader.ReadUInt64(); + this.Unknown_48h = reader.ReadUInt64(); + switch (Unknown_18h) + { + default: + break; + } + if (Unknown_1Ch != 1) + { } + if (Unknown_20h != 0) + { } + if (Unknown_38h != 0) + { } + if (Unknown_40h != 0) + { } + if (Unknown_48h != 0) + { } + + } public override void Write(ResourceDataWriter writer, params object[] parameters) { base.Write(writer, parameters); @@ -4165,158 +5018,77 @@ namespace CodeWalker.GameFiles writer.Write(this.Unknown_18h); writer.Write(this.Unknown_1Ch); writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); - writer.WriteBlock(this.Unknown_28h); + writer.WriteBlock(this.Items); writer.Write(this.Unknown_38h); - writer.Write(this.Unknown_3Ch); writer.Write(this.Unknown_40h); - writer.Write(this.Unknown_44h); writer.Write(this.Unknown_48h); - writer.Write(this.Unknown_4Ch); } public override Tuple[] GetParts() { return new Tuple[] { - new Tuple(0x28, Unknown_28h) + new Tuple(0x28, Items) }; } } - - [TC(typeof(EXP))] public class ParticleUnknown_P_001 : ResourceSystemBlock + [TC(typeof(EXP))] public class ParticleShaderVarKeyframeItem : ResourceSystemBlock { public override long BlockLength => 0x20; // structure data - public uint Unknown_0h { get; set; } - public uint Unknown_4h { get; set; } - public uint Unknown_8h { get; set; } // 0x00000000 - public uint Unknown_Ch { get; set; } // 0x00000000 - public uint Unknown_10h { get; set; } - public uint Unknown_14h { get; set; } // 0x00000000 - public uint Unknown_18h { get; set; } // 0x00000000 - public uint Unknown_1Ch { get; set; } // 0x00000000 + public MetaHash Unknown_0h { get; set; } + public MetaHash Unknown_4h { get; set; } + public ulong Unknown_8h; // 0x0000000000000000 + public MetaHash Unknown_10h { get; set; } + public uint Unknown_14h; // 0x00000000 + public ulong Unknown_18h; // 0x0000000000000000 public override void Read(ResourceDataReader reader, params object[] parameters) { // read structure data this.Unknown_0h = reader.ReadUInt32(); this.Unknown_4h = reader.ReadUInt32(); - this.Unknown_8h = reader.ReadUInt32(); - this.Unknown_Ch = reader.ReadUInt32(); + this.Unknown_8h = reader.ReadUInt64(); this.Unknown_10h = reader.ReadUInt32(); this.Unknown_14h = reader.ReadUInt32(); - this.Unknown_18h = reader.ReadUInt32(); - this.Unknown_1Ch = reader.ReadUInt32(); - } + this.Unknown_18h = reader.ReadUInt64(); + switch (Unknown_0h) + { + default: + break; + } + switch (Unknown_4h) + { + default: + break; + } + if (Unknown_8h != 0) + { } + switch (Unknown_10h) + { + default: + break; + } + if (Unknown_14h != 0) + { } + if (Unknown_18h != 0) + { } + } 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_10h); writer.Write(this.Unknown_14h); writer.Write(this.Unknown_18h); - writer.Write(this.Unknown_1Ch); } } - - [TC(typeof(EXP))] public class ParticleUnknown_P_012 : ResourceSystemBlock - { - public override long BlockLength => 0x30; - - // structure data - public uint Unknown_0h { get; set; } - public uint Unknown_4h { get; set; } - public uint Unknown_8h { get; set; } - public uint Unknown_Ch { get; set; } - public ulong Unknown_10h_Pointer { get; set; } - public ulong DrawablePointer { get; set; } - public uint Unknown_20h { get; set; } - public uint Unknown_24h { get; set; } // 0x00000000 - public uint Unknown_28h { get; set; } // 0x00000000 - public uint Unknown_2Ch { get; set; } // 0x00000000 - - // reference data - public string_r Unknown_10h_Data { get; set; } - public Drawable Drawable { get; set; } - - public override void Read(ResourceDataReader reader, params object[] parameters) - { - // read structure data - this.Unknown_0h = reader.ReadUInt32(); - this.Unknown_4h = reader.ReadUInt32(); - this.Unknown_8h = reader.ReadUInt32(); - this.Unknown_Ch = reader.ReadUInt32(); - this.Unknown_10h_Pointer = reader.ReadUInt64(); - this.DrawablePointer = reader.ReadUInt64(); - this.Unknown_20h = reader.ReadUInt32(); - this.Unknown_24h = reader.ReadUInt32(); - this.Unknown_28h = reader.ReadUInt32(); - this.Unknown_2Ch = reader.ReadUInt32(); - - // read reference data - this.Unknown_10h_Data = reader.ReadBlockAt( - this.Unknown_10h_Pointer // offset - ); - this.Drawable = reader.ReadBlockAt( - this.DrawablePointer // offset - ); - } - - public override void Write(ResourceDataWriter writer, params object[] parameters) - { - // update structure data - this.Unknown_10h_Pointer = (ulong)(this.Unknown_10h_Data != null ? this.Unknown_10h_Data.FilePosition : 0); - this.DrawablePointer = (ulong)(this.Drawable != null ? this.Drawable.FilePosition : 0); - - // 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_10h_Pointer); - writer.Write(this.DrawablePointer); - writer.Write(this.Unknown_20h); - writer.Write(this.Unknown_24h); - writer.Write(this.Unknown_28h); - writer.Write(this.Unknown_2Ch); - } - - public override IResourceBlock[] GetReferences() - { - var list = new List(); - if (Unknown_10h_Data != null) list.Add(Unknown_10h_Data); - if (Drawable != null) list.Add(Drawable); - return list.ToArray(); - } - } - - - - - - - - - - - - - - - - - - - -